RT#71011: Prospect quotation error v4+
authorJonathan Prykop <jonathan@freeside.biz>
Tue, 7 Jun 2016 04:03:04 +0000 (23:03 -0500)
committerJonathan Prykop <jonathan@freeside.biz>
Tue, 7 Jun 2016 04:03:04 +0000 (23:03 -0500)
FS/FS/cust_main.pm
FS/FS/prospect_main.pm

index cb5181d..3b1c951 100644 (file)
@@ -532,6 +532,7 @@ sub insert {
     foreach my $prospect_contact ( $prospect_main->prospect_contact ) {
       my $cust_contact = new FS::cust_contact {
         'custnum' => $self->custnum,
+        'invoice_dest' => 'Y', # invoice_dest currently not set for prospect contacts
         map { $_ => $prospect_contact->$_() } qw( contactnum classnum comment )
       };
       my $error =  $cust_contact->insert
index f600b23..9472996 100644 (file)
@@ -352,9 +352,6 @@ sub convert_cust_main {
 
   my @contact = map $_->contact, $self->prospect_contact;
 
-  #XXX define one contact type as "billing", then we could pick just that one
-  my @invoicing_list = map $_->emailaddress, map $_->contact_email, @contact;
-
   #XXX i'm not compatible with cust_main-require_phone (which is kind of a
   # pre-contact thing anyway)
 
@@ -379,7 +376,7 @@ sub convert_cust_main {
   #$cust_main->payby('BILL');
   #$cust_main->paydate('12/2037');
 
-  $cust_main->insert( {}, \@invoicing_list,
+  $cust_main->insert( {},
     'prospectnum' => $self->prospectnum,
   )
     or $cust_main;