diff options
| author | Mitch Jackson <mitch@freeside.biz> | 2018-04-14 19:35:12 -0500 |
|---|---|---|
| committer | Mitch Jackson <mitch@freeside.biz> | 2018-05-19 21:34:25 +0000 |
| commit | 0e73b93c4d08c645047e3b606d7a25e55c3f9235 (patch) | |
| tree | 565425f24bcd274f38eab0cc6f5b877efcadefce | |
| parent | 6ea1cdac9e057d04c334e993416b90e569227f6f (diff) | |
RT# 42357,78190 Fix Fees appearing twice within sectioned invoices
| -rw-r--r-- | FS/FS/Template_Mixin.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm index 6905cf1f1..d3d6bbf8b 100644 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@ -1219,6 +1219,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; |
