[freeside-commits] branch master updated. 02d73ef84103d6bdaf49e6a179a0ad46f9719d25

Ivan Kohler ivan at freeside.biz
Fri Jul 26 11:14:32 PDT 2019


The branch, master has been updated
       via  02d73ef84103d6bdaf49e6a179a0ad46f9719d25 (commit)
      from  07ed221540128b8c75f4cb5a2af1e01b25fa8e18 (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 02d73ef84103d6bdaf49e6a179a0ad46f9719d25
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri Jul 26 11:14:27 2019 -0700

    clarify interface difference between calc_setup and calc_recur: calc_setup takes a start time, calc_recur takes a start time scalar reference, RT#83503

diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm
index f8720a9c7..bf607849b 100644
--- a/FS/FS/part_pkg.pm
+++ b/FS/FS/part_pkg.pm
@@ -1880,7 +1880,7 @@ sub _rebless {
 
 =item calc_setup CUST_PKG START_DATE DETAILS_ARRAYREF OPTIONS_HASHREF
 
-=item calc_recur CUST_PKG START_DATE DETAILS_ARRAYREF OPTIONS_HASHREF
+=item calc_recur CUST_PKG START_DATE_SCALARREF DETAILS_ARRAYREF OPTIONS_HASHREF
 
 Calculates and returns the setup or recurring fees, respectively, for this
 package.  Implementation is in the FS::part_pkg:* module specific to this price
diff --git a/FS/FS/part_pkg/currency_fixed.pm b/FS/FS/part_pkg/currency_fixed.pm
index 41d7a657e..d4c148786 100644
--- a/FS/FS/part_pkg/currency_fixed.pm
+++ b/FS/FS/part_pkg/currency_fixed.pm
@@ -39,22 +39,22 @@ sub price_info {
 }
 
 sub base_setup {
-  my($self, $cust_pkg, $sdate, $details, $param ) = @_;
+  my($self, $cust_pkg, $time, $details, $param ) = @_;
 
-  $self->calc_currency_option('setup_fee', $cust_pkg, $sdate, $details, $param);
+  $self->calc_currency_option('setup_fee', $cust_pkg, $time, $details, $param);
 }
 
 sub calc_setup {
-  my($self, $cust_pkg, $sdate, $details, $param) = @_;
+  my($self, $cust_pkg, $time, $details, $param) = @_;
 
-  return 0 if $self->prorate_setup($cust_pkg, $sdate);
+  return 0 if $self->prorate_setup($cust_pkg, $time);
 
-  $self->base_setup($cust_pkg, $sdate, $details, $param);
+  $self->base_setup($cust_pkg, $time, $details, $param);
 }
 
 use FS::Conf;
 sub calc_currency_option {
-  my($self, $optionname, $cust_or_quotation_pkg, $sdate, $details, $param) = @_;
+  my($self, $optionname, $cust_or_quotation_pkg, $time, $details, $param) = @_;
 
   my($currency, $amount) =
     $cust_or_quotation_pkg->part_pkg_currency_option($optionname);

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

Summary of changes:
 FS/FS/part_pkg.pm                |  2 +-
 FS/FS/part_pkg/currency_fixed.pm | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)




More information about the freeside-commits mailing list