Merge branch 'master' of github.com:kzrl/CMC-Sales
This commit is contained in:
commit
0c37d1ee3a
|
|
@ -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; ?>
|
||||
<?php __('CMC'); ?>
|
||||
<?php echo $title_for_layout; ?>
|
||||
</title>
|
||||
<?php
|
||||
$debugLevel = Configure::read('debug');
|
||||
<?php
|
||||
$debugLevel = Configure::read('debug');
|
||||
|
||||
if ($debugLevel > 0) {
|
||||
echo $html->meta('favicon.ico', '/img/core.png', array('type' => 'icon'));
|
||||
} else {
|
||||
echo $html->meta('icon');
|
||||
}
|
||||
if ($debugLevel > 0) {
|
||||
echo $html->meta('favicon.ico', '/img/core.png', array('type' => 'icon'));
|
||||
} 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) {
|
||||
echo $html->link('Login', '/users/login');
|
||||
} else {
|
||||
$logoutlink = $html->link('Logout', '/users/logout');
|
||||
echo $html->link($currentuser['User']['username'], '/users/view/' . $currentuser['User']['id']) . ' (' . $logoutlink . ')';
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (isset($currentuser) == FALSE) {
|
||||
echo $html->link('Login', '/users/login');
|
||||
} else {
|
||||
$logoutlink = $html->link('Logout', '/users/logout');
|
||||
echo $html->link($currentuser['User']['username'], '/users/view/' . $currentuser['User']['id']) . ' (' . $logoutlink . ')';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div id="navdiv">
|
||||
|
|
@ -67,7 +65,7 @@
|
|||
</ul>
|
||||
</li>
|
||||
|
||||
<li><?php echo $html->link('Documents', '/documents/index'); ?>
|
||||
<li><?php echo $html->link('Documents', '/documents/index'); ?>
|
||||
<ul>
|
||||
<li class="last"><?php echo $html->link('Documents Index', '/documents/index'); ?></li>
|
||||
</ul>
|
||||
|
|
@ -76,12 +74,12 @@
|
|||
<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><?= $html->link('Reports', '/jobs/reports'); ?></li>
|
||||
<? endif; ?>
|
||||
<li class="last"><?php echo $html->link('Job List', '/jobs/index'); ?></li>
|
||||
|
||||
</ul>
|
||||
|
|
@ -94,8 +92,8 @@
|
|||
<li class=""><?php echo $html->link('Direct Shipments', '/shipments/index/direct'); ?></li>
|
||||
<li class=""><?php echo $html->link('Export Shipments', '/shipments/index/export'); ?></li>
|
||||
<li class=""><?php echo $html->link('Local Shipments', '/shipments/index/local'); ?></li>
|
||||
<li class=""><?php echo $html->link('Monthly Deferred GST', '/shipments/reports'); ?></li>
|
||||
<li class="last"><?php echo $html->link('Freight Forwarders', '/freight_forwarders'); ?></li>
|
||||
<li class=""><?php echo $html->link('Monthly Deferred GST', '/shipments/reports'); ?></li>
|
||||
<li class="last"><?php echo $html->link('Freight Forwarders', '/freight_forwarders'); ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
|
@ -137,7 +135,7 @@
|
|||
</ul>
|
||||
</li>
|
||||
|
||||
<?php /* <li> echo $html->link('Users', '/users/index'); ?>
|
||||
<?php /* <li> echo $html->link('Users', '/users/index'); ?>
|
||||
<ul>
|
||||
<li> echo $html->link('Users Index', '/users/index'); </li>
|
||||
<li class="last"><?php echo $html->link('Add User', '/users/add'); </li>
|
||||
|
|
@ -152,12 +150,12 @@
|
|||
</ul>
|
||||
</li>
|
||||
|
||||
<?
|
||||
if ($currentuser['User']['access_level'] == 'manager' || $currentuser['User']['access_level'] == 'admin'):
|
||||
?>
|
||||
<li class="extra"><?=$html->link('Admin', '/admin'); ?>
|
||||
</li>
|
||||
<? endif; ?>
|
||||
<?
|
||||
if ($currentuser['User']['access_level'] == 'manager' || $currentuser['User']['access_level'] == 'admin'):
|
||||
?>
|
||||
<li class="extra"><?=$html->link('Admin', '/admin'); ?>
|
||||
</li>
|
||||
<? endif; ?>
|
||||
|
||||
|
||||
</ul>
|
||||
|
|
@ -166,24 +164,24 @@
|
|||
|
||||
</div>
|
||||
<div id="content">
|
||||
<?php
|
||||
if ($session->check('Message.flash')):
|
||||
$session->flash();
|
||||
endif;
|
||||
?>
|
||||
<?php
|
||||
if ($session->check('Message.flash')):
|
||||
$session->flash();
|
||||
endif;
|
||||
?>
|
||||
<div id="globalAjaxLoading">
|
||||
<h3>Loading, please wait</h3>
|
||||
<?php echo $html->image('ajax-loader.gif'); ?>
|
||||
</div>
|
||||
<?php echo $content_for_layout; ?>
|
||||
<h3>Loading, please wait</h3>
|
||||
<?php echo $html->image('ajax-loader.gif'); ?>
|
||||
</div>
|
||||
<?php echo $content_for_layout; ?>
|
||||
|
||||
</div>
|
||||
<div id="footer">
|
||||
<?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
|
||||
);
|
||||
?>
|
||||
<?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,51 +189,52 @@
|
|||
|
||||
|
||||
|
||||
<?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();
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<div id="ajaxLoading">
|
||||
<h2>Loading, please wait..</h2>
|
||||
<?php echo $html->image('ajax-loader.gif'); ?>
|
||||
</div>
|
||||
<h2>Loading, please wait..</h2>
|
||||
<?php echo $html->image('ajax-loader.gif'); ?>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="results"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
$mem_usage = memory_get_usage(true);
|
||||
<?php
|
||||
|
||||
if ($mem_usage < 1024)
|
||||
echo $mem_usage . " bytes";
|
||||
elseif ($mem_usage < 1048576)
|
||||
echo round($mem_usage / 1024, 2) . " kilobytes";
|
||||
else
|
||||
echo round($mem_usage / 1048576, 2) . " megabytes";
|
||||
echo "<br/>";
|
||||
?>
|
||||
$mem_usage = memory_get_usage(true);
|
||||
|
||||
if ($mem_usage < 1024)
|
||||
echo $mem_usage . " bytes";
|
||||
elseif ($mem_usage < 1048576)
|
||||
echo round($mem_usage / 1024, 2) . " kilobytes";
|
||||
else
|
||||
echo round($mem_usage / 1048576, 2) . " megabytes";
|
||||
echo "<br/>";
|
||||
?>
|
||||
|
||||
|
||||
<?php // debug($currentuser); ?>
|
||||
<?php // debug($currentuser); ?>
|
||||
|
||||
<?php echo $cakeDebug; ?>
|
||||
<?php echo $cakeDebug; ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,143 +1,152 @@
|
|||
<script type="text/javascript">
|
||||
|
||||
$(function() {
|
||||
$('button').button();
|
||||
});
|
||||
$(function() {
|
||||
$('button').button();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<table class="lineItems">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ITEM<br>NO.</th>
|
||||
<th>QTY</th>
|
||||
<th>DESCRIPTION</th>
|
||||
<th>UNIT<br>PRICE</th>
|
||||
<th>TOTAL<br>PRICE</th>
|
||||
<th>ACTIONS</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th><?=$currencyCode?></th>
|
||||
<th><?=$currencyCode?></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>ITEM<br>NO.</th>
|
||||
<th>QTY</th>
|
||||
<th>DESCRIPTION</th>
|
||||
<th>UNIT<br>PRICE</th>
|
||||
<th>TOTAL<br>PRICE</th>
|
||||
<th>ACTIONS</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th><?=$currencyCode?></th>
|
||||
<th><?=$currencyCode?></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
$hasOptions = false;
|
||||
<?
|
||||
$hasOptions = false;
|
||||
|
||||
foreach($document['LineItem'] as $li):?>
|
||||
<tr class="lineItem">
|
||||
<td>
|
||||
<? if($li['option'] == 1) {
|
||||
echo 'Option<br>';
|
||||
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) {
|
||||
echo 'Option<br>';
|
||||
|
||||
$hasOptions = true;
|
||||
}
|
||||
?>
|
||||
<?=$li['item_number'];?></td>
|
||||
<td><?=$li['quantity'];?></td>
|
||||
<td class="description">
|
||||
<?=$li['title'];?><br>
|
||||
<?=$li['description'];?>
|
||||
</td>
|
||||
<td class="price">
|
||||
<?
|
||||
if($li['has_text_prices']):
|
||||
echo $li['unit_price_string'];
|
||||
?>
|
||||
<?
|
||||
else:
|
||||
?>
|
||||
<?=$number->currency($li['gross_unit_price'], $currencyCode);?>
|
||||
<? if($li['discount_percent']):?>
|
||||
<br>less<br><?=$li['discount_percent']?>%<br>
|
||||
discount<br>
|
||||
(-<?=$number->currency($li['discount_amount_unit'], $currencyCode);?>)<br>
|
||||
=<br>
|
||||
<?=$number->currency($li['net_unit_price'], $currencyCode);?>
|
||||
<?endif;?>
|
||||
<? 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>
|
||||
discount<br>
|
||||
<?=$number->currency($li['discount_amount_total'], $currencyCode);?>)<br>
|
||||
=<br>
|
||||
<?=$number->currency($li['net_price'], $currencyCode);?>
|
||||
<?endif;?>
|
||||
<?endif;?>
|
||||
</td>
|
||||
<td id="<?=$li['id'];?>">
|
||||
<button class="editLineItem">Edit</button><br>
|
||||
<button class="removeLineItem">Remove</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?endforeach;?>
|
||||
$hasOptions = true;
|
||||
}
|
||||
?>
|
||||
<?=$li['item_number'];?></td>
|
||||
<td><?=$li['quantity'];?></td>
|
||||
<td class="description">
|
||||
<?=$li['title'];?><br>
|
||||
<?=$li['description'];?>
|
||||
</td>
|
||||
<td class="price">
|
||||
<?
|
||||
if($li['has_text_prices']):
|
||||
echo $li['unit_price_string'];
|
||||
?>
|
||||
<?
|
||||
else:
|
||||
?>
|
||||
<?=$number->currency($li['gross_unit_price'], $currencyCode);?>
|
||||
<? if($li['discount_percent']):?>
|
||||
<br>less<br><?=$li['discount_percent']?>%<br>
|
||||
discount<br>
|
||||
(-<?=$number->currency($li['discount_amount_unit'], $currencyCode);?>)<br>
|
||||
=<br>
|
||||
<?=$number->currency($li['net_unit_price'], $currencyCode);?>
|
||||
<?endif;?>
|
||||
<? 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>
|
||||
discount<br>
|
||||
<?=$number->currency($li['discount_amount_total'], $currencyCode);?>)<br>
|
||||
=<br>
|
||||
<?=$number->currency($li['net_price'], $currencyCode);?>
|
||||
<?endif;?>
|
||||
<?endif;?>
|
||||
</td>
|
||||
<td id="<?=$li['id'];?>">
|
||||
<button class="editLineItem">Edit</button><br>
|
||||
<button class="removeLineItem">Remove</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="leftAlign">SUB-TOTAL (Excluding GST)</td>
|
||||
<td></td>
|
||||
<td><?
|
||||
if(!$hasOptions) {
|
||||
echo $number->currency($totals['subtotal'], $currencyCode);
|
||||
}
|
||||
else {
|
||||
echo $currencySymbol.'TBA';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="leftAlign">SUB-TOTAL (Excluding GST)</td>
|
||||
<td></td>
|
||||
<td><?
|
||||
if(!$hasOptions) {
|
||||
echo $number->currency($totals['subtotal'], $currencyCode);
|
||||
}
|
||||
else {
|
||||
echo $currencySymbol.'TBA';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="leftAlign">GST (10%)</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<?
|
||||
if(!$hasOptions) {
|
||||
echo $number->currency($totals['gst'], $currencyCode);
|
||||
}
|
||||
else {
|
||||
echo $currencySymbol.'TBA';
|
||||
}
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="leftAlign">GST (10%)</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<?
|
||||
if(!$hasOptions) {
|
||||
echo $number->currency($totals['gst'], $currencyCode);
|
||||
}
|
||||
else {
|
||||
echo $currencySymbol.'TBA';
|
||||
}
|
||||
|
||||
?>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="leftAlign">TOTAL PAYABLE (INCLUDING GST)</td>
|
||||
<td></td>
|
||||
<td><?
|
||||
if(!$hasOptions) {
|
||||
echo $number->currency($totals['total'], $currencyCode);
|
||||
}
|
||||
else {
|
||||
echo $currencySymbol.'TBA';
|
||||
}
|
||||
?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
?>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="leftAlign">TOTAL PAYABLE (INCLUDING GST)</td>
|
||||
<td></td>
|
||||
<td><?
|
||||
if(!$hasOptions) {
|
||||
echo $number->currency($totals['total'], $currencyCode);
|
||||
}
|
||||
else {
|
||||
echo $currencySymbol.'TBA';
|
||||
}
|
||||
?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -1642,4 +1642,10 @@ div.warning {
|
|||
|
||||
#extraModels li {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tr.no_items {
|
||||
font-size: 2em;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue