Currency filter not working in documents.
[fa-stable.git] / reporting / rep109.php
index 3251efcf5cc2bbc068b432eae3dc2e97e9680b0a..8b22697ad9a52a0a153d08fe22a1760c0ecba751 100644 (file)
@@ -72,6 +72,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"]);