diff options
author | Mark Wells <mark@freeside.biz> | 2014-02-28 12:25:57 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2014-02-28 12:25:57 -0800 |
commit | e24da2a00485cfe81e34731ebebb6d69d4b0eab9 (patch) | |
tree | 1b3340f94e9aa8ce41bf66fffc639856a443eb8c /FS/FS/part_fee.pm | |
parent | beff2bed3d06a91072427a15efef08b24c7cc8df (diff) |
unbreak non-usage fees after #27687
Diffstat (limited to 'FS/FS/part_fee.pm')
-rw-r--r-- | FS/FS/part_fee.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/FS/FS/part_fee.pm b/FS/FS/part_fee.pm index 186fb34..ccf1351 100644 --- a/FS/FS/part_fee.pm +++ b/FS/FS/part_fee.pm @@ -265,6 +265,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 @@ -275,6 +277,8 @@ sub lineitem { $total_base = $cust_bill->charged; @item_base = map { $_->setup + $_->recur } @items; + + $amount += $total_base * $self->percent / 100; } } |