X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep109.php;h=52df0b7cece00410dcc636afc82efec888859968;hb=33dfc21a26f08e9ac19048bbcf80cce2351a6cfe;hp=e0c577a51e66c068acbaa77660691fe456c63914;hpb=0c1ab57c09d87eed2bd248892dbfe3f256767a82;p=fa-stable.git diff --git a/reporting/rep109.php b/reporting/rep109.php index e0c577a5..52df0b7c 100644 --- a/reporting/rep109.php +++ b/reporting/rep109.php @@ -29,11 +29,9 @@ include_once($path_to_root . "/taxes/tax_calc.inc"); print_sales_orders(); -$print_as_quote = 0; - function print_sales_orders() { - global $path_to_root, $print_as_quote, $SysPrefs; + global $path_to_root, $SysPrefs; include_once($path_to_root . "/reporting/includes/pdf_report.inc"); @@ -73,6 +71,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"]); @@ -97,13 +98,13 @@ function print_sales_orders() } else $rep->title = ($print_as_quote==1 ? _("QUOTE") : _("SALES ORDER")); - $rep->SetHeaderType('Header2'); $rep->currency = $cur; $rep->Font(); $rep->Info($params, $cols, null, $aligns); $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no'], true); $rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESORDER, $contacts); + $rep->SetHeaderType('Header2'); $rep->NewPage(); $result = get_sales_order_details($i, ST_SALESORDER); @@ -225,4 +226,3 @@ function print_sales_orders() $rep->End(); } -?> \ No newline at end of file