summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2014-02-28 12:48:12 -0800
committerMark Wells <mark@freeside.biz>2014-02-28 12:48:12 -0800
commit4757eb16173dcc09d37b2f3856c0b7aba0e4652f (patch)
tree6b9a005c902dc9df84a88fa25aa31e69efb3846f
parente1c6b4af716fecad943bf282b50c0d459b986720 (diff)
unbreak non-usage fees after #27687
-rw-r--r--FS/FS/part_fee.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/FS/FS/part_fee.pm b/FS/FS/part_fee.pm
index fe6325040..2f48bfe16 100644
--- a/FS/FS/part_fee.pm
+++ b/FS/FS/part_fee.pm
@@ -269,6 +269,8 @@ sub lineitem {
' FROM cust_bill_pkg WHERE billpkgnum = ?';
@item_base = map { FS::Record->scalar_sql($sql, $_->billpkgnum) }
@items;
+
+ $amount += $total_base * $self->percent / 100;
}
} else {
# the fee applies to _this_ invoice. It has no payments or credits, so
@@ -279,6 +281,8 @@ sub lineitem {
$total_base = $cust_bill->charged;
@item_base = map { $_->setup + $_->recur }
@items;
+
+ $amount += $total_base * $self->percent / 100;
}
}