<%= $notes %>
<%= my ($last) = grep { $_->{tax_section} || !$_->{summarized} and !($finance_section && $_->{'description'} eq $finance_section)} reverse @sections; foreach my $section ( grep { $_->{tax_section} || !$_->{summarized} and !($finance_section && $_->{'description'} eq $finance_section)} @sections ) { $OUT .= ''; my $celltype = ($last == $section) ? 'th' : 'td'; $OUT .= qq(<$celltype align="right">). $section->{'subtotal'}. ""; } %>


Summary of Previous Balance and Payments
Previous Balance <%= $dollar.$true_previous_balance %>
Payments <%= $dollar.$balance_adjustments %>
Balance Outstanding <%= $dollar.sprintf('%.2f', $true_previous_balance - $balance_adjustments) %>


Summary of New Charges

'. ($section->{'description'} ? $section->{'description'} : 'Charges' ). '
New Charges Total <%= $dollar.$current_less_finance %>


Invoice Summary

Previous Past Due Charges <%= $dollar.sprintf('%.2f', $true_previous_balance - $balance_adjustments) %>
Finance charges on overdue amount <%= $dollar.$finance_amount %>
New Charges <%= $dollar.$current_less_finance %>
Total Amount Due <%= $dollar.sprintf('%.2f', $true_previous_balance + $current_charges - $balance_adjustments) %>