Item Tax Types: fixed inactive item tax types display switching.
[fa-stable.git] / reporting / rep112.php
index 062d136538e693a2f173bfb4a786eb28c087eab2..6cb3148fa292df4ba18e43afb0dcf8b7ca5c639a 100644 (file)
@@ -83,7 +83,6 @@ function print_receipts()
        $rep = new FrontReport(_('RECEIPT'), "ReceiptBulk", user_pagesize(), 9, $orientation);
        if ($orientation == 'L')
        recalculate_cols($cols);
-       $rep->SetHeaderType('Header2');
        $rep->currency = $cur;
        $rep->Font();
        $rep->Info($params, $cols, null, $aligns);
@@ -99,12 +98,16 @@ function print_receipts()
                        $myrow = get_receipt($j, $i);
                        if (!$myrow)
                                continue;
+                       if ($currency != ALL_TEXT && $myrow['curr_code'] != $currency) {
+                               continue;
+                       }
                        $res = get_bank_trans($j, $i);
                        $baccount = db_fetch($res);
                        $params['bankaccount'] = $baccount['bank_act'];
 
                        $contacts = get_branch_contacts($myrow['branch_code'], 'invoice', $myrow['debtor_no']);
                        $rep->SetCommonData($myrow, null, $myrow, $baccount, ST_CUSTPAYMENT, $contacts);
+                       $rep->SetHeaderType('Header2');
                        $rep->NewPage();
                        $result = get_allocatable_to_cust_transactions($myrow['debtor_no'], $myrow['trans_no'], $myrow['type']);
 
@@ -180,4 +183,3 @@ function print_receipts()
        $rep->End();
 }
 
-?>
\ No newline at end of file