summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-11-05 19:55:26 -0800
committerMark Wells <mark@freeside.biz>2015-11-05 19:56:05 -0800
commite2d16c850d8857567023f10b8c57daf0570c6a8e (patch)
tree7dec4e22e0018f3d94b1715df9dd6777c15a731d /FS
parentf8c4741390077c1448d627949d19c9220cc8e610 (diff)
ignore discount duration when applying to setup fee, #38489
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/part_pkg/discount_Mixin.pm8
1 files changed, 2 insertions, 6 deletions
diff --git a/FS/FS/part_pkg/discount_Mixin.pm b/FS/FS/part_pkg/discount_Mixin.pm
index 194479e56..e411c84e8 100644
--- a/FS/FS/part_pkg/discount_Mixin.pm
+++ b/FS/FS/part_pkg/discount_Mixin.pm
@@ -123,17 +123,13 @@ sub calc_discount {
if ( $discount->percent > 0 ) {
$amount = $discount->percent * $param->{'setup_charge'} / 100;
- } elsif ( $discount->amount > 0 && ($discount->months || 0) == 1) {
+ } elsif ( $discount->amount > 0 ) {
# apply the discount amount, up to a maximum of the setup charge
$amount = min($discount->amount, $param->{'setup_charge'});
$discount_left = sprintf('%.2f', $discount->amount - $amount);
# transfer remainder of discount, if any, to recur
$param->{'discount_left_recur'}{$discount->discountnum} = $discount_left;
- } else {
- # I guess we don't allow multiple-month flat amount discounts to
- # apply to setup?
- next;
- }
+ }
} else {