diff options
author | Ivan Kohler <ivan@freeside.biz> | 2016-11-03 11:32:02 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2016-11-03 11:32:02 -0700 |
commit | 1a896a3db22ff50712b055581bc8808c22848c29 (patch) | |
tree | 47e9fafa5ee1dba7a9e225794207f3fde6560254 | |
parent | 2ad3c23b11ac3977445b39f9019795a137bc9626 (diff) |
fix adding a new location on a quotation (v3 fix), RT#73236
-rw-r--r-- | httemplate/edit/process/quick-cust_pkg.cgi | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index 9f3d9e1..b1d0fe4 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -143,6 +143,8 @@ if ( $quotationnum ) { $quotation_pkg->quotationnum($quotationnum); $quotation_pkg->prospectnum($prospect_main->prospectnum) if $prospect_main; + my %opt = (); + if ( $locationnum == -1 ) { my $cust_location = FS::cust_location->new({ 'custnum' => $cust_main ? $cust_main->custnum : '', @@ -155,7 +157,7 @@ if ( $quotationnum ) { $opt{'locationnum'} = $locationnum; } - $error = $quotation_pkg->insert || $quotation_pkg->estimate; + $error = $quotation_pkg->insert(%opt) || $quotation_pkg->estimate; } else { |