- $OUT .= '\captionsetup{singlelinecheck=false,justification=raggedright,font={Large,sc,bf}}';\r
- $OUT .= '\begin{longtable}{cllllllr}';\r
- $OUT .= '\caption*{ ';\r
- $OUT .= ($section->{'description'}) ? $section->{'description'}: 'Charges';\r
- $OUT .= '}\\\\';\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
- }\r
-\r
- #if ($section == $sections[$#sections]) {\r
- foreach my $line (grep {$_->{section}->{description} eq $section->{description}} @total_items) {\r
- $OUT .= '\FStotaldesc{' . $line->{'total_item'} . '}' .\r
- '{' . $line->{'total_amount'} . '}' . "\n";\r
+ $OUT .= '\pagebreak' if $section->{'post_total'};\r
+ unless ($section->{'summarized'} ) {\r
+ $OUT .= '\captionsetup{singlelinecheck=false,justification=raggedright,font={Large,sc,bf}}';\r
+ $OUT .= '\ifthenelse{\equal{\thepage}{1}}{\setlength{\LTextracouponspace}{\extracouponspace}}{\setlength{\LTextracouponspace}{0pt}}'\r
+ if $coupon;\r
+ $OUT .= '\begin{longtable}{cllllllr}';\r
+ $OUT .= '\caption*{ ';\r
+ if ($section->{'location'}) {\r
+ $OUT .= $section->{'location'}{'label_prefix'}. ': '\r
+ if length($section->{'location'}{'label_prefix'});\r
+ $OUT .= $section->{'location'}{'address1'};\r
+ $OUT .= ', ' . $section->{'location'}{'address2'}\r
+ if length($section->{'location'}{'address2'});\r
+ $OUT .= ', ' .\r
+ $section->{'location'}{'city'} . ', ' .\r
+ $section->{'location'}{'state'} . '~' .\r
+ $section->{'location'}{'zip'};\r
+ } elsif ( $section->{'description'} ) {\r
+ $OUT .= ($section->{'description'});\r
+ } else {\r
+ $OUT .= emt('Charges');\r
+ }\r
+ $OUT .= '}\\\\';\r
+ if ($section->{header_generator}) {\r
+ $OUT .= &{$section->{header_generator}}();\r
+ } else {\r
+ $OUT .= '\FShead';\r
+ }\r
+ $OUT .= '\endfirsthead';\r
+ $OUT .= '\multicolumn{7}{r}{\rule{0pt}{2.5ex}'.emt('Continued from previous page').'}\\\\';\r
+ if ($section->{header_generator}) {\r
+ $OUT .= &{$section->{header_generator}}();\r
+ } else {\r
+ $OUT .= '\FShead';\r
+ }\r
+ $OUT .= '\endhead';\r
+ $OUT .= '\multicolumn{7}{r}{\rule{0pt}{2.5ex}'.emt('Continued on next page...').'}\\\\';\r
+ $OUT .= '\endfoot';\r
+ $OUT .= '\hline';\r
+\r
+ if (scalar(@sections) > 1 and !$section->{no_subtotal}) {\r
+ if ($section->{total_generator}) {\r
+ $OUT .= &{$section->{total_generator}}($section);\r
+ } else {\r
+ $OUT .= '\FStotaldesc{' . $section->{'description'} . ' Total}' .\r
+ '{' . $section->{'subtotal'} . '}' . "\n";\r
+ }\r