From: Mitch Jackson Date: Sun, 20 May 2018 00:51:03 +0000 (-0500) Subject: RT# 78190 Fix bill summary missing taxes or fees X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=46aa8e84c2a28f04e5e218b7afa8dbfc9aae2ff6;p=freeside.git RT# 78190 Fix bill summary missing taxes or fees --- diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm index 1bae5bc40..3b8c9e136 100644 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@ -1417,13 +1417,12 @@ sub print_generic { $tax_section->{'description'} = $self->mt($tax_description); $tax_section->{'summarized'} = ''; - if ( !grep $tax_section, @sections ) { + # append tax section unless it's already there + push @sections, $tax_section + unless grep {$_ eq $tax_section} @sections; - # append it if it's not already there - push @sections, $tax_section; - push @summary_subtotals, $tax_section; - - } + push @summary_subtotals, $tax_section + unless grep {$_ eq $tax_section} @summary_subtotals; }