RT#41124: Backend Unti Search
[freeside.git] / httemplate / edit / process / cust_main.cgi
index 747de20..99c7f90 100755 (executable)
@@ -76,8 +76,8 @@ if ( ($cgi->param('same') || '') eq 'Y' ) {
 # but explicitly avoid setting ship_ fields
 
 my $new = new FS::cust_main ( {
-  map { ( $_, scalar($cgi->param($_)) ) } (fields('cust_main')),
-  map { ( "ship_$_", '' ) } (FS::cust_main->location_fields)
+  (map { ( $_, scalar($cgi->param($_)) ) } (fields('cust_main'))),
+  (map { ( "ship_$_", '' ) } (FS::cust_main->location_fields))
 } );
 
 warn Dumper( $new ) if $DEBUG > 1;
@@ -165,7 +165,7 @@ if ( $cgi->param('residential_commercial') eq 'Residential' ) {
     $error = 'Email address required';
   }
 
-  $options{'invoicing_list'} = [ $email ];
+  $options{'invoicing_list'} = [ split(/\s*,\s*/, $email) ];
   # XXX really should include the phone numbers in here also
 
 } else {