86 lines
3 KiB
PHP
86 lines
3 KiB
PHP
<table border="1" cellpadding="2" cellspacing="0" >
|
|
<thead>
|
|
<tr bgcolor="#f2f2f2">
|
|
<th width="<?=$colWidths['item'];?>" align="center">ITEM<br />NO.</th>
|
|
<th width="<?=$colWidths['qty'];?>" align="center">QTY</th>
|
|
<th width="<?=$colWidths['desc'];?>" align="center">DESCRIPTION</th>
|
|
<th width="<?=$colWidths['unit'];?>" align="center">UNIT<br>PRICE</th>
|
|
<th width="<?=$colWidths['total'];?>" align="center">TOTAL<br>PRICE</th>
|
|
</tr>
|
|
<tr>
|
|
<th></th>
|
|
<th></th>
|
|
<th></th>
|
|
<th align="center"><?=$currencyCode?></th>
|
|
<th align="center"><?=$currencyCode?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?foreach($document['LineItem'] as $li):?>
|
|
<tr nobr="true">
|
|
<td width="<?=$colWidths['item'];?>" align="center">
|
|
<? if($li['option'] == 1) {
|
|
echo 'Option<br>';
|
|
}
|
|
?>
|
|
<?=$li['item_number'];?></td>
|
|
<td width="<?=$colWidths['qty'];?>" align="center"><?=$li['quantity'];?></td>
|
|
<td width="<?=$colWidths['desc'];?>"><?=$li['title'];?>
|
|
<?=$li['description'];?>
|
|
</td>
|
|
<td width="<?=$colWidths['unit'];?>" align="center">
|
|
|
|
<?=$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;?>
|
|
</td>
|
|
<td width="<?=$colWidths['total'];?>" align="center">
|
|
<?=$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;?>
|
|
</td>
|
|
</tr>
|
|
<?endforeach;?>
|
|
|
|
|
|
<tr>
|
|
<td width="<?=$colWidths['item'];?>"></td>
|
|
<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>
|
|
</tr>
|
|
<tr>
|
|
<td width="<?=$colWidths['item'];?>"></td>
|
|
<td width="<?=$colWidths['qty'];?>"></td>
|
|
<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);
|
|
}
|
|
else {
|
|
echo 'N/A';
|
|
}?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="<?=$colWidths['item'];?>"></td>
|
|
<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>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|