fix A/R report
[freeside.git] / conf / invoice_latexsummary
index 4e4f62b..bd4ea69 100644 (file)
@@ -21,7 +21,7 @@
 \textbf{\underline{Summary of New Charges}} & \\
 &\\
 [@--
-  foreach my $section ( grep { $_->{tax_section} || !$_->{summarized} 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'}. '}\\\\';
   }
 \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}
 \end{minipage} \\
 \end{tabular}
+\newpage