fix adding a new location on a quotation, RT#73236
authorIvan Kohler <ivan@freeside.biz>
Wed, 2 Nov 2016 21:53:43 +0000 (14:53 -0700)
committerIvan Kohler <ivan@freeside.biz>
Wed, 2 Nov 2016 21:53:43 +0000 (14:53 -0700)
httemplate/edit/process/quick-cust_pkg.cgi

index 6a346e0..3f1984f 100644 (file)
@@ -191,8 +191,8 @@ if ( $quotationnum ) {
 
   if ( $locationnum == -1 ) {
     my $cust_location = FS::cust_location->new({
-      'custnum'     => $custnum,
-      'prospectnum' => $prospectnum,
+      'custnum'     => $cust_main ? $cust_main->custnum : '',
+      'prospectnum' => $prospect_main ? $prospect_main->prospectnum : '',
       map { $_ => scalar($cgi->param($_)) }
         FS::cust_main->location_fields
     });