Reports dont count On Hold or Cancelled jobs
This commit is contained in:
parent
f6e8427c3b
commit
1300916053
21
views/boxes/add.ctp
Normal file
21
views/boxes/add.ctp
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
<div class="boxes form">
|
||||||
|
<?php echo $form->create('Box');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Add Box');?></legend>
|
||||||
|
<?php
|
||||||
|
echo $form->input('shipment_id');
|
||||||
|
echo $form->input('length');
|
||||||
|
echo $form->input('width');
|
||||||
|
echo $form->input('height');
|
||||||
|
echo $form->input('weight');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $form->end('Submit');?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $html->link(__('List Boxes', true), array('action' => 'index'));?></li>
|
||||||
|
<li><?php echo $html->link(__('List Shipments', true), array('controller' => 'shipments', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Shipment', true), array('controller' => 'shipments', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
23
views/boxes/edit.ctp
Normal file
23
views/boxes/edit.ctp
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
<div class="boxes form">
|
||||||
|
<?php echo $form->create('Box');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Edit Box');?></legend>
|
||||||
|
<?php
|
||||||
|
echo $form->input('id');
|
||||||
|
echo $form->input('shipment_id');
|
||||||
|
echo $form->input('length');
|
||||||
|
echo $form->input('width');
|
||||||
|
echo $form->input('height');
|
||||||
|
echo $form->input('weight');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $form->end('Submit');?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $html->link(__('Delete', true), array('action' => 'delete', $form->value('Box.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $form->value('Box.id'))); ?></li>
|
||||||
|
<li><?php echo $html->link(__('List Boxes', true), array('action' => 'index'));?></li>
|
||||||
|
<li><?php echo $html->link(__('List Shipments', true), array('controller' => 'shipments', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Shipment', true), array('controller' => 'shipments', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
66
views/boxes/index.ctp
Normal file
66
views/boxes/index.ctp
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
<div class="boxes index">
|
||||||
|
<h2><?php __('Boxes');?></h2>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
echo $paginator->counter(array(
|
||||||
|
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
|
||||||
|
));
|
||||||
|
?></p>
|
||||||
|
<table cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<th><?php echo $paginator->sort('id');?></th>
|
||||||
|
<th><?php echo $paginator->sort('shipment_id');?></th>
|
||||||
|
<th><?php echo $paginator->sort('length');?></th>
|
||||||
|
<th><?php echo $paginator->sort('width');?></th>
|
||||||
|
<th><?php echo $paginator->sort('height');?></th>
|
||||||
|
<th><?php echo $paginator->sort('weight');?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($boxes as $box):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td>
|
||||||
|
<?php echo $box['Box']['id']; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $html->link($box['Shipment']['id'], array('controller' => 'shipments', 'action' => 'view', $box['Shipment']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $box['Box']['length']; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $box['Box']['width']; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $box['Box']['height']; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $box['Box']['weight']; ?>
|
||||||
|
</td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $html->link(__('View', true), array('action' => 'view', $box['Box']['id'])); ?>
|
||||||
|
<?php echo $html->link(__('Edit', true), array('action' => 'edit', $box['Box']['id'])); ?>
|
||||||
|
<?php echo $html->link(__('Delete', true), array('action' => 'delete', $box['Box']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $box['Box']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="paging">
|
||||||
|
<?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
|
||||||
|
| <?php echo $paginator->numbers();?>
|
||||||
|
<?php echo $paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $html->link(__('New Box', true), array('action' => 'add')); ?></li>
|
||||||
|
<li><?php echo $html->link(__('List Shipments', true), array('controller' => 'shipments', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Shipment', true), array('controller' => 'shipments', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
45
views/boxes/view.ctp
Normal file
45
views/boxes/view.ctp
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
<div class="boxes view">
|
||||||
|
<h2><?php __('Box');?></h2>
|
||||||
|
<dl><?php $i = 0; $class = ' class="altrow"';?>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $box['Box']['id']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Shipment'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $html->link($box['Shipment']['id'], array('controller' => 'shipments', 'action' => 'view', $box['Shipment']['id'])); ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Length'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $box['Box']['length']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Width'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $box['Box']['width']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Height'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $box['Box']['height']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Weight'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $box['Box']['weight']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $html->link(__('Edit Box', true), array('action' => 'edit', $box['Box']['id'])); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('Delete Box', true), array('action' => 'delete', $box['Box']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $box['Box']['id'])); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Boxes', true), array('action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Box', true), array('action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Shipments', true), array('controller' => 'shipments', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Shipment', true), array('controller' => 'shipments', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
15
views/freight_forwarders/add.ctp
Normal file
15
views/freight_forwarders/add.ctp
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
<div class="freightForwarders form">
|
||||||
|
<?php echo $form->create('FreightForwarder');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Add FreightForwarder');?></legend>
|
||||||
|
<?php
|
||||||
|
echo $form->input('name');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $form->end('Submit');?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $html->link(__('List FreightForwarders', true), array('action' => 'index'));?></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
17
views/freight_forwarders/edit.ctp
Normal file
17
views/freight_forwarders/edit.ctp
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
<div class="freightForwarders form">
|
||||||
|
<?php echo $form->create('FreightForwarder');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Edit FreightForwarder');?></legend>
|
||||||
|
<?php
|
||||||
|
echo $form->input('id');
|
||||||
|
echo $form->input('name');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $form->end('Submit');?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $html->link(__('Delete', true), array('action' => 'delete', $form->value('FreightForwarder.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $form->value('FreightForwarder.id'))); ?></li>
|
||||||
|
<li><?php echo $html->link(__('List FreightForwarders', true), array('action' => 'index'));?></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
48
views/freight_forwarders/index.ctp
Normal file
48
views/freight_forwarders/index.ctp
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
<div class="freightForwarders index">
|
||||||
|
<h2><?php __('FreightForwarders');?></h2>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
echo $paginator->counter(array(
|
||||||
|
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
|
||||||
|
));
|
||||||
|
?></p>
|
||||||
|
<table cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<th><?php echo $paginator->sort('id');?></th>
|
||||||
|
<th><?php echo $paginator->sort('name');?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($freightForwarders as $freightForwarder):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td>
|
||||||
|
<?php echo $freightForwarder['FreightForwarder']['id']; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $freightForwarder['FreightForwarder']['name']; ?>
|
||||||
|
</td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $html->link(__('View', true), array('action' => 'view', $freightForwarder['FreightForwarder']['id'])); ?>
|
||||||
|
<?php echo $html->link(__('Edit', true), array('action' => 'edit', $freightForwarder['FreightForwarder']['id'])); ?>
|
||||||
|
<?php echo $html->link(__('Delete', true), array('action' => 'delete', $freightForwarder['FreightForwarder']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $freightForwarder['FreightForwarder']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="paging">
|
||||||
|
<?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
|
||||||
|
| <?php echo $paginator->numbers();?>
|
||||||
|
<?php echo $paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $html->link(__('New FreightForwarder', true), array('action' => 'add')); ?></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
23
views/freight_forwarders/view.ctp
Normal file
23
views/freight_forwarders/view.ctp
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
<div class="freightForwarders view">
|
||||||
|
<h2><?php __('FreightForwarder');?></h2>
|
||||||
|
<dl><?php $i = 0; $class = ' class="altrow"';?>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $freightForwarder['FreightForwarder']['id']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Name'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $freightForwarder['FreightForwarder']['name']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $html->link(__('Edit FreightForwarder', true), array('action' => 'edit', $freightForwarder['FreightForwarder']['id'])); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('Delete FreightForwarder', true), array('action' => 'delete', $freightForwarder['FreightForwarder']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $freightForwarder['FreightForwarder']['id'])); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List FreightForwarders', true), array('action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New FreightForwarder', true), array('action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo $javascript->link('jquery.chromatable');
|
|
||||||
echo $javascript->link('job_index');
|
echo $javascript->link('job_index');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
<th>Enquiry Number</th>
|
<th>Enquiry Number</th>
|
||||||
<th>Principle</th>
|
<th>Principle</th>
|
||||||
<th>Customer</th>
|
<th>Customer</th>
|
||||||
|
<th>Status</th>
|
||||||
<th>Sale Currency</th>
|
<th>Sale Currency</th>
|
||||||
<th>Gross Sales AUD</th>
|
<th>Gross Sales AUD</th>
|
||||||
<th>Net Sales AUD</th>
|
<th>Net Sales AUD</th>
|
||||||
|
|
@ -51,7 +52,18 @@
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?foreach($jobs as $job):?>
|
<?foreach($jobs as $job):?>
|
||||||
<tr>
|
|
||||||
|
<? if($job['Job']['job_status'] == 'JOB CANCELLED' || $job['Job']['job_status'] == 'JOB ON HOLD' ) {
|
||||||
|
$class='cancelled';
|
||||||
|
$doCount = false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$class ='';
|
||||||
|
$doCount = true;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr class="<?=$class?>">
|
||||||
<td><?=$job['Job']['date_order_received'];?></td>
|
<td><?=$job['Job']['date_order_received'];?></td>
|
||||||
<td class="nowrap"><?=$html->link($job['Job']['title'], array('controller'=>'jobs', 'action'=>'view', $job['Job']['id']));?>
|
<td class="nowrap"><?=$html->link($job['Job']['title'], array('controller'=>'jobs', 'action'=>'view', $job['Job']['id']));?>
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -62,21 +74,36 @@
|
||||||
|
|
||||||
<td><?=$html->link($job['Customer']['name'], array('controller'=>'customers','action'=>'view', $job['Customer']['id']));?></td>
|
<td><?=$html->link($job['Customer']['name'], array('controller'=>'customers','action'=>'view', $job['Customer']['id']));?></td>
|
||||||
|
|
||||||
|
<td><?=$job['Job']['job_status'];?></td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<?=$job['Currency']['name'];?>
|
<?=$job['Currency']['name'];?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<?=$job['Job']['company_gross_sales_aud'];?>
|
<?=$job['Job']['company_gross_sales_aud'];?>
|
||||||
<? $gross_sales_aud_total += $job['Job']['company_gross_sales_aud']; ?>
|
<?
|
||||||
|
if($doCount) {
|
||||||
|
$gross_sales_aud_total += $job['Job']['company_gross_sales_aud'];
|
||||||
|
}
|
||||||
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?=$job['Job']['net_sales_aud'];?>
|
<?=$job['Job']['net_sales_aud'];?>
|
||||||
<? $net_sales_aud_total += $job['Job']['net_sales_aud']; ?>
|
<?
|
||||||
|
if($doCount) {
|
||||||
|
$net_sales_aud_total += $job['Job']['net_sales_aud'];
|
||||||
|
|
||||||
|
} ?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?=$job['Job']['gross_profit_aud'];?>
|
<?=$job['Job']['gross_profit_aud'];?>
|
||||||
<? $gross_profit_total += $job['Job']['gross_profit_aud']; ?>
|
<?
|
||||||
|
if($doCount) {
|
||||||
|
$gross_profit_total += $job['Job']['gross_profit_aud'];
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
|
|
@ -90,40 +117,60 @@
|
||||||
<?=$job['Job']['ato_exchange_rate'];?>
|
<?=$job['Job']['ato_exchange_rate'];?>
|
||||||
</td>
|
</td>
|
||||||
<td> <?=$job['Job']['gross_australian_sales_foreign_currency'];?>
|
<td> <?=$job['Job']['gross_australian_sales_foreign_currency'];?>
|
||||||
<? $gross_australian_sales_foreign_currency_total += $job['Job']['gross_australian_sales_foreign_currency']; ?>
|
<?
|
||||||
|
if($doCount) {
|
||||||
|
$gross_australian_sales_foreign_currency_total += $job['Job']['gross_australian_sales_foreign_currency']; }
|
||||||
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?=$job['Job']['net_australian_sales_foreign_currency'];
|
<?=$job['Job']['net_australian_sales_foreign_currency'];
|
||||||
$net_australian_sales_foreign_currency_total += $job['Job']['net_australian_sales_foreign_currency'];
|
if($doCount) {
|
||||||
|
$net_australian_sales_foreign_currency_total += $job['Job']['net_australian_sales_foreign_currency'];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td> <?=$job['Job']['gross_profit_value_australian_sales_foreign_currency'];
|
<td> <?=$job['Job']['gross_profit_value_australian_sales_foreign_currency'];
|
||||||
$gross_profit_value_australian_sales_foreign_currency_total += $job['Job']['gross_profit_value_australian_sales_foreign_currency'];
|
if($doCount) {
|
||||||
|
$gross_profit_value_australian_sales_foreign_currency_total += $job['Job']['gross_profit_value_australian_sales_foreign_currency'];
|
||||||
|
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?=$job['Job']['gross_export_sales_foreign_currency'];
|
<?=$job['Job']['gross_export_sales_foreign_currency'];
|
||||||
$gross_export_sales_foreign_currency_total += $job['Job']['gross_export_sales_foreign_currency'];
|
|
||||||
|
if($doCount) {
|
||||||
|
|
||||||
|
$gross_export_sales_foreign_currency_total += $job['Job']['gross_export_sales_foreign_currency'];
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td> <?=$job['Job']['net_export_sales_foreign_currency'];
|
<td> <?=$job['Job']['net_export_sales_foreign_currency'];
|
||||||
$net_export_sales_foreign_currency_total += $job['Job']['net_export_sales_foreign_currency'];
|
if($doCount) {
|
||||||
|
$net_export_sales_foreign_currency_total += $job['Job']['net_export_sales_foreign_currency'];
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td> <?=$job['Job']['gross_profit_value_after_discount_exports_foreign_currency'];
|
<td> <?=$job['Job']['gross_profit_value_after_discount_exports_foreign_currency'];
|
||||||
|
|
||||||
$gross_profit_value_after_discount_exports_foreign_currency_total += $job['Job']['gross_profit_value_after_discount_exports_foreign_currency'];
|
if($doCount) {
|
||||||
|
$gross_profit_value_after_discount_exports_foreign_currency_total += $job['Job']['gross_profit_value_after_discount_exports_foreign_currency'];
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?=$job['Job']['gross_commissions'];
|
<?=$job['Job']['gross_commissions'];
|
||||||
$gross_commissions_total += $job['Job']['gross_commissions'];
|
if($doCount) {
|
||||||
|
$gross_commissions_total += $job['Job']['gross_commissions'];
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td> <?=$job['Job']['net_commissions'];
|
<td> <?=$job['Job']['net_commissions'];
|
||||||
$net_commissions_total += $job['Job']['net_commissions'];
|
if($doCount) {
|
||||||
|
$net_commissions_total += $job['Job']['net_commissions'];
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -139,6 +186,7 @@
|
||||||
<td><? //Enq No ?></td>
|
<td><? //Enq No ?></td>
|
||||||
<td><? //Principle ?></td>
|
<td><? //Principle ?></td>
|
||||||
<td><? //Customer ?></td>
|
<td><? //Customer ?></td>
|
||||||
|
<td><?//Status ?></td>
|
||||||
<td><? //Sale Currency?></td>
|
<td><? //Sale Currency?></td>
|
||||||
<td><?=$number->currency($gross_sales_aud_total)?></td>
|
<td><?=$number->currency($gross_sales_aud_total)?></td>
|
||||||
<td><?=$number->currency($net_sales_aud_total)?></td>
|
<td><?=$number->currency($net_sales_aud_total)?></td>
|
||||||
|
|
|
||||||
|
|
@ -56,16 +56,24 @@
|
||||||
|
|
||||||
<div id = "navdiv">
|
<div id = "navdiv">
|
||||||
<ul id="nav">
|
<ul id="nav">
|
||||||
<li><?php echo $html->link('Enquiries', '/enquiries/index'); ?><ul>
|
<li><?php echo $html->link('Enquiries', '/enquiries/index'); ?>
|
||||||
|
<ul>
|
||||||
<li class="last"><?php echo $html->link('Enquiry Register', '/enquiries/index'); ?></li>
|
<li class="last"><?php echo $html->link('Enquiry Register', '/enquiries/index'); ?></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li><?php echo $html->link('Jobs', '/jobs/index'); ?><ul>
|
<li><?php echo $html->link('Jobs', '/jobs/index'); ?>
|
||||||
|
<ul>
|
||||||
<li class="last"><?php echo $html->link('Job List', '/jobs/index'); ?></li>
|
<li class="last"><?php echo $html->link('Job List', '/jobs/index'); ?></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li><?php echo $html->link('Shipments','/shipments/index');?>
|
||||||
|
<ul>
|
||||||
|
<li class="last"><?php echo $html->link('Shipments List', '/shipments/index');?></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li><?php echo $html->link('Customers', '/customers/index'); ?>
|
<li><?php echo $html->link('Customers', '/customers/index'); ?>
|
||||||
<ul>
|
<ul>
|
||||||
<li><?php echo $html->link('Customer Index', '/customers/index'); ?></li>
|
<li><?php echo $html->link('Customer Index', '/customers/index'); ?></li>
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ echo $paginator->counter(array(
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<th><?php echo $paginator->sort('name');?></th>
|
<th><?php echo $paginator->sort('name');?></th>
|
||||||
|
<th>Short Name</th>
|
||||||
<th><?php echo $paginator->sort('code');?></th>
|
<th><?php echo $paginator->sort('code');?></th>
|
||||||
<th><?php echo $paginator->sort('country_id');?></th>
|
<th><?php echo $paginator->sort('country_id');?></th>
|
||||||
<th><?php echo $paginator->sort('currency_id');?></th>
|
<th><?php echo $paginator->sort('currency_id');?></th>
|
||||||
|
|
@ -28,6 +29,9 @@ foreach ($principles as $principle):
|
||||||
<td>
|
<td>
|
||||||
<?php echo $principle['Principle']['name']; ?>
|
<?php echo $principle['Principle']['name']; ?>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $principle['Principle']['short_name'];?>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?php echo $principle['Principle']['code']; ?>
|
<?php echo $principle['Principle']['code']; ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
28
views/shipment_invoices/add.ctp
Normal file
28
views/shipment_invoices/add.ctp
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
<div class="shipmentInvoices form">
|
||||||
|
<?php echo $form->create('ShipmentInvoice');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Add ShipmentInvoice');?></legend>
|
||||||
|
<?php
|
||||||
|
echo $form->input('shipment_id');
|
||||||
|
echo $form->input('principle_id');
|
||||||
|
echo $form->input('currency_id');
|
||||||
|
echo $form->input('invoice_number');
|
||||||
|
echo $form->input('invoice_amount');
|
||||||
|
echo $form->input('deferred_gst');
|
||||||
|
echo $form->input('approved');
|
||||||
|
echo $form->input('invoice_type');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $form->end('Submit');?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $html->link(__('List ShipmentInvoices', true), array('action' => 'index'));?></li>
|
||||||
|
<li><?php echo $html->link(__('List Shipments', true), array('controller' => 'shipments', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Shipment', true), array('controller' => 'shipments', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Principles', true), array('controller' => 'principles', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Principle', true), array('controller' => 'principles', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Currencies', true), array('controller' => 'currencies', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Currency', true), array('controller' => 'currencies', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
30
views/shipment_invoices/edit.ctp
Normal file
30
views/shipment_invoices/edit.ctp
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
<div class="shipmentInvoices form">
|
||||||
|
<?php echo $form->create('ShipmentInvoice');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Edit ShipmentInvoice');?></legend>
|
||||||
|
<?php
|
||||||
|
echo $form->input('id');
|
||||||
|
echo $form->input('shipment_id');
|
||||||
|
echo $form->input('principle_id');
|
||||||
|
echo $form->input('currency_id');
|
||||||
|
echo $form->input('invoice_number');
|
||||||
|
echo $form->input('invoice_amount');
|
||||||
|
echo $form->input('deferred_gst');
|
||||||
|
echo $form->input('approved');
|
||||||
|
echo $form->input('invoice_type');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $form->end('Submit');?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $html->link(__('Delete', true), array('action' => 'delete', $form->value('ShipmentInvoice.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $form->value('ShipmentInvoice.id'))); ?></li>
|
||||||
|
<li><?php echo $html->link(__('List ShipmentInvoices', true), array('action' => 'index'));?></li>
|
||||||
|
<li><?php echo $html->link(__('List Shipments', true), array('controller' => 'shipments', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Shipment', true), array('controller' => 'shipments', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Principles', true), array('controller' => 'principles', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Principle', true), array('controller' => 'principles', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Currencies', true), array('controller' => 'currencies', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Currency', true), array('controller' => 'currencies', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
82
views/shipment_invoices/index.ctp
Normal file
82
views/shipment_invoices/index.ctp
Normal file
|
|
@ -0,0 +1,82 @@
|
||||||
|
<div class="shipmentInvoices index">
|
||||||
|
<h2><?php __('ShipmentInvoices');?></h2>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
echo $paginator->counter(array(
|
||||||
|
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
|
||||||
|
));
|
||||||
|
?></p>
|
||||||
|
<table cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<th><?php echo $paginator->sort('id');?></th>
|
||||||
|
<th><?php echo $paginator->sort('shipment_id');?></th>
|
||||||
|
<th><?php echo $paginator->sort('principle_id');?></th>
|
||||||
|
<th><?php echo $paginator->sort('currency_id');?></th>
|
||||||
|
<th><?php echo $paginator->sort('invoice_number');?></th>
|
||||||
|
<th><?php echo $paginator->sort('invoice_amount');?></th>
|
||||||
|
<th><?php echo $paginator->sort('deferred_gst');?></th>
|
||||||
|
<th><?php echo $paginator->sort('approved');?></th>
|
||||||
|
<th><?php echo $paginator->sort('invoice_type');?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($shipmentInvoices as $shipmentInvoice):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td>
|
||||||
|
<?php echo $shipmentInvoice['ShipmentInvoice']['id']; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $html->link($shipmentInvoice['Shipment']['id'], array('controller' => 'shipments', 'action' => 'view', $shipmentInvoice['Shipment']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $html->link($shipmentInvoice['Principle']['name'], array('controller' => 'principles', 'action' => 'view', $shipmentInvoice['Principle']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $html->link($shipmentInvoice['Currency']['name'], array('controller' => 'currencies', 'action' => 'view', $shipmentInvoice['Currency']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $shipmentInvoice['ShipmentInvoice']['invoice_number']; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $shipmentInvoice['ShipmentInvoice']['invoice_amount']; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $shipmentInvoice['ShipmentInvoice']['deferred_gst']; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $shipmentInvoice['ShipmentInvoice']['approved']; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $shipmentInvoice['ShipmentInvoice']['invoice_type']; ?>
|
||||||
|
</td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $html->link(__('View', true), array('action' => 'view', $shipmentInvoice['ShipmentInvoice']['id'])); ?>
|
||||||
|
<?php echo $html->link(__('Edit', true), array('action' => 'edit', $shipmentInvoice['ShipmentInvoice']['id'])); ?>
|
||||||
|
<?php echo $html->link(__('Delete', true), array('action' => 'delete', $shipmentInvoice['ShipmentInvoice']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $shipmentInvoice['ShipmentInvoice']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="paging">
|
||||||
|
<?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
|
||||||
|
| <?php echo $paginator->numbers();?>
|
||||||
|
<?php echo $paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $html->link(__('New ShipmentInvoice', true), array('action' => 'add')); ?></li>
|
||||||
|
<li><?php echo $html->link(__('List Shipments', true), array('controller' => 'shipments', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Shipment', true), array('controller' => 'shipments', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Principles', true), array('controller' => 'principles', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Principle', true), array('controller' => 'principles', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Currencies', true), array('controller' => 'currencies', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Currency', true), array('controller' => 'currencies', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
64
views/shipment_invoices/view.ctp
Normal file
64
views/shipment_invoices/view.ctp
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
<div class="shipmentInvoices view">
|
||||||
|
<h2><?php __('ShipmentInvoice');?></h2>
|
||||||
|
<dl><?php $i = 0; $class = ' class="altrow"';?>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $shipmentInvoice['ShipmentInvoice']['id']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Shipment'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $html->link($shipmentInvoice['Shipment']['id'], array('controller' => 'shipments', 'action' => 'view', $shipmentInvoice['Shipment']['id'])); ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Principle'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $html->link($shipmentInvoice['Principle']['name'], array('controller' => 'principles', 'action' => 'view', $shipmentInvoice['Principle']['id'])); ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Currency'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $html->link($shipmentInvoice['Currency']['name'], array('controller' => 'currencies', 'action' => 'view', $shipmentInvoice['Currency']['id'])); ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Invoice Number'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $shipmentInvoice['ShipmentInvoice']['invoice_number']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Invoice Amount'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $shipmentInvoice['ShipmentInvoice']['invoice_amount']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Deferred Gst'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $shipmentInvoice['ShipmentInvoice']['deferred_gst']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Approved'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $shipmentInvoice['ShipmentInvoice']['approved']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Invoice Type'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $shipmentInvoice['ShipmentInvoice']['invoice_type']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $html->link(__('Edit ShipmentInvoice', true), array('action' => 'edit', $shipmentInvoice['ShipmentInvoice']['id'])); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('Delete ShipmentInvoice', true), array('action' => 'delete', $shipmentInvoice['ShipmentInvoice']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $shipmentInvoice['ShipmentInvoice']['id'])); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List ShipmentInvoices', true), array('action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New ShipmentInvoice', true), array('action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Shipments', true), array('controller' => 'shipments', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Shipment', true), array('controller' => 'shipments', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Principles', true), array('controller' => 'principles', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Principle', true), array('controller' => 'principles', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Currencies', true), array('controller' => 'currencies', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Currency', true), array('controller' => 'currencies', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
35
views/shipments/add.ctp
Normal file
35
views/shipments/add.ctp
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
<div class="shipments form">
|
||||||
|
<?php echo $form->create('Shipment');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Add Shipment');?></legend>
|
||||||
|
<?php
|
||||||
|
echo $form->input('box_count');
|
||||||
|
echo $form->input('freight_forwarder_id');
|
||||||
|
echo $form->input('date_arrived');
|
||||||
|
echo $form->input('date_dispatched');
|
||||||
|
echo $form->input('airway_bill');
|
||||||
|
echo $form->input('comments');
|
||||||
|
echo $form->input('Job');
|
||||||
|
echo $form->input('Principle');
|
||||||
|
echo $form->input('PurchaseOrder');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $form->end('Submit');?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $html->link(__('List Shipments', true), array('action' => 'index'));?></li>
|
||||||
|
<li><?php echo $html->link(__('List Freight Forwarders', true), array('controller' => 'freight_forwarders', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Freight Forwarder', true), array('controller' => 'freight_forwarders', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Boxes', true), array('controller' => 'boxes', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Box', true), array('controller' => 'boxes', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Shipment Invoices', true), array('controller' => 'shipment_invoices', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Shipment Invoice', true), array('controller' => 'shipment_invoices', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Jobs', true), array('controller' => 'jobs', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Job', true), array('controller' => 'jobs', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Principles', true), array('controller' => 'principles', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Principle', true), array('controller' => 'principles', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Purchase Orders', true), array('controller' => 'purchase_orders', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Purchase Order', true), array('controller' => 'purchase_orders', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
37
views/shipments/edit.ctp
Normal file
37
views/shipments/edit.ctp
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
<div class="shipments form">
|
||||||
|
<?php echo $form->create('Shipment');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Edit Shipment');?></legend>
|
||||||
|
<?php
|
||||||
|
echo $form->input('id');
|
||||||
|
echo $form->input('box_count');
|
||||||
|
echo $form->input('freight_forwarder_id');
|
||||||
|
echo $form->input('date_arrived');
|
||||||
|
echo $form->input('date_dispatched');
|
||||||
|
echo $form->input('airway_bill');
|
||||||
|
echo $form->input('comments');
|
||||||
|
echo $form->input('Job');
|
||||||
|
echo $form->input('Principle');
|
||||||
|
echo $form->input('PurchaseOrder');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $form->end('Submit');?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $html->link(__('Delete', true), array('action' => 'delete', $form->value('Shipment.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $form->value('Shipment.id'))); ?></li>
|
||||||
|
<li><?php echo $html->link(__('List Shipments', true), array('action' => 'index'));?></li>
|
||||||
|
<li><?php echo $html->link(__('List Freight Forwarders', true), array('controller' => 'freight_forwarders', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Freight Forwarder', true), array('controller' => 'freight_forwarders', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Boxes', true), array('controller' => 'boxes', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Box', true), array('controller' => 'boxes', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Shipment Invoices', true), array('controller' => 'shipment_invoices', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Shipment Invoice', true), array('controller' => 'shipment_invoices', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Jobs', true), array('controller' => 'jobs', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Job', true), array('controller' => 'jobs', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Principles', true), array('controller' => 'principles', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Principle', true), array('controller' => 'principles', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Purchase Orders', true), array('controller' => 'purchase_orders', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Purchase Order', true), array('controller' => 'purchase_orders', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
126
views/shipments/index.ctp
Normal file
126
views/shipments/index.ctp
Normal file
|
|
@ -0,0 +1,126 @@
|
||||||
|
<div class="shipments index">
|
||||||
|
<h2><?php __('Shipments');?></h2>
|
||||||
|
<?php echo $javascript->link('shipment_index');?>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
echo $paginator->counter(array(
|
||||||
|
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
|
||||||
|
));
|
||||||
|
?></p>
|
||||||
|
<table cellpadding="0" cellspacing="0" class="shipments">
|
||||||
|
<tr>
|
||||||
|
<th><?php echo $paginator->sort('date_arrived');?></th>
|
||||||
|
<th><?php echo $paginator->sort('date_dispatched');?></th>
|
||||||
|
<th><?php echo $paginator->sort('type');?></th>
|
||||||
|
<th>Principle(s)</th>
|
||||||
|
<th>PO(s)</th>
|
||||||
|
<th>Jobs</th>
|
||||||
|
<th><?php echo $paginator->sort('box_count');?></th>
|
||||||
|
<th><?php echo $paginator->sort('freight_forwarder_id');?></th>
|
||||||
|
|
||||||
|
|
||||||
|
<th><?php echo $paginator->sort('airway_bill');?></th>
|
||||||
|
<th><?php echo $paginator->sort('comments');?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($shipments as $shipment):
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<?php echo $shipment['Shipment']['date_arrived']; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $shipment['Shipment']['date_dispatched']; ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<?php echo $shipment['Shipment']['type']; ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<?php foreach($shipment['Principle'] as $principle):?>
|
||||||
|
<? if(!empty($principle['short_name'])) {
|
||||||
|
echo $html->link($principle['short_name'], array('controller'=>'principles','action'=>'view',$principle['id']));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo $html->link($principle['name'], array('controller'=>'principles','action'=>'view',$principle['id']));
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<?php endforeach;?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<?php foreach($shipment['PurchaseOrder'] as $po):?>
|
||||||
|
<?=$html->link($po['title'], array('controller'=>'purchase_orders', 'action'=>'view', $po['id']));?>
|
||||||
|
<br>
|
||||||
|
<?endforeach;?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<?php foreach($shipment['Job'] as $job):?>
|
||||||
|
<?=$html->link($job['title'], array('controller'=>'jobs', 'action'=>'view', $job['id']));?>
|
||||||
|
<br>
|
||||||
|
<?endforeach;?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<?php echo $shipment['Shipment']['box_count']; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $html->link($shipment['FreightForwarder']['name'], array('controller' => 'freight_forwarders', 'action' => 'view', $shipment['FreightForwarder']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<?php echo $shipment['Shipment']['airway_bill']; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo $shipment['Shipment']['comments']; ?>
|
||||||
|
</td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $html->link(__('View', true), array('action' => 'view', $shipment['Shipment']['id'])); ?>
|
||||||
|
<?php echo $html->link(__('Edit', true), array('action' => 'edit', $shipment['Shipment']['id'])); ?>
|
||||||
|
<?php echo $html->link(__('Delete', true), array('action' => 'delete', $shipment['Shipment']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $shipment['Shipment']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="paging">
|
||||||
|
<?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
|
||||||
|
| <?php echo $paginator->numbers();?>
|
||||||
|
<?php echo $paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><button id="newShipment">New Shipment</button></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="dialog-form" title="New Shipment">
|
||||||
|
<p class="validateTips"></p>
|
||||||
|
|
||||||
|
<?php echo $form->create('Shipment');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Add Shipment');?></legend>
|
||||||
|
<?php
|
||||||
|
echo $form->input('box_count');
|
||||||
|
echo $form->input('freight_forwarder_id');
|
||||||
|
echo $form->input('date_arrived');
|
||||||
|
echo $form->input('date_dispatched');
|
||||||
|
echo $form->input('airway_bill');
|
||||||
|
echo $form->input('comments');
|
||||||
|
echo $form->input('Job');
|
||||||
|
echo $form->input('Principle');
|
||||||
|
echo $form->input('PurchaseOrder');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php debug($shipments); ?>
|
||||||
371
views/shipments/view.ctp
Normal file
371
views/shipments/view.ctp
Normal file
|
|
@ -0,0 +1,371 @@
|
||||||
|
<div class="shipments view">
|
||||||
|
<h2><?php __('Shipment');?></h2>
|
||||||
|
<dl><?php $i = 0; $class = ' class="altrow"';?>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $shipment['Shipment']['id']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Box Count'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $shipment['Shipment']['box_count']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Freight Forwarder'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $html->link($shipment['FreightForwarder']['name'], array('controller' => 'freight_forwarders', 'action' => 'view', $shipment['FreightForwarder']['id'])); ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $shipment['Shipment']['created']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Date Arrived'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $shipment['Shipment']['date_arrived']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Date Dispatched'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $shipment['Shipment']['date_dispatched']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Airway Bill'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $shipment['Shipment']['airway_bill']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Comments'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $shipment['Shipment']['comments']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $html->link(__('Edit Shipment', true), array('action' => 'edit', $shipment['Shipment']['id'])); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('Delete Shipment', true), array('action' => 'delete', $shipment['Shipment']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $shipment['Shipment']['id'])); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Shipments', true), array('action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Shipment', true), array('action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Freight Forwarders', true), array('controller' => 'freight_forwarders', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Freight Forwarder', true), array('controller' => 'freight_forwarders', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Boxes', true), array('controller' => 'boxes', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Box', true), array('controller' => 'boxes', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Shipment Invoices', true), array('controller' => 'shipment_invoices', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Shipment Invoice', true), array('controller' => 'shipment_invoices', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Jobs', true), array('controller' => 'jobs', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Job', true), array('controller' => 'jobs', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Principles', true), array('controller' => 'principles', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Principle', true), array('controller' => 'principles', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('List Purchase Orders', true), array('controller' => 'purchase_orders', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $html->link(__('New Purchase Order', true), array('controller' => 'purchase_orders', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php __('Related Boxes');?></h3>
|
||||||
|
<?php if (!empty($shipment['Box'])):?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<tr>
|
||||||
|
<th><?php __('Id'); ?></th>
|
||||||
|
<th><?php __('Shipment Id'); ?></th>
|
||||||
|
<th><?php __('Length'); ?></th>
|
||||||
|
<th><?php __('Width'); ?></th>
|
||||||
|
<th><?php __('Height'); ?></th>
|
||||||
|
<th><?php __('Weight'); ?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($shipment['Box'] as $box):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $box['id'];?></td>
|
||||||
|
<td><?php echo $box['shipment_id'];?></td>
|
||||||
|
<td><?php echo $box['length'];?></td>
|
||||||
|
<td><?php echo $box['width'];?></td>
|
||||||
|
<td><?php echo $box['height'];?></td>
|
||||||
|
<td><?php echo $box['weight'];?></td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $html->link(__('View', true), array('controller' => 'boxes', 'action' => 'view', $box['id'])); ?>
|
||||||
|
<?php echo $html->link(__('Edit', true), array('controller' => 'boxes', 'action' => 'edit', $box['id'])); ?>
|
||||||
|
<?php echo $html->link(__('Delete', true), array('controller' => 'boxes', 'action' => 'delete', $box['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $box['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $html->link(__('New Box', true), array('controller' => 'boxes', 'action' => 'add'));?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php __('Related Shipment Invoices');?></h3>
|
||||||
|
<?php if (!empty($shipment['ShipmentInvoice'])):?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<tr>
|
||||||
|
<th><?php __('Id'); ?></th>
|
||||||
|
<th><?php __('Shipment Id'); ?></th>
|
||||||
|
<th><?php __('Principle Id'); ?></th>
|
||||||
|
<th><?php __('Currency Id'); ?></th>
|
||||||
|
<th><?php __('Invoice Number'); ?></th>
|
||||||
|
<th><?php __('Invoice Amount'); ?></th>
|
||||||
|
<th><?php __('Deferred Gst'); ?></th>
|
||||||
|
<th><?php __('Approved'); ?></th>
|
||||||
|
<th><?php __('Invoice Type'); ?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($shipment['ShipmentInvoice'] as $shipmentInvoice):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $shipmentInvoice['id'];?></td>
|
||||||
|
<td><?php echo $shipmentInvoice['shipment_id'];?></td>
|
||||||
|
<td><?php echo $shipmentInvoice['principle_id'];?></td>
|
||||||
|
<td><?php echo $shipmentInvoice['currency_id'];?></td>
|
||||||
|
<td><?php echo $shipmentInvoice['invoice_number'];?></td>
|
||||||
|
<td><?php echo $shipmentInvoice['invoice_amount'];?></td>
|
||||||
|
<td><?php echo $shipmentInvoice['deferred_gst'];?></td>
|
||||||
|
<td><?php echo $shipmentInvoice['approved'];?></td>
|
||||||
|
<td><?php echo $shipmentInvoice['invoice_type'];?></td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $html->link(__('View', true), array('controller' => 'shipment_invoices', 'action' => 'view', $shipmentInvoice['id'])); ?>
|
||||||
|
<?php echo $html->link(__('Edit', true), array('controller' => 'shipment_invoices', 'action' => 'edit', $shipmentInvoice['id'])); ?>
|
||||||
|
<?php echo $html->link(__('Delete', true), array('controller' => 'shipment_invoices', 'action' => 'delete', $shipmentInvoice['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $shipmentInvoice['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $html->link(__('New Shipment Invoice', true), array('controller' => 'shipment_invoices', 'action' => 'add'));?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php __('Related Jobs');?></h3>
|
||||||
|
<?php if (!empty($shipment['Job'])):?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<tr>
|
||||||
|
<th><?php __('Id'); ?></th>
|
||||||
|
<th><?php __('Created'); ?></th>
|
||||||
|
<th><?php __('Title'); ?></th>
|
||||||
|
<th><?php __('State Id'); ?></th>
|
||||||
|
<th><?php __('Customer Id'); ?></th>
|
||||||
|
<th><?php __('Enquiry Id'); ?></th>
|
||||||
|
<th><?php __('Contact Id'); ?></th>
|
||||||
|
<th><?php __('Comments'); ?></th>
|
||||||
|
<th><?php __('Date Order Received'); ?></th>
|
||||||
|
<th><?php __('Date Scheduled Ex Works'); ?></th>
|
||||||
|
<th><?php __('Date Order Sent To Customer'); ?></th>
|
||||||
|
<th><?php __('Customer Order Number'); ?></th>
|
||||||
|
<th><?php __('All Sent'); ?></th>
|
||||||
|
<th><?php __('All Paid'); ?></th>
|
||||||
|
<th><?php __('Job Status'); ?></th>
|
||||||
|
<th><?php __('Domestic Freight Paid By'); ?></th>
|
||||||
|
<th><?php __('Sale Category'); ?></th>
|
||||||
|
<th><?php __('Job Type'); ?></th>
|
||||||
|
<th><?php __('Shipment Category'); ?></th>
|
||||||
|
<th><?php __('Company Gross Sales Aud'); ?></th>
|
||||||
|
<th><?php __('Net Sales Aud'); ?></th>
|
||||||
|
<th><?php __('Gross Profit Aud'); ?></th>
|
||||||
|
<th><?php __('Ato Exchange Rate'); ?></th>
|
||||||
|
<th><?php __('Gst'); ?></th>
|
||||||
|
<th><?php __('Currency Id'); ?></th>
|
||||||
|
<th><?php __('Gst Amount'); ?></th>
|
||||||
|
<th><?php __('Gross Commisions'); ?></th>
|
||||||
|
<th><?php __('Invoiced Amount Inc Gst'); ?></th>
|
||||||
|
<th><?php __('Net Export Sales Aud'); ?></th>
|
||||||
|
<th><?php __('Gross Profit Exports Aud'); ?></th>
|
||||||
|
<th><?php __('Gp Percent'); ?></th>
|
||||||
|
<th><?php __('Gross Australian Sales Foreign Currency'); ?></th>
|
||||||
|
<th><?php __('Net Australian Sales Foreign Currency'); ?></th>
|
||||||
|
<th><?php __('Gross Profit Value Australian Sales Foreign Currency'); ?></th>
|
||||||
|
<th><?php __('Gross Export Sales Foreign Currency'); ?></th>
|
||||||
|
<th><?php __('Net Export Sales Foreign Currency'); ?></th>
|
||||||
|
<th><?php __('Gross Profit Value After Discount Exports Foreign Currency'); ?></th>
|
||||||
|
<th><?php __('Gross Commissions'); ?></th>
|
||||||
|
<th><?php __('Net Commissions'); ?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($shipment['Job'] as $job):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $job['id'];?></td>
|
||||||
|
<td><?php echo $job['created'];?></td>
|
||||||
|
<td><?php echo $job['title'];?></td>
|
||||||
|
<td><?php echo $job['state_id'];?></td>
|
||||||
|
<td><?php echo $job['customer_id'];?></td>
|
||||||
|
<td><?php echo $job['enquiry_id'];?></td>
|
||||||
|
<td><?php echo $job['contact_id'];?></td>
|
||||||
|
<td><?php echo $job['comments'];?></td>
|
||||||
|
<td><?php echo $job['date_order_received'];?></td>
|
||||||
|
<td><?php echo $job['date_scheduled_ex_works'];?></td>
|
||||||
|
<td><?php echo $job['date_order_sent_to_customer'];?></td>
|
||||||
|
<td><?php echo $job['customer_order_number'];?></td>
|
||||||
|
<td><?php echo $job['all_sent'];?></td>
|
||||||
|
<td><?php echo $job['all_paid'];?></td>
|
||||||
|
<td><?php echo $job['job_status'];?></td>
|
||||||
|
<td><?php echo $job['domestic_freight_paid_by'];?></td>
|
||||||
|
<td><?php echo $job['sale_category'];?></td>
|
||||||
|
<td><?php echo $job['job_type'];?></td>
|
||||||
|
<td><?php echo $job['shipment_category'];?></td>
|
||||||
|
<td><?php echo $job['company_gross_sales_aud'];?></td>
|
||||||
|
<td><?php echo $job['net_sales_aud'];?></td>
|
||||||
|
<td><?php echo $job['gross_profit_aud'];?></td>
|
||||||
|
<td><?php echo $job['ato_exchange_rate'];?></td>
|
||||||
|
<td><?php echo $job['gst'];?></td>
|
||||||
|
<td><?php echo $job['currency_id'];?></td>
|
||||||
|
<td><?php echo $job['gst_amount'];?></td>
|
||||||
|
<td><?php echo $job['gross_commisions'];?></td>
|
||||||
|
<td><?php echo $job['invoiced_amount_inc_gst'];?></td>
|
||||||
|
<td><?php echo $job['net_export_sales_aud'];?></td>
|
||||||
|
<td><?php echo $job['gross_profit_exports_aud'];?></td>
|
||||||
|
<td><?php echo $job['gp_percent'];?></td>
|
||||||
|
<td><?php echo $job['gross_australian_sales_foreign_currency'];?></td>
|
||||||
|
<td><?php echo $job['net_australian_sales_foreign_currency'];?></td>
|
||||||
|
<td><?php echo $job['gross_profit_value_australian_sales_foreign_currency'];?></td>
|
||||||
|
<td><?php echo $job['gross_export_sales_foreign_currency'];?></td>
|
||||||
|
<td><?php echo $job['net_export_sales_foreign_currency'];?></td>
|
||||||
|
<td><?php echo $job['gross_profit_value_after_discount_exports_foreign_currency'];?></td>
|
||||||
|
<td><?php echo $job['gross_commissions'];?></td>
|
||||||
|
<td><?php echo $job['net_commissions'];?></td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $html->link(__('View', true), array('controller' => 'jobs', 'action' => 'view', $job['id'])); ?>
|
||||||
|
<?php echo $html->link(__('Edit', true), array('controller' => 'jobs', 'action' => 'edit', $job['id'])); ?>
|
||||||
|
<?php echo $html->link(__('Delete', true), array('controller' => 'jobs', 'action' => 'delete', $job['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $job['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $html->link(__('New Job', true), array('controller' => 'jobs', 'action' => 'add'));?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php __('Related Principles');?></h3>
|
||||||
|
<?php if (!empty($shipment['Principle'])):?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<tr>
|
||||||
|
<th><?php __('Id'); ?></th>
|
||||||
|
<th><?php __('Name'); ?></th>
|
||||||
|
<th><?php __('Code'); ?></th>
|
||||||
|
<th><?php __('Address'); ?></th>
|
||||||
|
<th><?php __('City'); ?></th>
|
||||||
|
<th><?php __('State'); ?></th>
|
||||||
|
<th><?php __('Postcode'); ?></th>
|
||||||
|
<th><?php __('Country Id'); ?></th>
|
||||||
|
<th><?php __('Currency Id'); ?></th>
|
||||||
|
<th><?php __('Short Name'); ?></th>
|
||||||
|
<th><?php __('Url'); ?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($shipment['Principle'] as $principle):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $principle['id'];?></td>
|
||||||
|
<td><?php echo $principle['name'];?></td>
|
||||||
|
<td><?php echo $principle['code'];?></td>
|
||||||
|
<td><?php echo $principle['address'];?></td>
|
||||||
|
<td><?php echo $principle['city'];?></td>
|
||||||
|
<td><?php echo $principle['state'];?></td>
|
||||||
|
<td><?php echo $principle['postcode'];?></td>
|
||||||
|
<td><?php echo $principle['country_id'];?></td>
|
||||||
|
<td><?php echo $principle['currency_id'];?></td>
|
||||||
|
<td><?php echo $principle['short_name'];?></td>
|
||||||
|
<td><?php echo $principle['url'];?></td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $html->link(__('View', true), array('controller' => 'principles', 'action' => 'view', $principle['id'])); ?>
|
||||||
|
<?php echo $html->link(__('Edit', true), array('controller' => 'principles', 'action' => 'edit', $principle['id'])); ?>
|
||||||
|
<?php echo $html->link(__('Delete', true), array('controller' => 'principles', 'action' => 'delete', $principle['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $principle['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $html->link(__('New Principle', true), array('controller' => 'principles', 'action' => 'add'));?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php __('Related Purchase Orders');?></h3>
|
||||||
|
<?php if (!empty($shipment['PurchaseOrder'])):?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<tr>
|
||||||
|
<th><?php __('Id'); ?></th>
|
||||||
|
<th><?php __('Issue Date'); ?></th>
|
||||||
|
<th><?php __('Dispatch Date'); ?></th>
|
||||||
|
<th><?php __('Date Arrived'); ?></th>
|
||||||
|
<th><?php __('Title'); ?></th>
|
||||||
|
<th><?php __('Principle Id'); ?></th>
|
||||||
|
<th><?php __('Principle Reference'); ?></th>
|
||||||
|
<th><?php __('Document Id'); ?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($shipment['PurchaseOrder'] as $purchaseOrder):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $purchaseOrder['id'];?></td>
|
||||||
|
<td><?php echo $purchaseOrder['issue_date'];?></td>
|
||||||
|
<td><?php echo $purchaseOrder['dispatch_date'];?></td>
|
||||||
|
<td><?php echo $purchaseOrder['date_arrived'];?></td>
|
||||||
|
<td><?php echo $purchaseOrder['title'];?></td>
|
||||||
|
<td><?php echo $purchaseOrder['principle_id'];?></td>
|
||||||
|
<td><?php echo $purchaseOrder['principle_reference'];?></td>
|
||||||
|
<td><?php echo $purchaseOrder['document_id'];?></td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $html->link(__('View', true), array('controller' => 'purchase_orders', 'action' => 'view', $purchaseOrder['id'])); ?>
|
||||||
|
<?php echo $html->link(__('Edit', true), array('controller' => 'purchase_orders', 'action' => 'edit', $purchaseOrder['id'])); ?>
|
||||||
|
<?php echo $html->link(__('Delete', true), array('controller' => 'purchase_orders', 'action' => 'delete', $purchaseOrder['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $purchaseOrder['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $html->link(__('New Purchase Order', true), array('controller' => 'purchase_orders', 'action' => 'add'));?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
@ -1393,3 +1393,15 @@ span.month {
|
||||||
span.year {
|
span.year {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tr.cancelled td {
|
||||||
|
text-decoration: line-through;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Shipments Index */
|
||||||
|
|
||||||
|
table.shipments tr td {
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,7 @@
|
||||||
$(function() {
|
$(function() {
|
||||||
|
|
||||||
|
|
||||||
//alert($("#jobTableHead > tr > th").length);
|
// $(".editButton").show();
|
||||||
|
|
||||||
/* var headerCols = $(".jobTableHead > tr > th");
|
|
||||||
|
|
||||||
|
|
||||||
headerCols.each(function(index) {
|
|
||||||
alert($(this).width);
|
|
||||||
});*/
|
|
||||||
|
|
||||||
|
|
||||||
$(".editButton").show();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,14 @@ $(function() {
|
||||||
},
|
},
|
||||||
function() {
|
function() {
|
||||||
$('ul', this).slideUp(50); //hide submenu
|
$('ul', this).slideUp(50); //hide submenu
|
||||||
})
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$('#content').hover(
|
||||||
|
function() {
|
||||||
|
$('#nav > ul').hide();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
83
webroot/js/shipment_index.js
Normal file
83
webroot/js/shipment_index.js
Normal file
|
|
@ -0,0 +1,83 @@
|
||||||
|
$(function() {
|
||||||
|
// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
|
||||||
|
$( "#dialog:ui-dialog" ).dialog( "destroy" );
|
||||||
|
|
||||||
|
var name = $( "#name" ),
|
||||||
|
email = $( "#email" ),
|
||||||
|
password = $( "#password" ),
|
||||||
|
allFields = $( [] ).add( name ).add( email ).add( password ),
|
||||||
|
tips = $( ".validateTips" );
|
||||||
|
|
||||||
|
function updateTips( t ) {
|
||||||
|
tips
|
||||||
|
.text( t )
|
||||||
|
.addClass( "ui-state-highlight" );
|
||||||
|
setTimeout(function() {
|
||||||
|
tips.removeClass( "ui-state-highlight", 1500 );
|
||||||
|
}, 500 );
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkLength( o, n, min, max ) {
|
||||||
|
if ( o.val().length > max || o.val().length < min ) {
|
||||||
|
o.addClass( "ui-state-error" );
|
||||||
|
updateTips( "Length of " + n + " must be between " +
|
||||||
|
min + " and " + max + "." );
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkRegexp( o, regexp, n ) {
|
||||||
|
if ( !( regexp.test( o.val() ) ) ) {
|
||||||
|
o.addClass( "ui-state-error" );
|
||||||
|
updateTips( n );
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$( "#dialog-form" ).dialog({
|
||||||
|
autoOpen: false,
|
||||||
|
height: 300,
|
||||||
|
width: 350,
|
||||||
|
modal: true,
|
||||||
|
buttons: {
|
||||||
|
"Create an account": function() {
|
||||||
|
var bValid = true;
|
||||||
|
allFields.removeClass( "ui-state-error" );
|
||||||
|
|
||||||
|
bValid = bValid && checkLength( name, "username", 3, 16 );
|
||||||
|
bValid = bValid && checkLength( email, "email", 6, 80 );
|
||||||
|
bValid = bValid && checkLength( password, "password", 5, 16 );
|
||||||
|
|
||||||
|
bValid = bValid && checkRegexp( name, /^[a-z]([0-9a-z_])+$/i, "Username may consist of a-z, 0-9, underscores, begin with a letter." );
|
||||||
|
// From jquery.validate.js (by joern), contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
|
||||||
|
bValid = bValid && checkRegexp( email, /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i, "eg. ui@jquery.com" );
|
||||||
|
bValid = bValid && checkRegexp( password, /^([0-9a-zA-Z])+$/, "Password field only allow : a-z 0-9" );
|
||||||
|
|
||||||
|
if ( bValid ) {
|
||||||
|
$( "#users tbody" ).append( "<tr>" +
|
||||||
|
"<td>" + name.val() + "</td>" +
|
||||||
|
"<td>" + email.val() + "</td>" +
|
||||||
|
"<td>" + password.val() + "</td>" +
|
||||||
|
"</tr>" );
|
||||||
|
$( this ).dialog( "close" );
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Cancel: function() {
|
||||||
|
$( this ).dialog( "close" );
|
||||||
|
}
|
||||||
|
},
|
||||||
|
close: function() {
|
||||||
|
allFields.val( "" ).removeClass( "ui-state-error" );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$( "#newShipment" )
|
||||||
|
.button()
|
||||||
|
.click(function() {
|
||||||
|
$( "#dialog-form" ).dialog( "open" );
|
||||||
|
});
|
||||||
|
});
|
||||||
Loading…
Reference in a new issue