Fixed warnings related to empty item/customer/supplier selector in search modes.
[fa-stable.git] / sales / includes / db / customers_db.inc
index 0dfc17e28e85fa9ddf1ad0de89fa026fb6b9b700..f9b111a0b70445160b0ec3612f357576d664bfec 100644 (file)
@@ -197,7 +197,7 @@ function get_customer_currency($customer_id=null, $branch_id=null)
        $result = db_query($sql, "Retreive currency of customer $customer_id");
 
        $myrow=db_fetch_row($result);
-       return $myrow[0];
+       return $myrow ? $myrow[0] : get_company_currency();
 }
 
 function get_customers_search($customer)