X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fquick-cust_pkg.cgi;h=7dcd232bcf2966b98ea112945a32f73da9687d60;hb=e1c6b4af716fecad943bf282b50c0d459b986720;hp=0cc17d36b0554ecae3a40522802f9f5b0f7af671;hpb=54a357b171aa44f9399b4c146acd2afd3b686075;p=freeside.git diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index 0cc17d36b..7dcd232bc 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -70,6 +70,9 @@ my $quantity = $1 || 1; $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; @@ -111,6 +114,7 @@ my %hash = ( ? parse_datetime($cgi->param('start_date')) : '' ), + 'salesnum' => $salesnum, 'refnum' => $refnum, 'contactnum' => $contactnum, 'locationnum' => $locationnum, @@ -155,11 +159,13 @@ if ( $quotationnum ) { } if ( $locationnum == -1 ) { - my $cust_location = FS::cust_location->new_or_existing({ + my $cust_location = FS::cust_location->new({ map { $_ => scalar($cgi->param($_)) } ('custnum', FS::cust_main->location_fields) }); $opt{'cust_location'} = $cust_location; + } else { + $opt{'locationnum'} = $locationnum; } $error = $cust_main->order_pkg( \%opt );