Added the front end code to perform a customer merge. Seems to work, although I don't fully trust it yet. Now that implementation is done, I realize I don't care for the interface. Really, the destination customer should keep its primary contact and all other contacts. The user should only be given the choice of adding zero to all contacts from the source customer. A change in primary contact could always be handled after the merge.

git-svn-id: file:///svn-source/pmgr/branches/v0.3_work/site@994 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2010-07-02 19:36:39 +00:00
parent 2e3f168036
commit d83b72b2a3
3 changed files with 304 additions and 1 deletions

View File

@@ -340,7 +340,9 @@ class Customer extends AppModel {
$this->pr(17, $this->data);
$this->data['Customer']['primary_contact_id'] = $primary_contact_id;
if (!empty($primary_contact_id))
$this->data['Customer']['primary_contact_id'] = $primary_contact_id;
$this->data['Contact'] = array();
foreach ($contacts AS $contact_id)
$this->data['Contact'][] = array('id' => $contact_id,