59 lines
1.8 KiB
PHP
59 lines
1.8 KiB
PHP
<h3><?=$jobRangeTitle?></h3>
|
|
|
|
<h4>Shipment Invoices</h4>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Date Issued</th>
|
|
<th>Shipment for Job#</th>
|
|
<th>Principle</th>
|
|
<th>Freight Forwarder</th>
|
|
<th>Invoice Number</th>
|
|
<th>Currency</th>
|
|
<th>Invoice Amount</th>
|
|
<th>Deferred GST?</th>
|
|
<th>Deferred GST Amount</th>
|
|
<th>Deferred GST running total</th>
|
|
<th>Approved</th>
|
|
<th>Paid</th>
|
|
<th>Date Paid</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?
|
|
$runningTotal = 0;
|
|
|
|
foreach($shipments as $shipment):
|
|
|
|
$runningTotal += $shipment['ShipmentInvoice']['deferred_gst_amount'];
|
|
|
|
?>
|
|
<tr>
|
|
<td><?=$this->element('isEmptyDate', array('date'=>$shipment['ShipmentInvoice']['date_issued']));?></td>
|
|
<td><?=$jobList[$shipment['ShipmentInvoice']['shipment_id']];?></td>
|
|
<td><?=$shipment['Principle']['name'];?></td>
|
|
<td><?=$shipment['FreightForwarder']['name'];?></td>
|
|
<td><?=$shipment['ShipmentInvoice']['invoice_number'];?></td>
|
|
<td><?=$shipment['Currency']['iso4217'];?></td>
|
|
<td><?=$shipment['ShipmentInvoice']['invoice_amount'];?></td>
|
|
<td><?=$this->element('booleanTick', array('bool'=>$shipment['ShipmentInvoice']['deferred_gst']));?></td>
|
|
<?if($shipment['ShipmentInvoice']['deferred_gst'] > 0):?>
|
|
<td>
|
|
<?=$shipment['ShipmentInvoice']['deferred_gst_amount'];?>
|
|
</td>
|
|
<td>
|
|
<?=$runningTotal?>
|
|
</td>
|
|
<?else:?>
|
|
<td></td>
|
|
<td></td>
|
|
<?endif;?>
|
|
<td><?=$this->element('booleanTick', array('bool'=>$shipment['ShipmentInvoice']['approved']));?></td>
|
|
<td><?=$this->element('booleanTick', array('bool'=>$shipment['ShipmentInvoice']['paid']));?></td>
|
|
<td><?=$this->element('isEmptyDate', array('date'=>$shipment['ShipmentInvoice']['date_paid']));?></td>
|
|
</tr>
|
|
<?endforeach;?>
|
|
</tbody>
|
|
</table>
|