{{ invoice.accountname__c }}

{{ invoice.billingstreet__c }}
{{ invoice.billingcity__c }} {{ invoice.billingstate__c }} {{ invoice.billingpostalcode__c }}
{{ invoice.billingcountry__c }}
{{ invoice.class__c }}
Invoice No.:{{ invoice.name }}
Date:{{ invoice.date__c | date: "%e-%b-%Y" }}
Dear Customer,

...text 1 should be adapted...
{% for section in invoiceTable %} {% if section.section == 'Detail:Product+Dunning+Dunning Fee+Information+Tax Delta+Deposit' %} {% assign pos = 0 %} {% for row in section.rows %} {% if row.lineItem %} {% assign pos = pos | plus:1 %} {% endif %} {% if row.subtotalType == 'subtotalNet' %} {% endif %} {% if row.subtotalType == 'subtotalTax' %} {% endif %} {% endfor %} {% endif %} {% endfor %} {% for balance in balances %} {% endfor %}
Pos. Title Unit Price Quantity Tax Rate Pos. Total (net)
{{ pos }} {{ row.lineItem.title__c }} {{ row.lineItem.unitpricecalc__c | currency }} {{ row.lineItem.quantity__c | decimal }}{{ row.lineItem.unit__c }} {{ row.lineItem.taxrate__c | decimal }} % {{ row.lineItem.postotalnet__c | currency }}
Subtotal (net) {{ row.subtotal.subtotalNet | currency }}
Tax ({{ row.taxRate }} %) {{ row.subtotal.subtotalTax | currency}}
Grand Total {{ invoice.grandtotal__c | currency }}
{{ balance.type__c }} {{ balance.date__c | date: "%e-%b-%Y" }} {{ balance.amount__c || currency }}
Payment Amount {{ invoice.balance__c | currency }}
{% if invoice.displaytransactiontables__c %}
{% endif %}