summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-05-22 14:39:29 -0700
committerMark Wells <mark@freeside.biz>2013-05-22 14:39:29 -0700
commita5be7f4e5e7398207636d729a168211842ac706c (patch)
tree4c2b461e7ffa02b4232b9c058ba1da9b3db8b924 /FS
parent43ff394383c58b3d918dd4798002126d203936c9 (diff)
fix interaction between customer location change and supplemental packages, #23124
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cust_location.pm6
1 files changed, 5 insertions, 1 deletions
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(