$OUT .= $coupon;\r
}\r
'';\r
---@] \small{\r
+--@] [@-- $smallerfooter ? '\scriptsize{' : '\small{' --@]\r
[@-- $footer --@]\r
}[@-- $coupon ? '\vspace{\extracouponspace}' : '' --@]\r
}\r
{ % ... pages\r
- \small{\r
+ [@-- $smallerfooter ? '\scriptsize{' : '\small{' --@]\r
[@-- $smallfooter --@]\r
}\r
}\r
$OUT .= '\large\textsc{'. $section->{'pretotal'}. '}\\\\';\r
$OUT .= '\\end{flushright}';\r
}\r
- $OUT .= '\pagebreak' if $section{'post_total'};\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
$OUT .= '\caption*{ ';\r
$OUT .= ($section->{'description'}) ? $section->{'description'}: 'Charges';\r
$OUT .= '}\\\\';\r
- $OUT .= '\FShead';\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}Continued from previous page}\\\\';\r
- $OUT .= '\FShead';\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}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
+ if ($section->{total_generator}) {\r
+ $OUT .= &{$section->{total_generator}}($section);\r
+ } else {\r
+ $OUT .= '\FStotaldesc{' . $section->{'description'} . ' Total}' .\r
+ '{' . $section->{'subtotal'} . '}' . "\n";\r
+ }\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
+ if ($section->{total_line_generator}) {\r
+ $OUT .= &{$section->{total_line_generator}}($line);\r
+ } else {\r
+ $OUT .= '\FStotaldesc{' . $line->{'total_item'} . '}' .\r
+ '{' . $line->{'total_amount'} . '}' . "\n";\r
+ }\r
}\r
#}\r
\r
my $rowbreak = @$ext_description < 5 ? '*' : '';\r
\r
$OUT .= "\\hline\n" if ($line->{'ref'} && $line->{'ref'} ne $lastref);\r
- $OUT .= '\FSdesc'.\r
- '{' . ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ) . '}'.\r
- '{' . $line->{'description'} . '}' .\r
- '{' . ( $unitprices ? $line->{'unit_amount'} : '' ) . '}'.\r
- '{' . ( $unitprices ? $line->{'quantity'} : '' ) . '}' .\r
- '{' . $line->{'amount'} . "}${rowbreak}\n";\r
+ if ($section->{description_generator}) {\r
+ $OUT .= &{$section->{description_generator}}($line);\r
+ } else {\r
+ $OUT .= '\FSdesc'.\r
+ '{' . ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ) . '}'.\r
+ '{' . $line->{'description'} . '}' .\r
+ '{' . ( $unitprices ? $line->{'unit_amount'} : '' ) . '}'.\r
+ '{' . ( $unitprices ? $line->{'quantity'} : '' ) . '}' .\r
+ '{' . $line->{'amount'} . "}${rowbreak}\n";\r
+ }\r
$lastref = $line->{'ref'};\r
\r
foreach my $ext_desc (@$ext_description) {\r
- if ( $ext_desc !~ /[^\\]&/ ) {\r
- $ext_desc = substr($ext_desc, 0, 80) . '...'\r
- if (length($ext_desc) > 80);\r
- $ext_desc = '\multicolumn{6}{l}{\small{~~~'. $ext_desc. '}}';\r
- }else{\r
- $ext_desc = "~~~$ext_desc";\r
+ if ($section->{extended_description_generator}) {\r
+ $OUT .= &{$section->{extended_description_generator}}($ext_desc);\r
+ } else {\r
+ if ( $ext_desc !~ /[^\\]&/ ) {\r
+ $ext_desc = substr($ext_desc, 0, 80) . '...'\r
+ if (length($ext_desc) > 80);\r
+ $ext_desc = '\multicolumn{6}{l}{\small{~~~'. $ext_desc. '}}';\r
+ }else{\r
+ $ext_desc = "~~~$ext_desc";\r
+ }\r
+ $OUT .= '\FSextdesc{' . $ext_desc . '}' . "${rowbreak}\n";\r
}\r
- $OUT .= '\FSextdesc{' . $ext_desc . '}' . "${rowbreak}\n";\r
}\r
\r
}\r
--@]\r
\vfill\r
\begin{minipage}[t]{\textwidth}\r
- [@-- length($summary) ? '' : $notes --@]\r
+ [@-- length($summary)\r
+ ? ''\r
+ : ( $smallernotes\r
+ ? '\scriptsize{ '.$notes.' }'\r
+ : $notes\r
+ )\r
+ --@]\r
[@-- $coupon ? '\ifthenelse{\equal{\thepage}{1}}{\rule{0pt}{\extracouponspace}}{}' : '' --@]\r
\end{minipage}\r
\end{document}\r