Merged changes from stable branch up to 2.3.23.
[fa-stable.git] / reporting / rep107.php
index aaade9058bb9517fb1cf4cddb11499451354621a..a125995dce7b5a04d4818f0eadbc441cdca21de0 100644 (file)
@@ -97,7 +97,10 @@ function print_invoices()
                        $sign = 1;
                        $myrow = get_customer_trans($row['trans_no'], ST_SALESINVOICE);
 
-                       if($customer && $myrow['debtor_no'] != $customer) {
+                       if ($customer && $myrow['debtor_no'] != $customer) {
+                               continue;
+                       }
+                       if ($currency != ALL_TEXT && $myrow['curr_code'] != $currency) {
                                continue;
                        }
                        $baccount = get_default_bank_account($myrow['curr_code']);