From 2e7f4b37582315f873a1ace59d380d0ede20ae08 Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 14 Oct 2013 11:15:51 +0200 Subject: [PATCH] When automatic creating a branch the contact is also created on the customer (Rerun). --- sales/manage/customers.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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(); -- 2.30.2