From: Mark Wells Date: Wed, 22 May 2013 21:41:10 +0000 (-0700) Subject: fix interaction between customer location change and supplemental packages, #23124 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=2d2fad4dc5654636abf690e0980b851540f64a5b fix interaction between customer location change and supplemental packages, #23124 --- diff --git a/FS/FS/cust_location.pm b/FS/FS/cust_location.pm index 4560716d5..1cb5e52c4 100644 --- a/FS/FS/cust_location.pm +++ b/FS/FS/cust_location.pm @@ -424,9 +424,13 @@ sub move_to { } } + # find all packages that have the old location as their service address, + # and aren't canceled, + # and aren't supplemental to another package. my @pkgs = qsearch('cust_pkg', { 'locationnum' => $old->locationnum, - 'cancel' => '' + 'cancel' => '', + 'main_pkgnum' => '', }); foreach my $cust_pkg (@pkgs) { $error = $cust_pkg->change(