New customer/supplier currency can be changed as long as no transaction is entered.
[fa-stable.git] / sales / includes / db / customers_db.inc
index a9a6301b8f39ad65f0ca7d6680d69da9483de6ff..bd5b8d34583d578cbd52ef80ba43df2b31ee16c0 100644 (file)
@@ -164,4 +164,10 @@ function get_current_cust_credit($customer_id)
 
 }
 
+function is_new_customer($id)
+{
+       $tables = array('cust_branch', 'debtor_trans', 'recurrent_invoices', 'sales_orders');
+
+       return !key_in_foreign_table($id, $tables, 'debtor_no');
+}
 ?>
\ No newline at end of file