5 <div id="invoice_statistic">
 
   9         <td class="listheading">[% 'Type' | $T8 %]</td>
 
  10         <td class="listheading">[% 'Invoice Number' | $T8 %]</td>
 
  11         <td class="listheading">[% 'Invoice Date' | $T8 %]</td>
 
  12         <td class="listheading">[% 'Amount' | $T8 %]</td>
 
  13         <td class="listheading">[% 'Inv. Duedate' | $T8 %]</td>
 
  14         <td class="listheading">[% 'Paid' | $T8 %]</td>
 
  15         <td class="listheading">[% 'Open Amount' | $T8 %]</td>
 
  18       [%- FOREACH row = invoices %]
 
  19         [% IF FORM.db == 'customer' %]
 
  20           [% IF row.type == 'invoice' %]
 
  21             [% SET type = 'Invoice (one letter abbreviation)' %]
 
  22             [% SET link = 'is.pl' %]
 
  23           [% ELSIF row.type == 'credit_note' %]
 
  24             [% SET type = 'Credit note (one letter abbreviation)' %]
 
  25             [% SET link = 'is.pl' %]
 
  27             [% SET type = 'AR Transaction (abbreviation)' %]
 
  28             [% SET link = 'ar.pl' %]
 
  32             [% SET type = 'Invoice (one letter abbreviation)' %]
 
  33             [% SET link = 'ir.pl' %]
 
  35             [% SET type = 'AP Transaction (abbreviation)' %]
 
  36             [% SET link = 'ap.pl' %]
 
  39         <tr class="listrow[% loop.count % 2 %]">
 
  40           <td>[% type | $T8 %]</td>
 
  41           <td><a href="[% link %]?action=edit&id=[% row.id %]">[% row.invnumber | html %]</a></td>
 
  42           <td>[% row.transdate.to_kivitendo | html %]</td>
 
  43           <td class="numeric">[%- LxERP.format_amount(row.amount, 2) %]</td>
 
  44           <td>[% row.duedate.to_kivitendo | html %]</td>
 
  45           <td class="numeric">[%- LxERP.format_amount(row.paid, 2) %]</td>
 
  46           <td class="numeric">[%- LxERP.format_amount(row.amount - row.paid, 2) %]