Changes
This commit is contained in:
parent
9778271c5d
commit
5a0331d0a4
|
|
@ -32,7 +32,7 @@ class Currency extends AppModel {
|
|||
|
||||
);
|
||||
|
||||
var $order = "Currency.name ASC";
|
||||
var $order = "name ASC";
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -99,14 +99,5 @@ echo $form->input('sale_discount_amount', array('type'=>'hidden'));
|
|||
|
||||
echo $form->end('Submit');?>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<ul>
|
||||
<li><?php echo $html->link(__('List Costings', true), array('action' => 'index'));?></li>
|
||||
<li><?php echo $html->link(__('List Products', true), array('controller' => 'products', 'action' => 'index')); ?> </li>
|
||||
<li><?php echo $html->link(__('New Product', true), array('controller' => 'products', 'action' => 'add')); ?> </li>
|
||||
<li><?php echo $html->link(__('List Line Items', true), array('controller' => 'line_items', 'action' => 'index')); ?> </li>
|
||||
<li><?php echo $html->link(__('New Line Item', true), array('controller' => 'line_items', 'action' => 'add')); ?> </li>
|
||||
<li><?php echo $html->link(__('List Currencies', true), array('controller' => 'currencies', 'action' => 'index')); ?> </li>
|
||||
<li><?php echo $html->link(__('New Purchase Currency', true), array('controller' => 'currencies', 'action' => 'add')); ?> </li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,42 +1,40 @@
|
|||
<?php /* Quotenik 1.2 - Default Layout. Some Markup retained from CakePHP Default
|
||||
*/ ?>
|
||||
|
||||
<?php // Quotenik 1.2 - Default Layout. Some Markup retained from CakePHP Default ?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>
|
||||
<?php __('CMC'); ?>
|
||||
<?php echo $title_for_layout; ?>
|
||||
</title>
|
||||
<?php
|
||||
<?php
|
||||
$debugLevel = Configure::read('debug');
|
||||
|
||||
if ($debugLevel > 0) {
|
||||
if ($debugLevel > 0) {
|
||||
echo $html->meta('favicon.ico', '/img/core.png', array('type' => 'icon'));
|
||||
} else {
|
||||
} else {
|
||||
echo $html->meta('icon');
|
||||
}
|
||||
}
|
||||
|
||||
echo $html->css('quotenik');
|
||||
echo $html->css('jquery-ui.custom.css');
|
||||
echo $html->css('quotenik');
|
||||
echo $html->css('jquery-ui.custom.css');
|
||||
|
||||
|
||||
//echo $javascript->link('ckeditor/ckeditor');
|
||||
//echo $javascript->link('ckeditor/ckeditor');
|
||||
|
||||
echo $javascript->link('jquery');
|
||||
echo $javascript->link('jquery');
|
||||
|
||||
echo $javascript->link('jquery-ui');
|
||||
echo $javascript->link('jquery.form');
|
||||
echo $javascript->link('menu');
|
||||
echo $javascript->link('global');
|
||||
echo $javascript->link('search');
|
||||
echo $javascript->link('jquery.jeditable.mini');
|
||||
echo $javascript->link('jquery.validate');
|
||||
echo $javascript->link('jquery-ui');
|
||||
echo $javascript->link('jquery.form');
|
||||
echo $javascript->link('menu');
|
||||
echo $javascript->link('global');
|
||||
echo $javascript->link('search');
|
||||
echo $javascript->link('jquery.jeditable.mini');
|
||||
echo $javascript->link('jquery.validate');
|
||||
|
||||
echo $scripts_for_layout;
|
||||
?>
|
||||
echo $scripts_for_layout;
|
||||
?>
|
||||
|
||||
|
||||
</head>
|
||||
|
|
@ -48,14 +46,14 @@
|
|||
|
||||
<div id="username">
|
||||
|
||||
<?php
|
||||
if (isset($currentuser) == FALSE) {
|
||||
<?php
|
||||
if (isset($currentuser) == FALSE) {
|
||||
echo $html->link('Login', '/users/login');
|
||||
} else {
|
||||
} else {
|
||||
$logoutlink = $html->link('Logout', '/users/logout');
|
||||
echo $html->link($currentuser['User']['username'], '/users/view/' . $currentuser['User']['id']) . ' (' . $logoutlink . ')';
|
||||
}
|
||||
?>
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div id="navdiv">
|
||||
|
|
@ -76,10 +74,10 @@
|
|||
<li><?php echo $html->link('Jobs', '/jobs/index'); ?>
|
||||
<ul>
|
||||
|
||||
<?
|
||||
if ($currentuser['User']['access_level'] == 'manager' || $currentuser['User']['access_level'] == 'admin'):
|
||||
<?
|
||||
if ($currentuser['User']['access_level'] == 'manager' || $currentuser['User']['access_level'] == 'admin'):
|
||||
|
||||
?>
|
||||
?>
|
||||
<li><?= $html->link('Reports', '/jobs/reports'); ?></li>
|
||||
<? endif; ?>
|
||||
<li class="last"><?php echo $html->link('Job List', '/jobs/index'); ?></li>
|
||||
|
|
@ -152,9 +150,9 @@
|
|||
</ul>
|
||||
</li>
|
||||
|
||||
<?
|
||||
<?
|
||||
if ($currentuser['User']['access_level'] == 'manager' || $currentuser['User']['access_level'] == 'admin'):
|
||||
?>
|
||||
?>
|
||||
<li class="extra"><?=$html->link('Admin', '/admin'); ?>
|
||||
</li>
|
||||
<? endif; ?>
|
||||
|
|
@ -166,11 +164,11 @@
|
|||
|
||||
</div>
|
||||
<div id="content">
|
||||
<?php
|
||||
<?php
|
||||
if ($session->check('Message.flash')):
|
||||
$session->flash();
|
||||
endif;
|
||||
?>
|
||||
endif;
|
||||
?>
|
||||
<div id="globalAjaxLoading">
|
||||
<h3>Loading, please wait</h3>
|
||||
<?php echo $html->image('ajax-loader.gif'); ?>
|
||||
|
|
@ -179,11 +177,11 @@
|
|||
|
||||
</div>
|
||||
<div id="footer">
|
||||
<?php
|
||||
echo $html->link(
|
||||
<?php
|
||||
echo $html->link(
|
||||
$html->image('cake.power.gif', array('alt' => __("CakePHP: the rapid development php framework", true), 'border' => "0")), 'http://www.cakephp.org/', array('target' => '_new'), null, false
|
||||
);
|
||||
?>
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -191,22 +189,22 @@
|
|||
|
||||
|
||||
|
||||
<?php
|
||||
echo $form->create('Enquiry', array('default' => false, 'id' => 'searchForm', 'default' => 'false'));
|
||||
echo '<h2>Search';
|
||||
echo $html->image('system-search.png');
|
||||
echo '</h2>';
|
||||
echo "<p>Search for: Enquiry Number, Job Number, Customer, Contact or Customer Order Number</p>";
|
||||
<?php
|
||||
echo $form->create('Enquiry', array('default' => false, 'id' => 'searchForm', 'default' => 'false'));
|
||||
echo '<h2>Search';
|
||||
echo $html->image('system-search.png');
|
||||
echo '</h2>';
|
||||
echo "<p>Search for: Enquiry Number, Job Number, Customer, Contact or Customer Order Number</p>";
|
||||
|
||||
echo $form->input('Enquiry.search_string', array('label' => false, 'id' => 'searchString'));
|
||||
?>
|
||||
echo $form->input('Enquiry.search_string', array('label' => false, 'id' => 'searchString'));
|
||||
?>
|
||||
|
||||
<div class ="ui-widget">
|
||||
<button id="searchButton">Search</button>
|
||||
</div>
|
||||
<?
|
||||
echo $form->end();
|
||||
?>
|
||||
<?
|
||||
echo $form->end();
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
|
@ -220,17 +218,18 @@
|
|||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
$mem_usage = memory_get_usage(true);
|
||||
<?php
|
||||
|
||||
if ($mem_usage < 1024)
|
||||
$mem_usage = memory_get_usage(true);
|
||||
|
||||
if ($mem_usage < 1024)
|
||||
echo $mem_usage . " bytes";
|
||||
elseif ($mem_usage < 1048576)
|
||||
elseif ($mem_usage < 1048576)
|
||||
echo round($mem_usage / 1024, 2) . " kilobytes";
|
||||
else
|
||||
else
|
||||
echo round($mem_usage / 1048576, 2) . " megabytes";
|
||||
echo "<br/>";
|
||||
?>
|
||||
echo "<br/>";
|
||||
?>
|
||||
|
||||
|
||||
<?php // debug($currentuser); ?>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<script type="text/javascript">
|
||||
|
||||
$(function() {
|
||||
$(function() {
|
||||
$('button').button();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
|
@ -27,18 +27,27 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
$hasOptions = false;
|
||||
<?
|
||||
$hasOptions = false;
|
||||
|
||||
if(count($document['LineItem']) == 0):
|
||||
?>
|
||||
<tr class="no_items">
|
||||
<td colspan="6"> No Line Items have been Added Yet!</td>
|
||||
</tr>
|
||||
<?
|
||||
endif;
|
||||
?>
|
||||
<?
|
||||
foreach($document['LineItem'] as $li):?>
|
||||
<tr class="lineItem">
|
||||
<td>
|
||||
<? if($li['option'] == 1) {
|
||||
<? if($li['option'] == 1) {
|
||||
echo 'Option<br>';
|
||||
|
||||
$hasOptions = true;
|
||||
}
|
||||
?>
|
||||
}
|
||||
?>
|
||||
<?=$li['item_number'];?></td>
|
||||
<td><?=$li['quantity'];?></td>
|
||||
<td class="description">
|
||||
|
|
@ -46,13 +55,13 @@
|
|||
<?=$li['description'];?>
|
||||
</td>
|
||||
<td class="price">
|
||||
<?
|
||||
if($li['has_text_prices']):
|
||||
<?
|
||||
if($li['has_text_prices']):
|
||||
echo $li['unit_price_string'];
|
||||
?>
|
||||
<?
|
||||
else:
|
||||
?>
|
||||
?>
|
||||
<?
|
||||
else:
|
||||
?>
|
||||
<?=$number->currency($li['gross_unit_price'], $currencyCode);?>
|
||||
<? if($li['discount_percent']):?>
|
||||
<br>less<br><?=$li['discount_percent']?>%<br>
|
||||
|
|
@ -64,13 +73,13 @@
|
|||
<? endif;?>
|
||||
</td>
|
||||
<td class="price">
|
||||
<?
|
||||
<?
|
||||
if($li['has_text_prices']):
|
||||
echo $li['gross_price_string'];
|
||||
?>
|
||||
<?
|
||||
?>
|
||||
<?
|
||||
else:
|
||||
?>
|
||||
?>
|
||||
<?=$number->currency($li['gross_price'], $currencyCode);?>
|
||||
<? if($li['discount_percent']):?>
|
||||
<br>less<br><?=$li['discount_percent']?>%<br>
|
||||
|
|
@ -101,7 +110,7 @@
|
|||
else {
|
||||
echo $currencySymbol.'TBA';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td></td>
|
||||
|
|
@ -112,15 +121,15 @@
|
|||
<td class="leftAlign">GST (10%)</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<?
|
||||
if(!$hasOptions) {
|
||||
<?
|
||||
if(!$hasOptions) {
|
||||
echo $number->currency($totals['gst'], $currencyCode);
|
||||
}
|
||||
else {
|
||||
}
|
||||
else {
|
||||
echo $currencySymbol.'TBA';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
|
@ -130,13 +139,13 @@
|
|||
<td class="leftAlign">TOTAL PAYABLE (INCLUDING GST)</td>
|
||||
<td></td>
|
||||
<td><?
|
||||
if(!$hasOptions) {
|
||||
if(!$hasOptions) {
|
||||
echo $number->currency($totals['total'], $currencyCode);
|
||||
}
|
||||
else {
|
||||
}
|
||||
else {
|
||||
echo $currencySymbol.'TBA';
|
||||
}
|
||||
?></td>
|
||||
}
|
||||
?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
<div>
|
||||
<fieldset>
|
||||
<legend>Login</legend>
|
||||
<?php
|
||||
if ($session->check('Message.auth')) $session->flash('auth');
|
||||
echo $form->create('User', array('action' => 'login'));
|
||||
|
|
@ -6,3 +9,5 @@ echo $form->input('password');
|
|||
echo $form->input('remember_me', array('label' => 'Keep me logged in on this Computer', 'type' => 'checkbox'));
|
||||
echo $form->end('Login');
|
||||
?>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1647,3 +1647,9 @@ div.warning p {
|
|||
#extraModels li {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
|
||||
tr.no_items {
|
||||
font-size: 2em;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
* Could (should) tidy this up to move the Quote/Invoice etc Specific
|
||||
* functionality into seperate files.
|
||||
*
|
||||
* Will do this at some point. Today I just need to hammer this out.
|
||||
*
|
||||
* Karl - 20/5/2011
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue