RT# 42357,78190 Fix Fees appearing twice within sectioned invoices
[freeside.git] / conf / invoice_latexsummary
index a68e5d3..5286841 100644 (file)
 \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 -$balance_adjustments) --@]}\\
+\textbf{Balance Outstanding}&\textbf{\dollar[@-- sprintf('%.2f', $true_previous_balance) --@]}\\
 &\\
 \hline
 &\\
 \textbf{\underline{Summary of New Charges}} & \\
 &\\
 [@--
-  #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
-  ) {
+  foreach my $section (@summary_subtotals) {
     $OUT .= '\textbf{'. ($section->{'description'} ? $section->{'description'} : 'Charges' ). '}';
     $OUT .= '&\textbf{'. $section->{'subtotal'}. '}\\\\';
   }
@@ -42,7 +33,7 @@
 &\\
 \textbf{\underline{Invoice Summary}} & \\
 & \\
-\textbf{Previous Past Due Charges}&\textbf{\dollar[@-- sprintf('%.2f', $true_previous_balance - $balance_adjustments) --@]}\\
+\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 --@]}\\
 
@@ -61,3 +52,4 @@
 \end{tabular}
 \end{minipage} \\
 \end{tabular}
+\newpage