X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FTemplate_Mixin.pm;h=7ea22b55dacf3ebda0ad5b99f9c444da08d00b2d;hp=4f5501d151191b0d8ba2065c2b12765288c309da;hb=5828f9ef8d7c9e424423ba2063840060d2da8b6e;hpb=fe2fad859d8444565c0bb35f438accfdf4a240af diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm index 4f5501d15..7ea22b55d 100644 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@ -1216,6 +1216,17 @@ sub print_generic { foreach my $line_item ( $self->_items_pkg(%options), $self->_items_fee(%options) ) { + # When bill is sectioned by location, fees may be displayed within the + # appropriate location section. Suppress this fee from the taxes/fees + # end section, so it doesn't appear to be charged twice and make the + # subtotals seem incorrect + next + if $line_item->{locationnum} + && ref $options{section} + && !exists $options{section}->{locationnum} + && $self->has_sections + && $conf->config($tc.'sections_method') eq 'location'; + warn "$me adding line item ". join(', ', map "$_=>".$line_item->{$_}, keys %$line_item). "\n" if $DEBUG > 1;