From 1a896a3db22ff50712b055581bc8808c22848c29 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 3 Nov 2016 11:32:02 -0700 Subject: [PATCH] fix adding a new location on a quotation (v3 fix), RT#73236 --- httemplate/edit/process/quick-cust_pkg.cgi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index 9f3d9e12d..b1d0fe423 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 { -- 2.11.0