summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2016-11-01 16:20:01 -0700
committerIvan Kohler <ivan@freeside.biz>2016-11-01 16:20:01 -0700
commit49cacb5122d8daacd41903d709681901501be0e5 (patch)
tree28465e181a64a0f024136bef61173b2d497233f7 /httemplate/edit
parente3dbd4594395231687cc1b92cbe32d2f82693392 (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.cgi13
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 {