[freeside-commits] branch master updated. 2134f9e82324c8920609aa0854abc84b9e5348ae

Ivan ivan at 420.am
Mon Jan 9 18:17:28 PST 2017


The branch, master has been updated
       via  2134f9e82324c8920609aa0854abc84b9e5348ae (commit)
      from  45d8ea4c5d8d66f2945c05a71f2e695c0bf00dac (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2134f9e82324c8920609aa0854abc84b9e5348ae
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Jan 9 18:17:27 2017 -0800

    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 f45abc6..f54b42d 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -4395,8 +4395,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 = ();

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cust_pkg.pm |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list