add start of torrus srvderive daemon, RT#10574
[freeside.git] / conf / invoice_htmlsummary
1 <table>
2   <tr>
3     <td>
4       <table>
5         <tr><td><%= $notes %></td></tr>
6       </table>
7     </td>
8     <td>
9       <table class="invoice_summary">
10         <tr><th colspan=2><br></th></tr>
11         <tr>
12           <td><b><u><br>Summary of Previous Balance and Payments<br></u></b></td>
13           <td></td>
14         </tr>
15         <tr>
16           <td><b>Previous Balance</b></td>
17           <td align="right"><b><%= $dollar.$true_previous_balance %></b></td>
18         </tr>
19         <tr>
20           <td><b>Payments</b></td>
21           <th align="right"><b><%= $dollar.$balance_adjustments %></b></th>
22         </tr>
23         <tr>
24           <td><b>Balance Outstanding</b></td>
25           <td align="right"><b><%= $dollar.sprintf('%.2f', $true_previous_balance - $balance_adjustments) %></b></td>
26         </tr>
27         <tr><th colspan=2><br></th></tr>
28         <tr><td colspan=2><br></td></tr>
29         <tr>
30           <td><b><u>Summary of New Charges</u></b></td>
31           <td></td>
32         </tr>
33         <tr><td colspan=2><br></td></tr>
34         <%= 
35           my ($last) = grep { $_->{tax_section} || !$_->{summarized} and !($finance_section && $_->{'description'} eq $finance_section)} reverse @sections;
36           
37           foreach my $section ( grep { $_->{tax_section} || !$_->{summarized} and !($finance_section && $_->{'description'} eq $finance_section)} @sections ) {
38             $OUT .= '<tr><td><b>'. ($section->{'description'} ? $section->{'description'} : 'Charges' ). '</b></td>';
39             my $celltype = ($last == $section) ? 'th' : 'td';
40             $OUT .= qq(<$celltype align="right"><b>). $section->{'subtotal'}. "</b></$celltype></tr>";
41           }
42         %>
43         <tr>
44           <td><b>New Charges Total</b></td>
45           <td align="right"><b><%= $dollar.$current_less_finance %></b></td>
46         </tr>
47         <tr><th colspan=2><br></th></tr>
48         <tr><td colspan=2><br></td></tr>
49         <tr>
50           <td><b><u>Invoice Summary</u></b></td>
51           <td></td>
52         </tr>
53         <tr><td colspan=2><br></td></tr>
54         <tr>
55           <td><b>Previous Past Due Charges</b></td>
56           <td align="right"><b><%= $dollar.sprintf('%.2f', $true_previous_balance - $balance_adjustments) %></b></td>
57         </tr>
58         <tr>
59           <td><b>Finance charges on overdue amount</b></td>
60           <td align="right"><b><%= $dollar.$finance_amount %></b></td>
61         </tr>
62         <tr>
63           <td><b>New Charges</b></td>
64           <th align="right"><b><%= $dollar.$current_less_finance %></b></th>
65         </tr>
66         <tr>
67           <td><b>Total Amount Due</b></td>
68           <td align="right"><b><%= $dollar.sprintf('%.2f', $true_previous_balance + $current_charges - $balance_adjustments) %></b></td>
69         </tr>
70         <tr><th colspan=2><br></th></tr>
71       </table>
72     </td>
73   </tr>
74 </table>