foreach my $section ( grep { !$summary || $_->{description} ne $finance_section } @sections ) {
if ($section->{'pretotal'} && !$summary) {
foreach my $section ( grep { !$summary || $_->{description} ne $finance_section } @sections ) {
if ($section->{'pretotal'} && !$summary) {