summaryrefslogtreecommitdiff
path: root/FS/FS/cust_location.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-05-22 14:41:10 -0700
committerMark Wells <mark@freeside.biz>2013-05-22 14:41:10 -0700
commit2d2fad4dc5654636abf690e0980b851540f64a5b (patch)
treeed9af4fed4d0ad3ce173253b1a7ced428173f5ef /FS/FS/cust_location.pm
parent6ce6794cdbf96da682249d66504fef237b54bf0f (diff)
fix interaction between customer location change and supplemental packages, #23124
Diffstat (limited to 'FS/FS/cust_location.pm')
-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 4560716..1cb5e52 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(