summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cust_main/Billing.pm4
-rw-r--r--FS/FS/part_pkg/flat.pm10
-rw-r--r--FS/FS/part_pkg/recur_Common.pm6
3 files changed, 11 insertions, 9 deletions
diff --git a/FS/FS/cust_main/Billing.pm b/FS/FS/cust_main/Billing.pm
index aadc8e1e9..c0c15e44c 100644
--- a/FS/FS/cust_main/Billing.pm
+++ b/FS/FS/cust_main/Billing.pm
@@ -1087,7 +1087,9 @@ sub _make_lines {
}
$lineitems++
- if $cust_pkg->waive_setup && $part_pkg->can('prorate_setup') && $part_pkg->prorate_setup($cust_pkg, $time);
+ if $cust_pkg->waive_setup
+ && $part_pkg->can('prorate_setup')
+ && $part_pkg->prorate_setup($cust_pkg, $time);
if ( $cust_pkg->get('setup') ) {
# don't change it
diff --git a/FS/FS/part_pkg/flat.pm b/FS/FS/part_pkg/flat.pm
index c06328b1b..762ecebc0 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->base_setup($cust_pkg, $sdate, $details);
+ my $charge = $self->base_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 base_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 729fb6125..fc87628ea 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'};
}