summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2017-01-09 18:17:31 -0800
committerIvan Kohler <ivan@freeside.biz>2017-01-09 18:17:31 -0800
commit133546cdadf999b58a43e8e1b8ceb5f493e187d6 (patch)
treee2d73d06cb005d9c82079e8945f292bbff1bf030
parent6875df5e3719a807640402944abc7a8f9d04ae45 (diff)
fix "unable to transfer all services" error when changing a package before it is billed, RT#73377
-rw-r--r--FS/FS/cust_pkg.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 819dadeb6..aedfe9c75 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -4358,8 +4358,10 @@ sub transfer {
$target{$pkg_svc->svcpart} = $pkg_svc->quantity * ( $dest->quantity || 1 );
}
- foreach my $cust_svc ($dest->cust_svc) {
- $target{$cust_svc->svcpart}--;
+ unless ( $self->pkgnum == $dest->pkgnum ) {
+ foreach my $cust_svc ($dest->cust_svc) {
+ $target{$cust_svc->svcpart}--;
+ }
}
my %svcpart2svcparts = ();