summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/cust_location.cgi
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-03-29 23:15:21 -0700
committerMark Wells <mark@freeside.biz>2013-03-29 23:15:21 -0700
commita59da6000c99b8fa3f391122900c44735593f544 (patch)
treec6619bd01455cbe57df9b4b9fc532c1f8112c89e /httemplate/edit/process/cust_location.cgi
parent75ddd5240b233dd45f1d748f628e01238be0e751 (diff)
better detection of new locations that are the same as existing locations, #940, #13763, #14717
Diffstat (limited to 'httemplate/edit/process/cust_location.cgi')
-rw-r--r--httemplate/edit/process/cust_location.cgi5
1 files changed, 2 insertions, 3 deletions
diff --git a/httemplate/edit/process/cust_location.cgi b/httemplate/edit/process/cust_location.cgi
index b9f93db8b..56c3968f6 100644
--- a/httemplate/edit/process/cust_location.cgi
+++ b/httemplate/edit/process/cust_location.cgi
@@ -28,11 +28,10 @@ my $cust_location = qsearchs({
});
die "unknown locationnum $locationnum" unless $cust_location;
-my $new = FS::cust_location->new({
+my $new = FS::cust_location->new_or_existing({
custnum => $cust_location->custnum,
prospectnum => $cust_location->prospectnum,
- map { $_ => scalar($cgi->param($_)) }
- qw( address1 address2 city county state zip country )
+ map { $_ => scalar($cgi->param($_)) } FS::cust_main->location_fields
});
my $error = $cust_location->move_to($new);