summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/cust_main.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit/process/cust_main.cgi')
-rwxr-xr-xhttemplate/edit/process/cust_main.cgi5
1 files changed, 1 insertions, 4 deletions
diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi
index 054973f..c1f8155 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' ) {