{{template.name}}
{{date|date:d-m-Y}}
[if {{logo}}] [/if]
To:

{{customer.name}}
[assign address = customer.addresses | filter:type:"postal" | first] [if !{{address}}] [assign address = customer.addresses | first] [/if] {{address.formatted|nl2br}}

From: [assign businessOrg = business.contactId | entity:Contact]

{{businessOrg.name}}
[assign bAddress = businessOrg.addresses | filter:type:"postal" | first] [if !{{bAddress}}] [assign bAddress = businessOrg.addresses | first] [/if] {{bAddress.formatted|nl2br}}

[assign orgEmail = businessOrg.emailAddresses | sort:type:"work" | first | prop:email] [if {{orgEmail}}] [/if] [assign orgNumber = businessOrg.phoneNumbers | sort:type:"work" | first | prop:number] [if {{orgNumber}}] [/if] [if {{businessOrg.nameBank}}] [/if] [if {{businessOrg.BIC}}] [/if] [if {{businessOrg.vatNo}}] [/if] [if {{businessOrg.registrationNumber}}] [/if]
E-mail: {{orgEmail}}
Phone: {{orgNumber}}

Bank: {{businessOrg.nameBank}}
IBAN: {{businessOrg.IBAN}}
BIC: {{businessOrg.BIC}}

VAT no.: {{businessOrg.vatNo}}
Reg no.: {{businessOrg.registrationNumber}}



[assign total = 0] [each invoice in invoices] [assign book = invoice.bookId | entity:FinanceBook] [assign balance = {{invoice.totalPrice}} - {{invoice.paidAmount}} ] [assign parent.total = {{parent.total}} + {{balance}}] [/each]
Invoice no. Date Due Amount Paid To be paid
{{invoice.number}} {{invoice.date|date:d-m-Y}} {{invoice.expiresAt|date:d-m-Y}} {{book.currency}} {{invoice.totalPrice|number}} {{book.currency}} {{invoice.paidAmount|number}}{{book.currency}} {{balance|number}}
Total to be paid: {{book.currency}} {{total|number}}

Please pay the outstanding amount immediately. If you're having trouble paying please contact us.