-
- if ( $invoicing_list ) {
- warn "FS::cust_main::insert setting invoice destinations via invoicing_list\n"
- if $DEBUG;
-
- # okay, for now we'll still allow setting the contact this way
- $invoicing_list = join(',', @$invoicing_list) if ref $invoicing_list;
- my $contact = FS::contact->new({
- 'custnum' => $self->get('custnum'),
- 'last' => $self->get('last'),
- 'first' => $self->get('first'),
- 'emailaddress' => $invoicing_list,
- 'invoice_dest' => 'Y',
- });
- my $error = $contact->insert;
- if ( $error ) {
- $dbh->rollback if $oldAutoCommit;
- return $error;
- }
-
- }