[freeside-commits] branch FREESIDE_3_BRANCH updated. 189524c12d69394769d3e88a18d6777a68ac6064

Mark Wells mark at 420.am
Fri Aug 19 14:46:38 PDT 2016


The branch, FREESIDE_3_BRANCH has been updated
       via  189524c12d69394769d3e88a18d6777a68ac6064 (commit)
      from  30026a09a72bb16b8c7e17035250b9d797bd47e2 (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 189524c12d69394769d3e88a18d6777a68ac6064
Author: Mark Wells <mark at freeside.biz>
Date:   Fri Aug 19 14:44:28 2016 -0700

    fix backporting issues, #72097

diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm
index 0b110f5..8e4fa26 100644
--- a/FS/FS/cust_bill_pkg.pm
+++ b/FS/FS/cust_bill_pkg.pm
@@ -838,8 +838,7 @@ sub _item_discount {
     $d = {
       _is_discount    => 1,
       description     => $self->mt('Discount'),
-      setup_amount    => 0,
-      recur_amount    => 0,
+      amount          => 0,
       ext_description => \@ext,
       pkgpart         => $self->pkgpart,
       feepart         => $self->feepart,
@@ -847,8 +846,7 @@ sub _item_discount {
     };
     foreach my $pkg_discount (@pkg_discounts) {
       push @ext, $pkg_discount->description;
-      my $setuprecur = $pkg_discount->cust_pkg_discount->setuprecur;
-      $d->{$setuprecur.'_amount'} -= $pkg_discount->amount;
+      $d->{'amount'} -= $pkg_discount->amount;
     }
   }
 
@@ -866,8 +864,7 @@ sub _item_discount {
   }
 
   if ( $d ) {
-    $d->{setup_amount} *= $self->quantity || 1; # ??
-    $d->{recur_amount} *= $self->quantity || 1; # ??
+    $d->{amount} *= $self->quantity || 1;
   }
     
   $d;
diff --git a/FS/FS/part_pkg/flat_introrate.pm b/FS/FS/part_pkg/flat_introrate.pm
index e43a525..f9adcd0 100644
--- a/FS/FS/part_pkg/flat_introrate.pm
+++ b/FS/FS/part_pkg/flat_introrate.pm
@@ -106,8 +106,7 @@ sub item_discount {
   { '_is_discount'    => 1,
     'description'     => $cust_pkg->mt('Introductory discount until') . ' ' .
                          $cust_pkg->time2str_local('short', $intro_end),
-    'setup_amount'    => 0,
-    'recur_amount'    => $amount,
+    'amount'          => $amount,
     'ext_description' => [],
     'pkgpart'         => $self->pkgpart,
     'feepart'         => '',

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

Summary of changes:
 FS/FS/cust_bill_pkg.pm           |    9 +++------
 FS/FS/part_pkg/flat_introrate.pm |    3 +--
 2 files changed, 4 insertions(+), 8 deletions(-)




More information about the freeside-commits mailing list