X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_location.pm;h=1cb5e52c488cd23d853348c6a2124387968b2358;hb=2d2fad4dc5654636abf690e0980b851540f64a5b;hp=4560716d5e9d8f6fd99501a5886ad1ca6699e5e6;hpb=63973c641c4be00765fa27e55c57cc5b9aa4da19;p=freeside.git 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(