Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / templates / webpages / customer_vendor_turnover / invoices_statistic.html
1 [%- USE T8 %]
2 [%- USE LxERP %]
3 [%- USE L %]
4 [%- USE HTML %]
5 <div id="invoice_statistic">
6   <table width="100%">
7     <tbody>
8       <tr>
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>
16       </tr>
17
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' %]
26           [% ELSE %]
27             [% SET type = 'AR Transaction (abbreviation)' %]
28             [% SET link = 'ar.pl' %]
29           [% END %]
30         [% ELSE %]
31           [% IF row.invoice %]
32             [% SET type = 'Invoice (one letter abbreviation)' %]
33             [% SET link = 'ir.pl' %]
34           [% ELSE %]
35             [% SET type = 'AP Transaction (abbreviation)' %]
36             [% SET link = 'ap.pl' %]
37           [% END %]
38         [% END %]
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) %]
47         </tr>
48       [% END %]
49     </tbody>
50   </table>
51
52
53     </tbody>
54   </table>
55 </div>