From: Ivan Kohler Date: Tue, 10 Jan 2017 02:17:29 +0000 (-0800) Subject: fix "unable to transfer all services" error when changing a package before it is... X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=b587f4775b0ac6eecd6bdeec921fe0bbd4e8720a;p=freeside.git fix "unable to transfer all services" error when changing a package before it is billed, RT#73377 --- diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index b491f9192..48e42634b 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 = ();