diff options
author | Ivan Kohler <ivan@freeside.biz> | 2017-01-09 18:17:29 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2017-01-09 18:17:29 -0800 |
commit | b587f4775b0ac6eecd6bdeec921fe0bbd4e8720a (patch) | |
tree | 83423de82a54451a828f3aa93b79227bd2e35cdc /FS/FS/cust_pkg.pm | |
parent | 6815e03a940842b56b69a4cf4d44e9804a14fbab (diff) |
fix "unable to transfer all services" error when changing a package before it is billed, RT#73377
Diffstat (limited to 'FS/FS/cust_pkg.pm')
-rw-r--r-- | FS/FS/cust_pkg.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index b491f91..48e4263 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -4402,8 +4402,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 = (); |