[freeside-commits] branch FREESIDE_3_BRANCH updated. f479f1a024a2749279c82a4e2a54e5ca00755e7b
Ivan Kohler
ivan at freeside.biz
Fri Jul 26 11:10:44 PDT 2019
The branch, FREESIDE_3_BRANCH has been updated
via f479f1a024a2749279c82a4e2a54e5ca00755e7b (commit)
from c1cf74717bd47f5b89123eb1324c0e990c6dfe4d (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 f479f1a024a2749279c82a4e2a54e5ca00755e7b
Author: Ivan Kohler <ivan at freeside.biz>
Date: Fri Jul 26 11:10:39 2019 -0700
fix intro rates packages vs discounts, RT#83503
diff --git a/FS/FS/part_pkg/flat.pm b/FS/FS/part_pkg/flat.pm
index db493e751..cfcfb0283 100644
--- a/FS/FS/part_pkg/flat.pm
+++ b/FS/FS/part_pkg/flat.pm
@@ -121,9 +121,9 @@ sub price_info {
}
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);
my $i = 0;
my $count = $self->option( 'additional_count', 'quiet' ) || 0;
@@ -131,12 +131,12 @@ sub calc_setup {
push @$details, $self->option( 'additional_info' . $i++ );
}
- my $charge = $self->unit_setup($cust_pkg, $sdate, $details);
+ my $charge = $self->unit_setup($cust_pkg, $time, $details);
my $discount = 0;
if ( $charge > 0 ) {
$param->{'setup_charge'} = $charge;
- $discount = $self->calc_discount($cust_pkg, $sdate, $details, $param);
+ $discount = $self->calc_discount($cust_pkg, \$time, $details, $param);
delete $param->{'setup_charge'};
}
@@ -144,7 +144,7 @@ sub calc_setup {
}
sub unit_setup {
- my($self, $cust_pkg, $sdate, $details ) = @_;
+ my($self, $cust_pkg, $time, $details ) = @_;
$self->option('setup_fee', 1) || 0;
}
diff --git a/FS/FS/part_pkg/recur_Common.pm b/FS/FS/part_pkg/recur_Common.pm
index 0103b9560..6abe09891 100644
--- a/FS/FS/part_pkg/recur_Common.pm
+++ b/FS/FS/part_pkg/recur_Common.pm
@@ -21,16 +21,16 @@ sub base_recur {
sub calc_setup {
# moved from all descendant packages which just had $self->option('setup_fee')
- 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);
my $charge = $self->option('setup_fee');
my $discount = 0;
if ( $charge > 0 ) {
$param->{'setup_charge'} = $charge;
- $discount = $self->calc_discount($cust_pkg, $sdate, $details, $param);
+ $discount = $self->calc_discount($cust_pkg, \$time, $details, $param);
delete $param->{'setup_charge'};
}
-----------------------------------------------------------------------
Summary of changes:
FS/FS/part_pkg/flat.pm | 10 +++++-----
FS/FS/part_pkg/recur_Common.pm | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
More information about the freeside-commits
mailing list