From: Joe Date: Mon, 14 Oct 2013 09:15:51 +0000 (+0200) Subject: When automatic creating a branch the contact is also created on the customer (Rerun). X-Git-Tag: 2.3-final~182 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=2e7f4b37582315f873a1ace59d380d0ede20ae08;p=fa-stable.git When automatic creating a branch the contact is also created on the customer (Rerun). --- diff --git a/sales/manage/customers.php b/sales/manage/customers.php index c6664967..93768344 100644 --- a/sales/manage/customers.php +++ b/sales/manage/customers.php @@ -120,9 +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, db_insert_id()); + add_crm_contact('customer', 'general', $selected_id, $pers_id); } commit_transaction();