summaryrefslogtreecommitdiff
path: root/conf/invoice_latexsummary
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-02-04 00:48:19 -0800
committerIvan Kohler <ivan@freeside.biz>2013-02-04 00:48:19 -0800
commitfbe12cde0f7e97427693cb0607a5e28d89acf3f7 (patch)
treedc03a6ac86b3e2a8b03cad875119332f859dedfb /conf/invoice_latexsummary
parent924fbbe678936174dd7d49a123d227e884a2dd37 (diff)
better invoice summary, RT#20601
Diffstat (limited to 'conf/invoice_latexsummary')
-rw-r--r--conf/invoice_latexsummary22
1 files changed, 20 insertions, 2 deletions
diff --git a/conf/invoice_latexsummary b/conf/invoice_latexsummary
index 4e4f62bf8..a68e5d381 100644
--- a/conf/invoice_latexsummary
+++ b/conf/invoice_latexsummary
@@ -21,7 +21,16 @@
\textbf{\underline{Summary of New Charges}} & \\
&\\
[@--
- foreach my $section ( grep { $_->{tax_section} || !$_->{summarized} and !($finance_section && $_->{'description'} eq $finance_section) and $_->{'description'} !~ /^\d+ $/ } @sections ) {
+ #false laziness w/invoice_htmlsummary
+ foreach my $section (
+ grep {
+ $_->{tax_section} || !$_->{summarized}
+ and ! $_->{adjust_section}
+ and !($finance_section && $_->{'description'} eq $finance_section)
+ and $_->{'description'} !~ /^\d+ $/
+ }
+ @sections
+ ) {
$OUT .= '\textbf{'. ($section->{'description'} ? $section->{'description'} : 'Charges' ). '}';
$OUT .= '&\textbf{'. $section->{'subtotal'}. '}\\\\';
}
@@ -36,8 +45,17 @@
\textbf{Previous Past Due Charges}&\textbf{\dollar[@-- sprintf('%.2f', $true_previous_balance - $balance_adjustments) --@]}\\
\textbf{Finance charges on overdue amount}&\textbf{\dollar[@-- $finance_amount --@]}\\
\textbf{New Charges}&\textbf{\dollar[@-- $current_less_finance --@]}\\
+
+[@--
+ #false laziness w/invoice_htmlsummary and above
+ foreach my $section ( grep $_->{adjust_section}, @sections ) {
+ $OUT .= '\textbf{'. ($section->{'description'} ? $section->{'description'} : 'Charges' ). '}';
+ $OUT .= '&\textbf{'. $section->{'subtotal'}. '}\\\\';
+ }
+--@]
+
\cline{2-2}
-\textbf{Total Amount Due}&\textbf{\dollar[@-- sprintf('%.2f', $true_previous_balance + $current_charges - $balance_adjustments) --@]}\\
+\textbf{Total Amount Due}&\textbf{\dollar[@-- sprintf('%.2f', $balance) --@]}\\
&\\
\hline
\end{tabular}