my $unsquelched = $params{unsquelch_cdr} || $cust_main->squelch_cdr ne 'Y';
my $multisection = $self->has_sections;
- $invoice_data{'multisection'} = $multisection;
+ if ( $multisection ) {
+ $invoice_data{multisection} = $conf->config($tc.'sections_method') || 1;
+ }
my $late_sections;
my $extra_sections = [];
my $extra_lines = ();
</table>
<br><br>
+<%=
+
+ my @location_summary_sections =
+ grep {
+ ref $_->{location}
+ && $_->{locationnum}
+ && $_->{description}
+ && $_->{description} ne $finance_section
+ } @sections;
+
+ if ( $multisection eq 'location' && scalar(@location_summary_sections) > 1 ) {
+
+ $OUT .= '
+ <hr>
+ <table width="100%">
+ <tr>
+ <td>
+ <p class="allcaps">
+ <b>'.emt('Summary Of New Charges By Location').'</b>
+ <p>
+ </td>
+ </tr>
+ </table>
+
+ <table class="invoice_longtable" cellspacing="0" width="100%">
+ <thead>
+ <tr>
+ <th></th>
+ <th align="left">'.emt('Location').'</th>
+ <th align="right">'.emt('Amount').'</th>
+ </tr>
+ </thead>
+ <tbody>
+ ';
+
+ for my $section (@location_summary_sections) {
+ next unless $section->{description};
+ $OUT .= '
+ <tr class="invoice_desc_more">
+ <td></td>
+ <td>'.$section->{description}.'</td>
+ <td align="right">'. $section->{subtotal} .'</td>
+ </tr>
+ ';
+ }
+
+ $OUT .= '
+ <tr class="invoice_desc"><td> </td><td> </td><td> </td></tr>
+ </tbody>
+ </table>
+ <br><br>
+ ';
+
+ }
+%>
+
<%= length($summary)
? ''
: ( $smallernotes
}\r
\r
--@]\r
+[@--\r
+\r
+ my @location_summary_sections =\r
+ grep {\r
+ ref $_->{location}\r
+ && $_->{locationnum}\r
+ && $_->{description}\r
+ && $_->{description} ne $finance_section\r
+ } @sections;\r
+ if ( $multisection eq 'location' && scalar(@location_summary_sections) > 1 ) {\r
+\r
+$OUT .= '\r
+ \hline\r
+ \section*{}\r
+ \captionsetup{singlelinecheck=false,justification=raggedright,font={Large,sc,bf}}\r
+ \ifthenelse{\equal{\thepage}{1}}{\setlength{\LTextracouponspace}{\extracouponspace}}{\setlength{\LTextracouponspace}{0pt}}\r
+\r
+ \begin{longtable}{cllllllr}\r
+ \caption*{ '. emt('Summary of New Charges by Location') .' }\r
+ \\\\\r
+\r
+ \hline\r
+ \rule{0pt}{2.5ex}\r
+ \makebox[1.4cm]{} &\r
+ \multicolumn{6}{l}{\r
+ \truncate{13.0cm}{\textbf{'. emt('Location') .'}}\r
+ } &\r
+ \makebox[1.6cm][r]{\textbf{'. emt('Amount') .'}} \\\\\r
+ \hline\r
+\r
+ \endfirsthead\r
+ \multicolumn{7}{r}{\rule{0pt}{2.5ex}'. emt('Continued from previous page') .'}\r
+ \\\r
+ \FShead\r
+ \endhead\r
+ \multicolumn{7}{r}{\rule{0pt}{2.5ex}'. emt('Continued on next page...') .'}\r
+ \\\r
+ \endfoot\r
+ \hline\r
+ \endlastfoot\r
+ \hline\r
+ ';\r
+\r
+ for my $section (@location_summary_sections) {\r
+ $OUT.= '\r
+ \rule{0pt}{2.5ex}\r
+ \makebox[1.4cm]{} &\r
+ \multicolumn{6}{l}{\r
+ \truncate{12.0cm}{\textbf{'. $section->{description} .'}}\r
+ } &\r
+ \makebox[1.6cm][r]{\textbf{'. $section->{subtotal} .'}} \\\\\r
+ ';\r
+ }\r
+\r
+ $OUT .= '\end{longtable}';\r
+ }\r
+--@]\r
\vfill\r
\begin{minipage}[t]{\textwidth}\r
[@-- length($summary)\r