Exchange rate bug when searching a non existing customer
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 3 Feb 2010 15:26:36 +0000 (15:26 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 3 Feb 2010 15:26:36 +0000 (15:26 +0000)
CHANGELOG.txt
includes/banking.inc

index 3b5d0b8d595253c8a47bc20ec4e6eea634a51ba5..22ed8c5e62e0d1ecbfbdf0da47936ea5c869ef09 100644 (file)
@@ -27,6 +27,8 @@ $ /sales/includes/db/sales_delivery_db.inc
   price format uses thousands seperator. A couple of minor errors too. 
 $ /purchasing/includes/db/grn_db.inc
   /purchasing/includes/db/invoices_db.inc
+# Exchange rate bug when searching a non existing customer
+$ /includes/banking.inc
 
 03-Feb-2010 Chaitanya/Joe
 + Added a Profit and Loss Drilldown page and changed menu link
index 301a37299426edc85eba5b78edc634a9ec780068..59f0fe070743d5ca32141fbf489052c29bedf5de 100644 (file)
@@ -90,7 +90,7 @@ function get_supplier_currency($supplier_id)
 
 function get_exchange_rate_from_home_currency($currency_code, $date_)
 {
-       if ($currency_code == get_company_currency())
+       if ($currency_code == get_company_currency() || $currency_code == null)
                return 1.0000;
 
        $date = date2sql($date_);