- my %hash = ( 'contactnum' => $self->contactnum,
- 'custnum' => $custnum,
- );
- $cust_contact = qsearchs('cust_contact', \%hash )
- || new FS::cust_contact { %hash, %link_hash };
- my $error = $cust_contact->custcontactnum ? $cust_contact->replace
+ foreach my $contactnum (keys %contact_nums) {
+ my %hash = ( 'contactnum' => $contactnum,
+ 'custnum' => $custnum,
+ );
+ $cust_contact = qsearchs('cust_contact', \%hash )
+ || new FS::cust_contact { %hash, %link_hash };
+ my $error = $cust_contact->custcontactnum ? $cust_contact->replace