diff options
author | Christopher Burger <burgerc@freeside.biz> | 2018-05-15 08:18:24 -0400 |
---|---|---|
committer | Christopher Burger <burgerc@freeside.biz> | 2018-05-15 08:18:24 -0400 |
commit | 315d827c0e9b2faca5192fce1ccb2e3ee746e68c (patch) | |
tree | 2603d55b299492b3f41f9d84339df7de65976a45 /FS/FS/part_pkg | |
parent | 7eff77c9579ff987439e1e6a82aa79cf147478a4 (diff) |
Revert "RT# 77964 - fixed so deferring date now works when waive setup fee is set"
This reverts commit b8aea2bf8dcebf7a6b9a217ee78114e42404fe68.
Diffstat (limited to 'FS/FS/part_pkg')
-rw-r--r-- | FS/FS/part_pkg/flat.pm | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/FS/FS/part_pkg/flat.pm b/FS/FS/part_pkg/flat.pm index 0bc3860..6fd9c7d 100644 --- a/FS/FS/part_pkg/flat.pm +++ b/FS/FS/part_pkg/flat.pm @@ -118,27 +118,22 @@ sub calc_setup { return 0 if $self->prorate_setup($cust_pkg, $sdate); - if (!$cust_pkg->waive_setup) { - my $i = 0; - my $count = $self->option( 'additional_count', 'quiet' ) || 0; - while ($i < $count) { - push @$details, $self->option( 'additional_info' . $i++ ); - } + my $i = 0; + my $count = $self->option( 'additional_count', 'quiet' ) || 0; + while ($i < $count) { + push @$details, $self->option( 'additional_info' . $i++ ); + } - my $charge = $self->base_setup($cust_pkg, $sdate, $details); + my $charge = $self->base_setup($cust_pkg, $sdate, $details); - my $discount = 0; - if ( $charge > 0 ) { + my $discount = 0; + if ( $charge > 0 ) { $param->{'setup_charge'} = $charge; $discount = $self->calc_discount($cust_pkg, $sdate, $details, $param); delete $param->{'setup_charge'}; - } - - return sprintf( '%.2f', ($cust_pkg->quantity || 1) * ($charge - $discount) ); } - return; - + sprintf( '%.2f', ($cust_pkg->quantity || 1) * ($charge - $discount) ); } sub base_setup { |