X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_fee.pm;h=1d4682c1eed4866034666e724c8559054f4bfc19;hp=0ca52a096f9eb44eba5a157331aec12a8bb78600;hb=ff27c3f36240aee48ed50153dd5d8fe3ac3f2443;hpb=817c1ce0e1cbcfd1f684222c66f46dd13b2d6dd7 diff --git a/FS/FS/part_fee.pm b/FS/FS/part_fee.pm index 0ca52a096..1d4682c1e 100644 --- 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;