Currency filter not working in documents.
[fa-stable.git] / reporting / rep107.php
index b0f6be77e307e57d020eb8dc298c2dcca50f8d18..6e0307ea80e9df2b482e4df80715df2bc9f4daf1 100644 (file)
@@ -75,7 +75,10 @@ function print_invoices()
                        $sign = 1;
                        $myrow = get_customer_trans($i, ST_SALESINVOICE);
 
-                       if($customer && $myrow['debtor_no'] != $customer) {
+                       if($customer != ALL_TEXT && $myrow['debtor_no'] != $customer) {
+                               continue;
+                       }
+                       if ($currency != ALL_TEXT && $myrow['curr_code'] != $currency) {
                                continue;
                        }
                        $baccount = get_default_bank_account($myrow['curr_code']);