$cgi->param( 'exp_month' ). '-'. $cgi->param( 'exp_year' ) );
}
-my @invoicing_list = split( /\s*\,\s*/, $cgi->param('invoicing_list') );
+my @invoicing_list = split( /[,\s]+/, $cgi->param('invoicing_list') );
push @invoicing_list, 'POST' if $cgi->param('invoicing_list_POST');
push @invoicing_list, 'FAX' if $cgi->param('invoicing_list_FAX');
$cgi->param('invoicing_list', join(',', @invoicing_list) );
$new->invoice_noemail( ($cgi->param('invoice_email') eq 'Y') ? '' : 'Y' );
+# add any virtual fields to the new cust_main record
+foreach ($new->virtual_fields) {
+ $new->setfield($_, scalar($cgi->param($_)));
+}
+
if ( $duplicate_of ) {
# then negate all changes to the customer; the only change we should
# make is to order a package, if requested