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/cust_main.cgi | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'httemplate/edit/process/cust_main.cgi') diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 054973f23..c1f815550 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -83,10 +83,7 @@ for my $pre (qw(bill ship)) { } $hash{'custnum'} = $cgi->param('custnum'); warn Dumper \%hash if $DEBUG; - # if we can qsearchs it, then it's unchanged, so use that - $locations{$pre} = qsearchs('cust_location', \%hash) - || FS::cust_location->new( \%hash ); - + $locations{$pre} = FS::cust_location->new_or_existing(\%hash); } if ( ($cgi->param('same') || '') eq 'Y' ) { -- cgit v1.2.1