diff options
author | Ivan Kohler <ivan@freeside.biz> | 2016-11-01 16:21:06 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2016-11-01 16:21:06 -0700 |
commit | 7df69c8d38d07327d11c009a08f8cf3fa1891cd0 (patch) | |
tree | c33f8884ee69746142b8a6e6c183807584777429 /httemplate | |
parent | 125e0f4ef17299fd25d7dacfccdc5fa5f23a4a9d (diff) |
fix adding a new location on a quotation, RT#73236
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 { |