From a59da6000c99b8fa3f391122900c44735593f544 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Fri, 29 Mar 2013 23:15:21 -0700 Subject: better detection of new locations that are the same as existing locations, #940, #13763, #14717 --- httemplate/edit/process/quick-cust_pkg.cgi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'httemplate/edit/process/quick-cust_pkg.cgi') diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index 2dadbccdc..4ea4ace9e 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -143,10 +143,10 @@ if ( $quotationnum ) { my %opt = ( 'cust_pkg' => $cust_pkg ); if ( $locationnum == -1 ) { - my $cust_location = new FS::cust_location { + my $cust_location = FS::cust_location->new_or_existing({ map { $_ => scalar($cgi->param($_)) } - qw( custnum address1 address2 city county state zip country geocode ) - }; + ('custnum', FS::cust_main->location_fields) + }); $opt{'cust_location'} = $cust_location; } -- cgit v1.2.1