- if ( $conf->config_bool('invoice_sections_with_taxes', $cust_main->agentnum) ) {
-
- # 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 tax section unless it's already there
+ push @sections, $tax_section
+ unless grep {$_ eq $tax_section} @sections;