[freeside-commits] branch FREESIDE_3_BRANCH updated. 694cd9058a9f1a89f0ffd2f2881ccc8491aebedb
Mitch Jackson
mitch at freeside.biz
Thu Apr 19 18:19:24 PDT 2018
The branch, FREESIDE_3_BRANCH has been updated
via 694cd9058a9f1a89f0ffd2f2881ccc8491aebedb (commit)
from 5bd4fea086905ddcc1c2a157945258b79852d305 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 694cd9058a9f1a89f0ffd2f2881ccc8491aebedb
Author: Mitch Jackson <mitch at freeside.biz>
Date: Fri Apr 20 00:29:09 2018 +0000
RT# 79636 Location Summary Invoice Footer
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index f32412212..5dc889960 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -937,7 +937,9 @@ sub print_generic {
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 $section_with_taxes = 1
if $conf->config_bool('invoice_sections_with_taxes', $cust_main->agentnum);
my $late_sections;
diff --git a/conf/invoice_html b/conf/invoice_html
index 935c94346..555d1d944 100644
--- a/conf/invoice_html
+++ b/conf/invoice_html
@@ -327,6 +327,62 @@
</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
diff --git a/conf/invoice_latex b/conf/invoice_latex
index 1cbed4a6d..60d2580c7 100644
--- a/conf/invoice_latex
+++ b/conf/invoice_latex
@@ -434,6 +434,64 @@
}
--@]
+[@--
+
+ my @location_summary_sections =
+ grep {
+ ref $_->{location}
+ && $_->{locationnum}
+ && $_->{description}
+ && $_->{description} ne $finance_section
+ } @sections;
+ if ( $multisection eq 'location' && scalar(@location_summary_sections) > 1 ) {
+
+$OUT .= '
+ \hline
+ \section*{}
+ \captionsetup{singlelinecheck=false,justification=raggedright,font={Large,sc,bf}}
+ \ifthenelse{\equal{\thepage}{1}}{\setlength{\LTextracouponspace}{\extracouponspace}}{\setlength{\LTextracouponspace}{0pt}}
+
+ \begin{longtable}{cllllllr}
+ \caption*{ '. emt('Summary of New Charges by Location') .' }
+ \\\\
+
+ \hline
+ \rule{0pt}{2.5ex}
+ \makebox[1.4cm]{} &
+ \multicolumn{6}{l}{
+ \truncate{13.0cm}{\textbf{'. emt('Location') .'}}
+ } &
+ \makebox[1.6cm][r]{\textbf{'. emt('Amount') .'}} \\\\
+ \hline
+
+ \endfirsthead
+ \multicolumn{7}{r}{\rule{0pt}{2.5ex}'. emt('Continued from previous page') .'}
+ \\
+ \FShead
+ \endhead
+ \multicolumn{7}{r}{\rule{0pt}{2.5ex}'. emt('Continued on next page...') .'}
+ \\
+ \endfoot
+ \hline
+ \endlastfoot
+ \hline
+ ';
+
+ for my $section (@location_summary_sections) {
+ $OUT.= '
+ \rule{0pt}{2.5ex}
+ \makebox[1.4cm]{} &
+ \multicolumn{6}{l}{
+ \truncate{12.0cm}{\textbf{'. $section->{description} .'}}
+ } &
+ \makebox[1.6cm][r]{\textbf{'. $section->{subtotal} .'}} \\\\
+ ';
+ }
+
+ $OUT .= '\end{longtable}';
+ }
+--@]
+
\vfill
\begin{minipage}[t]{\textwidth}
[@-- length($summary)
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Template_Mixin.pm | 4 +++-
conf/invoice_html | 56 +++++++++++++++++++++++++++++++++++++++++++++++
conf/invoice_latex | 58 +++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 117 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list