[freeside-commits] branch FREESIDE_3_BRANCH updated. 133546cdadf999b58a43e8e1b8ceb5f493e187d6

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


The branch, FREESIDE_3_BRANCH has been updated
       via  133546cdadf999b58a43e8e1b8ceb5f493e187d6 (commit)
      from  6875df5e3719a807640402944abc7a8f9d04ae45 (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 133546cdadf999b58a43e8e1b8ceb5f493e187d6
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Jan 9 18:17:31 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 819dade..aedfe9c 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 = ();

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

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




More information about the freeside-commits mailing list