Tax Report: not taxable sales printed in separate summary line.
[fa-stable.git] / reporting / rep111.php
index 4f3588b0be16f19dbc953ccdb9f5b1d180ae77d4..45c5ab999e4be66466387c6dc2a6c6786ade4d60 100644 (file)
@@ -68,6 +68,9 @@ function print_sales_quotations()
        for ($i = $from; $i <= $to; $i++)
        {
                $myrow = get_sales_order_header($i, ST_SALESQUOTE);
+               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"]);
@@ -84,8 +87,8 @@ function print_sales_quotations()
                $rep->Info($params, $cols, null, $aligns);
 
                $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no'], true);
-               $rep->SetHeaderType('Header2');
                $rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESQUOTE, $contacts);
+               $rep->SetHeaderType('Header2');
                $rep->NewPage();
 
                $result = get_sales_order_details($i, ST_SALESQUOTE);