+ if ($myrow['ov_freight'] != 0.0)
+ {
+ $DisplayFreight = number_format2($myrow["ov_freight"],$dec);
+ $rep->TextCol(3, 6, _("Shipping"), -2);
+ $rep->TextCol(6, 7, $DisplayFreight, -2);
+ $rep->NewLine();
+ }
+ $tax_items = get_trans_tax_details(ST_CUSTDELIVERY, $i);
+ $first = true;
+ while ($tax_item = db_fetch($tax_items))
+ {
+ if ($tax_item['amount'] == 0)
+ continue;
+ $DisplayTax = number_format2($tax_item['amount'], $dec);
+
+ if ($SysPrefs->suppress_tax_rates() == 1)
+ $tax_type_name = $tax_item['tax_type_name'];
+ else
+ $tax_type_name = $tax_item['tax_type_name']." (".$tax_item['rate']."%) ";
+
+ if ($myrow['tax_included'])
+ {
+ if ($SysPrefs->alternative_tax_include_on_docs() == 1)
+ {
+ if ($first)
+ {
+ $rep->TextCol(3, 6, _("Total Tax Excluded"), -2);
+ $rep->TextCol(6, 7, number_format2($tax_item['net_amount'], $dec), -2);
+ $rep->NewLine();
+ }
+ $rep->TextCol(3, 6, $tax_type_name, -2);
+ $rep->TextCol(6, 7, $DisplayTax, -2);
+ $first = false;
+ }
+ else
+ $rep->TextCol(3, 7, _("Included") . " " . $tax_type_name . _("Amount") . ": " . $DisplayTax, -2);
+ }
+ else
+ {
+ $rep->TextCol(3, 6, $tax_type_name, -2);
+ $rep->TextCol(6, 7, $DisplayTax, -2);
+ }
+ $rep->NewLine();
+ }
+ $rep->NewLine();
+ $DisplayTotal = number_format2($myrow["ov_freight"] +$myrow["ov_freight_tax"] + $myrow["ov_gst"] +
+ $myrow["ov_amount"],$dec);
+ $rep->Font('bold');
+ $rep->TextCol(3, 6, _("TOTAL DELIVERY INCL. VAT"), - 2);
+ $rep->TextCol(6, 7, $DisplayTotal, -2);
+ $words = price_in_words($myrow['Total'], ST_CUSTDELIVERY);
+ if ($words != "")
+ {
+ $rep->NewLine(1);
+ $rep->TextCol(1, 7, $myrow['curr_code'] . ": " . $words, - 2);
+ }
+ $rep->Font();
+ }