X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fincludes%2Fdb%2Fcustomers_db.inc;h=f9b111a0b70445160b0ec3612f357576d664bfec;hb=2f3375b4493c1b1e0b17c2801298275f22f8d76e;hp=675e1b736c6e589cce25403e049e9bc72586e769;hpb=f3d80f9786ca39bf7894bc8797f524e57fae2bbe;p=fa-stable.git diff --git a/sales/includes/db/customers_db.inc b/sales/includes/db/customers_db.inc index 675e1b73..f9b111a0 100644 --- a/sales/includes/db/customers_db.inc +++ b/sales/includes/db/customers_db.inc @@ -55,7 +55,7 @@ function delete_customer($customer_id) begin_transaction(); delete_entity_contacts('customer', $customer_id); - $sql = "DELETE FROM ".TB_PREF."debtors_master WHERE debtor_no=".db_escape($customer_id);; + $sql = "DELETE FROM ".TB_PREF."debtors_master WHERE debtor_no=".db_escape($customer_id); db_query($sql,"cannot delete customer"); commit_transaction(); } @@ -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)