diff options
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/edit/process/quick-cust_pkg.cgi | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index 67cdb87e8..3938d2adb 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -143,7 +143,18 @@ if ( $quotationnum ) { $quotation_pkg->quotationnum($quotationnum); $quotation_pkg->prospectnum($prospect_main->prospectnum) if $prospect_main; - #XXX handle new location + if ( $locationnum == -1 ) { + my $cust_location = FS::cust_location->new({ + 'custnum' => $custnum, + 'prospectnum' => $prospectnum, + map { $_ => scalar($cgi->param($_)) } + FS::cust_main->location_fields + }); + $opt{'cust_location'} = $cust_location; + } else { + $opt{'locationnum'} = $locationnum; + } + $error = $quotation_pkg->insert || $quotation_pkg->estimate; } else { |