- foreach my $section ( @sections ) {\r
- $OUT .= '\section*{\textsc{';\r
- $OUT .= ($section->{'description'}) ? $section->{'description'} : 'Charges';\r
- $OUT .= '}}\begin{longtable}{cllllllr}';\r
- $OUT .= '\hline';\r
- $OUT .= '\rule{0pt}{2.5ex}';\r
- $OUT .= '\makebox[1.4cm]{\textbf{Ref}} & ';\r
- $OUT .= '\multicolumn{6}{l}{\makebox[12.8cm][l]{\textbf{Description}}} & ';\r
- $OUT .= '\makebox[2.5cm][r]{\textbf{Amount}} \\\\';\r
- $OUT .= '\hline';\r
- $OUT .= '\endfirsthead';\r
- $OUT .= '\multicolumn{7}{r}{\rule{0pt}{2.5ex}Continued from previous page}\\\\';\r
- $OUT .= '\hline';\r
- $OUT .= '\rule{0pt}{2.5ex}';\r
- $OUT .= '\makebox[1.4cm]{\textbf{Ref}} & ';\r
- $OUT .= '\multicolumn{6}{l}{\makebox[12.8cm][l]{\textbf{Description}}} & ';\r
- $OUT .= '\makebox[2.5cm][r]{\textbf{Amount}} \\\\';\r
- $OUT .= '\hline';\r
- $OUT .= '\endhead';\r
- $OUT .= '\multicolumn{7}{r}{\rule{0pt}{2.5ex}Continued on next page...}\\\\';\r
- $OUT .= '\endfoot';\r
- $OUT .= '\hline';\r
-\r
- if (scalar(@sections) > 1) {\r
- $OUT .= '\FStotaldesc{' . $section->{'description'} . ' Total}' .\r
- '{' . $section->{'subtotal'} . '}' . "\n";\r
+ foreach my $section ( grep { !$summary || $_->{description} ne $finance_section } @sections ) {\r
+ if ($section->{'pretotal'} && !$summary) {\r
+ $OUT .= '\begin{flushright}';\r
+ $OUT .= '\large\textsc{'. $section->{'pretotal'}. '}\\\\';\r
+ $OUT .= '\\end{flushright}';\r