projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b512e62
)
fix apportionment of flat fees on zero-charge invoices, #39816
author
Mark Wells
<mark@freeside.biz>
Fri, 22 Apr 2016 17:21:22 +0000
(10:21 -0700)
committer
Mark Wells
<mark@freeside.biz>
Tue, 26 Apr 2016 19:19:28 +0000
(12:19 -0700)
FS/FS/part_fee.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_fee.pm
b/FS/FS/part_fee.pm
index
0ca52a0
..
1d4682c
100644
(file)
--- a/
FS/FS/part_fee.pm
+++ b/
FS/FS/part_fee.pm
@@
-402,7
+402,8
@@
sub lineitem {
# if this is a percentage fee and has line item fractions,
# adjust them to be proportional and to add up correctly.
- if ( @item_base ) {
+ # don't try this if we're charging on a zero-amount set of line items.
+ if ( scalar(@item_base) > 0 and $total_base > 0 ) {
my $cents = $amount * 100;
# not necessarily the same as percent
my $multiplier = $amount / $total_base;