Sample Invoice via file template for customer #{{customer.id}} on {{ today }}

{{for item in items}} {{ SET subtotal = item.qty * item.priceNetto * (100 + item.vatPerc) / 100 }} {{ if loop.first }} {{ SET note = "FIRST LOOP" }} {{ elseif loop.last }} {{ SET note = "LAST LOOP" }} {{ elseif loop.index > 1 }} {{ SET note = "NOT FIRST NOR LAST LOOP" }} {{ endif }} {{ SET total = total + subtotal }} {{ elsefor }} EMPTY ITEMS! {{ endfor }}
{{ import _invoice_header.html }}
# Description Qty netto € VAT % Subtotal €
#{{ loop.index }} - {{ note }} {{ item.description }} {{ item.qty }} {{ item.priceNetto | round(2) }} {{ item.vatPerc | round(0) }}% {{ subtotal | round(2) }} €
Amount due .. {{ total | round(2) }} €