diff options
Diffstat (limited to 'conf')
-rw-r--r-- | conf/invoice_htmlsummary | 27 | ||||
-rw-r--r-- | conf/invoice_latexsummary | 15 |
2 files changed, 12 insertions, 30 deletions
diff --git a/conf/invoice_htmlsummary b/conf/invoice_htmlsummary index 249db9b07..c07d7e229 100644 --- a/conf/invoice_htmlsummary +++ b/conf/invoice_htmlsummary @@ -35,15 +35,6 @@ <td align="right"><b><%= $dollar.$current_less_finance %></b></td> </tr> <tr><th colspan=2><br></th></tr> - <tr> - <td><b><u><br>Summary of Payments and Credits<br></u></b></td> - <td></td> - </tr> - <tr> - <td><b>Payments and Credits</b></td> - <td align="right"><b>-<%= $dollar.$balance_adjustments %></b></td> - </tr> - <tr><th colspan=2><br></th></tr> <tr><td colspan=2><br></td></tr> <tr> <td><b><u>Invoice Summary</u></b></td> @@ -61,16 +52,14 @@ <td><b>New Charges</b></td> <td align="right"><b><%= $dollar.$current_less_finance %></b></td> </tr> - <%= - foreach my $section ( grep $_->{adjust_section}, @sections) { - $OUT .= '<tr><td><b>'. ($section->{'description'} ? $section->{'description'} : 'Charges' ). '</b></td>'; - $OUT .= qq(<th align="right"><b>). $section->{'subtotal'}. "</b></th></tr>"; - } - %> - <tr> - <td><b>Payments and Credits</b></td> - <th align="right"><b>-<%= $dollar.sprintf('%.2f', $balance_adjustments) %></b></th> - </tr> + <%= if ( $balance_adjustments > 0 ) { + $OUT .= " + <tr> + <td><b>Payments and Credits</b></td> + <th align='right'><b>-$dollar" . sprintf('%.2f', $balance_adjustments). "</b></th> + </tr> + "; + } %> <tr> <td><b>Total Amount Due</b></td> <td align="right"><b><%= $dollar.sprintf('%.2f', $balance) %></b></td> diff --git a/conf/invoice_latexsummary b/conf/invoice_latexsummary index 52868419b..3b13327dc 100644 --- a/conf/invoice_latexsummary +++ b/conf/invoice_latexsummary @@ -9,12 +9,9 @@ \begin{tabular}{lr} \hline &\\ -\textbf{\underline{Summary of Previous Balance and Payments}} & \\ +\textbf{\underline{Summary of Previous Balance}} & \\ &\\ -\textbf{Previous Balance}&\textbf{\dollar[@-- $true_previous_balance --@]}\\ -\textbf{Payments}&\textbf{\dollar[@-- $balance_adjustments --@]}\\ -\cline{2-2} -\textbf{Balance Outstanding}&\textbf{\dollar[@-- sprintf('%.2f', $true_previous_balance) --@]}\\ +\textbf{Previous Balance}&\textbf{\dollar[@-- sprintf('%.2f', $true_previous_balance) --@]}\\ &\\ \hline &\\ @@ -36,15 +33,11 @@ \textbf{Previous Past Due Charges}&\textbf{\dollar[@-- sprintf('%.2f', $true_previous_balance) --@]}\\ \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'}. '}\\\\'; + if ( $balance_adjustments > 0 ) { + $OUT .= '\textbf{Payments and Credits}&\textbf{-\dollar'.$balance_adjustments.'}\\\\' } --@] - \cline{2-2} \textbf{Total Amount Due}&\textbf{\dollar[@-- sprintf('%.2f', $balance) --@]}\\ &\\ |