X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep109.php;h=e4592a788ad25db46f0aa8bc26695a65b080c014;hb=e05d7f24eebdf3d0a1b04e8c48d8909a76093209;hp=0497392fba0f0cb6df11a3e5cdad3b5b53b2e24d;hpb=40da959b32eb27fcb0422207a284eed13cc27d7e;p=fa-stable.git diff --git a/reporting/rep109.php b/reporting/rep109.php index 0497392f..e4592a78 100644 --- a/reporting/rep109.php +++ b/reporting/rep109.php @@ -72,6 +72,9 @@ function print_sales_orders() for ($i = $from; $i <= $to; $i++) { $myrow = get_sales_order_header($i, ST_SALESORDER); + if ($currency != ALL_TEXT && $myrow['curr_code'] != $currency) { + continue; + } $baccount = get_default_bank_account($myrow['curr_code']); $params['bankaccount'] = $baccount['id']; $branch = get_branch($myrow["branch_code"]); @@ -96,7 +99,7 @@ function print_sales_orders() $rep->Font(); $rep->Info($params, $cols, null, $aligns); - $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no'], false); + $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no'], true); $rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESORDER, $contacts); $rep->NewPage(); @@ -141,7 +144,6 @@ function print_sales_orders() $rep->TextColLines(1, 5, $myrow['comments'], -2); } $DisplaySubTot = number_format2($SubTotal,$dec); - $DisplayFreight = number_format2($myrow["freight_cost"],$dec); $rep->row = $rep->bottomMargin + (15 * $rep->lineHeight); $doctype = ST_SALESORDER; @@ -149,10 +151,13 @@ function print_sales_orders() $rep->TextCol(3, 6, _("Sub-total"), -2); $rep->TextCol(6, 7, $DisplaySubTot, -2); $rep->NewLine(); - $rep->TextCol(3, 6, _("Shipping"), -2); - $rep->TextCol(6, 7, $DisplayFreight, -2); - $rep->NewLine(); - + if ($myrow['freight_cost'] != 0.0) + { + $DisplayFreight = number_format2($myrow["freight_cost"],$dec); + $rep->TextCol(3, 6, _("Shipping"), -2); + $rep->TextCol(6, 7, $DisplayFreight, -2); + $rep->NewLine(); + } $DisplayTotal = number_format2($myrow["freight_cost"] + $SubTotal, $dec); if ($myrow['tax_included'] == 0) { $rep->TextCol(3, 6, _("TOTAL ORDER EX VAT"), - 2);