From: Christopher Burger Date: Wed, 23 Jan 2019 16:18:19 +0000 (-0500) Subject: RT# 79352 - fixed insert error where new contacts not tied to customer on insert. X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;ds=sidebyside;h=3d325303535dc3ac9c1b15524140ba2794ad6a75;p=freeside.git RT# 79352 - fixed insert error where new contacts not tied to customer on insert. --- diff --git a/FS/FS/contact.pm b/FS/FS/contact.pm index 5c7e29eba..03023e5e7 100644 --- a/FS/FS/contact.pm +++ b/FS/FS/contact.pm @@ -168,7 +168,6 @@ sub insert { my $existing_contact = ''; my @contact_emails = (); my %contact_nums = (); - $contact_nums{$self->contactnum} = '1' if $self->contactnum; if ( $self->get('emailaddress') =~ /\S/ ) { @@ -202,6 +201,8 @@ sub insert { return $error; } + $contact_nums{$self->contactnum} = '1' if $self->contactnum; + my $cust_contact = ''; # if $self->custnum was set, then the customer-specific properties # (custnum, classnum, invoice_dest, selfservice_access, comment) are in