- my $cust_main = new FS::cust_main ( {
- 'agentnum' => $agentnum,
- 'refnum' => $opt{refnum}
- || $conf->config('signup_server-default_refnum'),
- 'payby' => 'BILL',
-
- map { $_ => $opt{$_} } qw(
- agentnum refnum agent_custid referral_custnum
- last first company
- daytime night fax mobile
- payby payinfo paydate paycvv payname
- ),
-
- } );
-
- my @invoicing_list = $opt{'invoicing_list'}
- ? split( /\s*\,\s*/, $opt{'invoicing_list'} )
- : ();
- push @invoicing_list, 'POST' if $opt{'postal_invoicing'};
-
- my ($bill_hash, $ship_hash);
- foreach my $f (FS::cust_main->location_fields) {
- # avoid having to change this in front-end code
- $bill_hash->{$f} = $opt{"bill_$f"} || $opt{$f};
- $ship_hash->{$f} = $opt{"ship_$f"};
- }