Supplier Payments: Fixed error during payment allocation in strict MySQL mode.
[fa-stable.git] / sales / manage / customers.php
index d7422f22034f8cd4f3dd992a805352f191a4246c..93768344ec214fa20eec1d5bf4d0c56c3fe3478c 100644 (file)
@@ -120,7 +120,10 @@ function handle_submit(&$selected_id)
                        add_crm_person($_POST['CustName'], $_POST['cust_ref'], '', $_POST['address'], 
                                $_POST['phone'], $_POST['phone2'], $_POST['fax'], $_POST['email'], '', '');
 
-                       add_crm_contact('cust_branch', 'general', $selected_branch, db_insert_id());
+                       $pers_id = db_insert_id();
+                       add_crm_contact('cust_branch', 'general', $selected_branch, $pers_id);
+
+                       add_crm_contact('customer', 'general', $selected_id, $pers_id);
                }
                commit_transaction();