Fixed Options now show TBA
This commit is contained in:
parent
1d9034a132
commit
c8c9215179
|
|
@ -202,7 +202,7 @@ class DocumentsController extends AppController {
|
|||
$this->set('docTypeFullName',strtoupper($docTypeFullName));
|
||||
$this->set('currency',$currency);
|
||||
$this->set('currencyCode', $currency['Currency']['iso4217']);
|
||||
|
||||
$this->set('currencySymbol', $currency['Currency']['symbol']);
|
||||
|
||||
$gst = $enquiry['Enquiry']['gst'];
|
||||
|
||||
|
|
|
|||
|
|
@ -16,11 +16,15 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?foreach($document['LineItem'] as $li):?>
|
||||
<?
|
||||
$hasOptions = false;
|
||||
foreach($document['LineItem'] as $li):?>
|
||||
<tr nobr="true">
|
||||
<td width="<?=$colWidths['item'];?>" align="center" valign="top">
|
||||
<? if($li['option'] == 1) {
|
||||
echo 'Option';
|
||||
$hasOptions = true;
|
||||
|
||||
}
|
||||
?>
|
||||
<?=$li['item_number'];?>
|
||||
|
|
@ -57,7 +61,15 @@
|
|||
<td width="<?=$colWidths['qty'];?>"></td>
|
||||
<td width="<?=$colWidths['desc'];?>"><?=$totalsDescText['subtotal']?></td>
|
||||
<td width="<?=$colWidths['unit'];?>"></td>
|
||||
<td width="<?=$colWidths['total'];?>" align="center"><?=$number->currency($totals['subtotal'], $currencyCode);?></td>
|
||||
<td width="<?=$colWidths['total'];?>" align="center">
|
||||
<?
|
||||
if(!$hasOptions) {
|
||||
echo $number->currency($totals['subtotal'], $currencyCode);
|
||||
}
|
||||
else {
|
||||
echo $currencySymbol.'TBA';
|
||||
}
|
||||
?></td>
|
||||
</tr>
|
||||
<tr nobr="true">
|
||||
<td width="<?=$colWidths['item'];?>"></td>
|
||||
|
|
@ -65,12 +77,19 @@
|
|||
<td width="<?=$colWidths['desc'];?>"><?=$totalsDescText['gst'];?></td>
|
||||
<td width="<?=$colWidths['unit'];?>"></td>
|
||||
<td width="<?=$colWidths['total'];?>" align="center"><?
|
||||
if($gst ==1) {
|
||||
echo $number->currency($totals['gst'], $currencyCode);
|
||||
|
||||
if(!$hasOptions) {
|
||||
if($gst ==1) {
|
||||
echo $number->currency($totals['gst'], $currencyCode);
|
||||
}
|
||||
else {
|
||||
echo 'N/A';
|
||||
}
|
||||
}
|
||||
else {
|
||||
echo 'N/A';
|
||||
}?>
|
||||
echo $currencySymbol.'TBA';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr nobr="true">
|
||||
|
|
@ -78,7 +97,15 @@
|
|||
<td width="<?=$colWidths['qty'];?>"></td>
|
||||
<td width="<?=$colWidths['desc'];?>"><?=$totalsDescText['total'];?></td>
|
||||
<td width="<?=$colWidths['unit'];?>" align="center"><?=$currencyCode?></td>
|
||||
<td width="<?=$colWidths['total'];?>" align="center"><?=$number->currency($totals['total'], $currencyCode);?></td>
|
||||
<td width="<?=$colWidths['total'];?>" align="center">
|
||||
<?
|
||||
if(!$hasOptions) {
|
||||
echo $number->currency($totals['total'], $currencyCode);
|
||||
}
|
||||
else {
|
||||
echo $currencySymbol.'TBA';
|
||||
}
|
||||
?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -27,11 +27,16 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?foreach($document['LineItem'] as $li):?>
|
||||
<?
|
||||
$hasOptions = false;
|
||||
|
||||
foreach($document['LineItem'] as $li):?>
|
||||
<tr class="lineItem">
|
||||
<td>
|
||||
<? if($li['option'] == 1) {
|
||||
echo 'Option<br>';
|
||||
|
||||
$hasOptions = true;
|
||||
}
|
||||
?>
|
||||
<?=$li['item_number'];?></td>
|
||||
|
|
@ -57,7 +62,7 @@
|
|||
discount<br>
|
||||
<?=$number->currency($li['discount_amount_total'], $currencyCode);?>)<br>
|
||||
=<br>
|
||||
<?=$number->currency($li['net_price'], $currencyCode);?>
|
||||
<?=$number->currency($li['net_price'], $currencyCode);?>
|
||||
<?endif;?>
|
||||
</td>
|
||||
<td id="<?=$li['id'];?>">
|
||||
|
|
@ -73,7 +78,16 @@
|
|||
<td></td>
|
||||
<td class="leftAlign">SUB-TOTAL (Excluding GST)</td>
|
||||
<td></td>
|
||||
<td><?=$number->currency($totals['subtotal'], $currencyCode);?></td>
|
||||
<td><?
|
||||
if(!$hasOptions) {
|
||||
echo $number->currency($totals['subtotal'], $currencyCode);
|
||||
}
|
||||
else {
|
||||
echo $currencySymbol.'TBA';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
@ -81,7 +95,16 @@
|
|||
<td></td>
|
||||
<td class="leftAlign">GST (10%)</td>
|
||||
<td></td>
|
||||
<td><?=$number->currency($totals['gst'], $currencyCode);?></td>
|
||||
<td>
|
||||
<?
|
||||
if(!$hasOptions) {
|
||||
echo $number->currency($totals['gst'], $currencyCode);
|
||||
}
|
||||
else {
|
||||
echo $currencySymbol.'TBA';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
@ -89,7 +112,14 @@
|
|||
<td></td>
|
||||
<td class="leftAlign">TOTAL PAYABLE (INCLUDING GST)</td>
|
||||
<td></td>
|
||||
<td><?=$number->currency($totals['total'], $currencyCode);?></td>
|
||||
<td><?
|
||||
if(!$hasOptions) {
|
||||
echo $number->currency($totals['total'], $currencyCode);
|
||||
}
|
||||
else {
|
||||
echo $currencySymbol.'TBA';
|
||||
}
|
||||
?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
|
|
|||
Loading…
Reference in a new issue