<table>
[% IF ( LibraryName ) %]
<tr>
- <th colspan=3 class="centerednames">
+ <th colspan="4" class="centerednames">
<h3>[% LibraryName %]</h3>
</th>
</tr>
[% END %]
<tr>
- <th colspan=3 class="centerednames">
+ <th colspan="4" class="centerednames">
<h2><u>INVOICE</u></h2>
</th>
</tr>
<tr>
- <th colspan=3 class="centerednames">
+ <th colspan="4" class="centerednames">
[% IF ( branchname ) %]<h2>[% branchname %]</h2>[% END %]
</th>
</tr>
<tr>
- <th colspan=3 >
+ <th colspan="4" >
Bill to: [% firstname %] [% surname %] <br />
Card number: [% cardnumber %]<br />
</th>
<th>Date</th>
<th>Description of charges</th>
<th style="text-align:right;">Amount</th>
+ <th style="text-align:right;">Amount outstanding</th>
</tr>
[% FOREACH account IN accounts %]
<td>[% account.date %]</td>
<td>[% account.description %]</td>
[% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount %]</td>
+ [% IF ( account.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amountoutstanding %]</td>
</tr>
[% END %]
<tfoot>
<tr>
- <td colspan="2">Total outstanding dues as on date: </td>
+ <td colspan="3">Total outstanding dues as on date: </td>
[% IF ( totalcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% total %]</td>
</tr>
</tfoot>