Currency filter not working in documents.
authorJoe <unknown>
Thu, 12 Feb 2015 20:50:24 +0000 (21:50 +0100)
committerJoe <unknown>
Thu, 12 Feb 2015 20:50:24 +0000 (21:50 +0100)
reporting/rep107.php
reporting/rep108.php
reporting/rep109.php
reporting/rep111.php
reporting/rep112.php
reporting/rep113.php
reporting/rep209.php
reporting/rep210.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']);
index b438e641c2d31153bc90755e53c3578a7b11a905..a3f76f38f9b00dbcc2b1f779a9ece7f6fd13ea52 100644 (file)
@@ -95,6 +95,9 @@ function print_statements()
 
        while ($myrow=db_fetch($result))
        {
+               if ($currency != ALL_TEXT && $myrow['curr_code'] != $currency) {
+                       continue;
+               }       
                $date = date('Y-m-d');
 
                $myrow['order_'] = "";
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"]);
index 0bbf04259a95c54020e85e5feb1ce2d21aeb361c..6eeda915e4b3e4d73d5b0a32002308bc0d988e78 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"]);
index 45851689473a163daf57bebcd9c4216fa080ea35..4662a785ea92f04c33ae471eb0910fd0ef62cc97 100644 (file)
@@ -111,6 +111,9 @@ 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'];
index f38fd4c19e3805b655ea8b28f093758d3323a430..c73388abf565650c4c097d4fa0c84f9bfe0cabda 100644 (file)
@@ -74,6 +74,9 @@ function print_credits()
                                continue;
                        $sign = -1;
                        $myrow = get_customer_trans($i, ST_CUSTCREDIT);
+                       if ($currency != ALL_TEXT && $myrow['curr_code'] != $currency) {
+                               continue;
+                       }
                        $baccount = get_default_bank_account($myrow['curr_code']);
                        $params['bankaccount'] = $baccount['id'];
 
index c1632dfd1f1745f869ddff7d90c467af7055bbd8..31c82b0a9817a5a7cc226e0d4adc2e9fed697a35 100644 (file)
@@ -91,6 +91,9 @@ function print_po()
        for ($i = $from; $i <= $to; $i++)
        {
                $myrow = get_po($i);
+               if ($currency != ALL_TEXT && $myrow['curr_code'] != $currency) {
+                       continue;
+               }
                $baccount = get_default_bank_account($myrow['curr_code']);
                $params['bankaccount'] = $baccount['id'];
 
index 2500067060bca211619a124473c9fca024d0ce77..5b7634d2a1ece014c3aedbb04f8ee5081bb54353 100644 (file)
@@ -108,6 +108,9 @@ function print_remittances()
                        $myrow = get_remittance($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'];