- # If all tax items are displayed in location/category sections,
- # remove the empty tax section
- @sections = grep{ $_ ne $tax_section } @sections
- unless grep{ $_->{section} eq $tax_section } @detail_items;
-
- } elsif ( !grep $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;