diff options
author | Ivan Kohler <ivan@freeside.biz> | 2016-11-01 16:20:01 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2016-11-01 16:20:01 -0700 |
commit | 49cacb5122d8daacd41903d709681901501be0e5 (patch) | |
tree | 28465e181a64a0f024136bef61173b2d497233f7 /httemplate/edit | |
parent | e3dbd4594395231687cc1b92cbe32d2f82693392 (diff) |
fix adding a new location on a quotation, RT#73236
Diffstat (limited to 'httemplate/edit')
-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 da5afe4..6a346e0 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -189,7 +189,18 @@ if ( $quotationnum ) { ) : (); - #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(%opt); } else { |