From 2d2fad4dc5654636abf690e0980b851540f64a5b Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Wed, 22 May 2013 14:41:10 -0700 Subject: [PATCH] fix interaction between customer location change and supplemental packages, #23124 --- FS/FS/cust_location.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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( -- 2.11.0