Merge branch 'patch-19' of https://github.com/gjones2/Freeside
[freeside.git] / conf / invoice_latexsummary
1 \begin{tabular}{ll}
2 \begin{minipage}{6.4cm}
3 \begin{tabular}{m{0cm}m{6.4cm}}
4 \rule{0cm}{10cm}&\begin{minipage}{6cm}[@-- $notes --@]\end{minipage}\\
5 \end{tabular}
6 \end{minipage} &
7 \rule{2cm}{0cm}
8 \begin{minipage}{12.8cm}
9 \begin{tabular}{lr}
10 \hline
11 &\\
12 \textbf{\underline{Summary of Previous Balance and Payments}} & \\
13 &\\
14 \textbf{Previous Balance}&\textbf{\dollar[@-- $true_previous_balance --@]}\\
15 \textbf{Payments}&\textbf{\dollar[@-- $balance_adjustments --@]}\\
16 \cline{2-2}
17 \textbf{Balance Outstanding}&\textbf{\dollar[@-- sprintf('%.2f', $true_previous_balance -$balance_adjustments) --@]}\\
18 &\\
19 \hline
20 &\\
21 \textbf{\underline{Summary of New Charges}} & \\
22 &\\
23 [@--
24   #false laziness w/invoice_htmlsummary
25   foreach my $section (
26     grep {
27                $_->{tax_section} || !$_->{summarized}
28            and ! $_->{adjust_section}
29            and !($finance_section && $_->{'description'} eq $finance_section)
30            and $_->{'description'} !~ /^\d+ $/
31          }
32       @sections
33   ) {
34     $OUT .= '\textbf{'. ($section->{'description'} ? $section->{'description'} : 'Charges' ). '}';
35     $OUT .= '&\textbf{'. $section->{'subtotal'}. '}\\\\';
36   }
37   $OUT .= '\cline{2-2}';
38 --@]
39 \textbf{New Charges Total}&\textbf{\dollar[@-- $current_less_finance --@]}\\
40 &\\
41 \hline
42 &\\
43 \textbf{\underline{Invoice Summary}} & \\
44 & \\
45 \textbf{Previous Past Due Charges}&\textbf{\dollar[@-- sprintf('%.2f', $true_previous_balance - $balance_adjustments) --@]}\\
46 \textbf{Finance charges on overdue amount}&\textbf{\dollar[@-- $finance_amount --@]}\\
47 \textbf{New Charges}&\textbf{\dollar[@-- $current_less_finance --@]}\\
48
49 [@--
50   #false laziness w/invoice_htmlsummary and above
51   foreach my $section ( grep $_->{adjust_section}, @sections ) {
52     $OUT .= '\textbf{'. ($section->{'description'} ? $section->{'description'} : 'Charges' ). '}';
53     $OUT .= '&\textbf{'. $section->{'subtotal'}. '}\\\\';
54   }
55 --@]
56
57 \cline{2-2}
58 \textbf{Total Amount Due}&\textbf{\dollar[@-- sprintf('%.2f', $balance) --@]}\\
59 &\\
60 \hline
61 \end{tabular}
62 \end{minipage} \\
63 \end{tabular}