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/change-cust_pkg.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/edit/process/change-cust_pkg.html') diff --git a/httemplate/edit/process/change-cust_pkg.html b/httemplate/edit/process/change-cust_pkg.html index 2770f3283..77f261d56 100644 --- a/httemplate/edit/process/change-cust_pkg.html +++ b/httemplate/edit/process/change-cust_pkg.html @@ -32,11 +32,11 @@ my %change = map { $_ => scalar($cgi->param($_)) } $change{'keep_dates'} = 1; if ( $cgi->param('locationnum') == -1 ) { - my $cust_location = new FS::cust_location { + my $cust_location = FS::cust_location->new_or_existing({ 'custnum' => $cust_pkg->custnum, map { $_ => scalar($cgi->param($_)) } qw( address1 address2 city county state zip country ) - }; + }); $change{'cust_location'} = $cust_location; } -- cgit v1.2.1 From 786d21e09d1f11c8976a8d45ef734d2d0a100ee7 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Sun, 5 May 2013 16:44:26 -0700 Subject: allow certain minor location edits without moving packages, #940 --- httemplate/edit/process/change-cust_pkg.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit/process/change-cust_pkg.html') diff --git a/httemplate/edit/process/change-cust_pkg.html b/httemplate/edit/process/change-cust_pkg.html index 77f261d56..c893f13a2 100644 --- a/httemplate/edit/process/change-cust_pkg.html +++ b/httemplate/edit/process/change-cust_pkg.html @@ -32,7 +32,7 @@ my %change = map { $_ => scalar($cgi->param($_)) } $change{'keep_dates'} = 1; if ( $cgi->param('locationnum') == -1 ) { - my $cust_location = FS::cust_location->new_or_existing({ + my $cust_location = FS::cust_location->new({ 'custnum' => $cust_pkg->custnum, map { $_ => scalar($cgi->param($_)) } qw( address1 address2 city county state zip country ) -- cgit v1.2.1