$cgi->param('refnum') =~ /^(\d*)$/
or die 'illegal refnum '. $cgi->param('refnum');
my $refnum = $1;
+$cgi->param('salesnum') =~ /^(\d*)$/
+ or die 'illegal salesnum '. $cgi->param('salesnum');
+my $salesnum = $1;
$cgi->param('contactnum') =~ /^(\-?\d*)$/
or die 'illegal contactnum '. $cgi->param('contactnum');
my $contactnum = $1;
? parse_datetime($cgi->param('start_date'))
: ''
),
+ 'salesnum' => $salesnum,
'refnum' => $refnum,
'contactnum' => $contactnum,
'locationnum' => $locationnum,
('custnum', FS::cust_main->location_fields)
});
$opt{'cust_location'} = $cust_location;
+ } else {
+ $opt{'locationnum'} = $locationnum;
}
$error = $cust_main->order_pkg( \%opt );