X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep109.php;h=dde986674c2e7cfc7315cfb429aa0bcbcade74af;hb=582e4a2443d9ed6ca67f47c05b7d92772b53b805;hp=e0c577a51e66c068acbaa77660691fe456c63914;hpb=0c1ab57c09d87eed2bd248892dbfe3f256767a82;p=fa-stable.git diff --git a/reporting/rep109.php b/reporting/rep109.php index e0c577a5..dde98667 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"); @@ -55,7 +53,7 @@ function print_sales_orders() // $headers in doctext.inc $aligns = array('left', 'left', 'right', 'left', 'right', 'right', 'right'); - $params = array('comments' => $comments); + $params = array('comments' => $comments, 'print_quote' => $print_as_quote); $cur = get_company_Pref('curr_default'); @@ -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