[%- USE T8 %] [%- USE LxERP %] [%- USE L %] [%- USE HTML %]
[%- FOREACH row = invoices %] [% IF FORM.db == 'customer' %] [% IF row.type == 'invoice' %] [% SET type = 'Invoice (one letter abbreviation)' %] [% SET link = 'is.pl' %] [% ELSIF row.type == 'credit_note' %] [% SET type = 'Credit note (one letter abbreviation)' %] [% SET link = 'is.pl' %] [% ELSE %] [% SET type = 'AR Transaction (abbreviation)' %] [% SET link = 'ar.pl' %] [% END %] [% ELSE %] [% IF row.invoice %] [% SET type = 'Invoice (one letter abbreviation)' %] [% SET link = 'ir.pl' %] [% ELSE %] [% SET type = 'AP Transaction (abbreviation)' %] [% SET link = 'ap.pl' %] [% END %] [% END %] [% END %]
[% 'Type' | $T8 %] [% 'Invoice Number' | $T8 %] [% 'Invoice Date' | $T8 %] [% 'Amount' | $T8 %] [% 'Inv. Duedate' | $T8 %] [% 'Paid' | $T8 %] [% 'Open Amount' | $T8 %]
[% type | $T8 %] [% row.invnumber | html %] [% row.transdate.to_kivitendo | html %] [%- LxERP.format_amount(row.amount, 2) %] [% row.duedate.to_kivitendo | html %] [%- LxERP.format_amount(row.paid, 2) %] [%- LxERP.format_amount(row.amount - row.paid, 2) %]