summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2016-11-01 16:21:00 -0700
committerIvan Kohler <ivan@freeside.biz>2016-11-01 16:21:00 -0700
commit569c8e243c450b46cc4d28d513a4e83d6128d03c (patch)
tree996c4d64cc95ffcb2348245491b09cee77269486 /httemplate
parentf54d295490980875e4762ee008b9de7c6471ec77 (diff)
fix adding a new location on a quotation, RT#73236
Diffstat (limited to 'httemplate')
-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 da5afe440..6a346e0be 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 {