6 <div id="sales_report">
8 <caption class="listtop">[%- HTML.escape(title) %]</caption>
11 <td class="listheading">[% 'Type' | $T8 %]</td>
12 <td class="listheading">[% 'Invoice Number' | $T8 %]</td>
13 <td class="listheading">[% 'Invoice Date' | $T8 %]</td>
14 <td class="listheading">[% 'Amount' | $T8 %]</td>
15 <td class="listheading">[% 'Inv. Duedate' | $T8 %]</td>
16 <td class="listheading">[% 'Paid' | $T8 %]</td>
17 <td class="listheading">[% 'Open Amount' | $T8 %]</td>
18 [% IF FORM.db == 'customer' %]
19 <td class="listheading">[% 'Dunnings (Id -- Dunning Date --Dunning Level -- Dunning Fee)' | $T8 %]</td>
23 [%- FOREACH row = OPEN_ITEMS %]
24 [% IF FORM.db == 'customer' %]
25 [% IF row.type == 'invoice' %]
26 [% SET type = 'Invoice (one letter abbreviation)' %]
27 [% SET link = 'is.pl' %]
28 [% ELSIF row.type == 'credit_note' %]
29 [% SET type = 'Credit note (one letter abbreviation)' %]
30 [% SET link = 'is.pl' %]
32 [% SET type = 'AR Transaction (abbreviation)' %]
33 [% SET link = 'ar.pl' %]
37 [% SET type = 'Invoice (one letter abbreviation)' %]
38 [% SET link = 'ir.pl' %]
40 [% SET type = 'AP Transaction (abbreviation)' %]
41 [% SET link = 'ap.pl' %]
44 <tr class="listrow[% loop.count % 2 %]">
45 <td>[% type | $T8 %]</td>
46 <td><a href="[% link %]?action=edit&id=[% row.id %]">[% row.invnumber | html %]</a></td>
47 <td>[% row.transdate.to_kivitendo | html %]</td>
48 <td class="numeric">[%- LxERP.format_amount(row.amount, 2) %]</td>
49 <td>[% row.duedate.to_kivitendo | html %]</td>
50 <td class="numeric">[%- LxERP.format_amount(row.paid, 2) %]</td>
51 <td class="numeric">[%- LxERP.format_amount(row.amount - row.paid,2) %]
52 [% IF FORM.db == 'customer' %]
54 [%- IF row.dunning_config_id != '' %]
55 [%- FOREACH dun = row.dunnings %]
56 [% dun.dunning_id | html %] -- [% dun.transdate.to_kivitendo | html %] -- [% dun.dunning_level | html %] -- [%- LxERP.format_amount(dun.fee, 2) %]<br>