Kundenstatistik: Fehler beim Link zu Rechnungen behoben
[kivitendo-erp.git] / templates / webpages / customer_vendor_turnover / _list_open_items.html
1 [%- USE T8 %]
2 [%- USE LxERP %]
3 [%- USE L %]
4 [%- USE HTML %]
5
6 <div id="sales_report">
7   <table width="100%">
8     <caption class="listtop">[%- HTML.escape(title) %]</caption>
9     <tbody>
10       <tr>
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>
20         [% END %]
21       </tr>
22
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' %]
31           [% ELSE %]
32             [% SET type = 'AR Transaction (abbreviation)' %]
33             [% SET link = 'ar.pl' %]
34           [% END %]
35         [% ELSE %]
36           [% IF row.invoice %]
37             [% SET type = 'Invoice (one letter abbreviation)' %]
38             [% SET link = 'ir.pl' %]
39           [% ELSE %]
40             [% SET type = 'AP Transaction (abbreviation)' %]
41             [% SET link = 'ap.pl' %]
42           [% END %]
43         [% END %]
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>[%- LxERP.format_amount(row.amount, 2) %]</td>
49           <td>[% row.duedate.to_kivitendo | html %]</td>
50           <td>[%- LxERP.format_amount(row.paid, 2) %]</td>
51           <td>[%- LxERP.format_amount(row.amount - row.paid,2) %]
52           [% IF FORM.db == 'customer' %]
53             <td>
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>
57               [% END %]
58             [% END %]
59             </td>
60           [% END %]
61         </tr>
62       [% END %]
63     </tbody>
64   </table>
65 </div>