Skip to content

Templates Invoice

Alexander Elchlepp edited this page Feb 22, 2026 · 1 revision

Templates: Invoice PDF

Applies to:

  • TEMPLATE_INVOICE_PDF

Root Variables (Render Context)

  • invoice (Invoice)
  • vats (Array, key/value)
  • brutto, netto, bruttoFormated, nettoFormated
  • periods, numbers (Arrays)
  • appartmentTotal, miscTotal

vats Structure

vats is an associative array grouped by VAT rate.

  • Key: VAT rate (for example 7, 19)
  • Value: object with these fields:
  • value.brutto: gross amount for this VAT rate
  • value.netto: VAT amount for this VAT rate
  • value.netSum: net base amount (brutto - netto) for this VAT rate
  • value.nettoFormated: formatted VAT amount (string, de_DE number format)

Example shape:

vats = {
  7:  { brutto: 107.00, netto: 7.00,  netSum: 100.00, nettoFormated: '7,00' },
  19: { brutto: 119.00, netto: 19.00, netSum: 100.00, nettoFormated: '19,00' }
}

Note on naming:

  • top-level brutto = total gross sum
  • top-level netto = total VAT sum
  • top-level nettoFormated = formatted net base sum (brutto - netto)

Examples

Header information:

<p>Invoice [[ invoice.number ]] from [[ invoice.date|date('d.m.Y') ]]</p>

VAT key/value loop:

<tr data-repeat="vats" data-repeat-key="key" data-repeat-as="value">
  <td>[[ key ]] %</td>
  <td>Net base: [[ value.netSum ]] €</td>
  <td>VAT: [[ value.nettoFormated ]] €</td>
  <td>Gross: [[ value.brutto ]] €</td>
</tr>

Apartment positions:

<tr data-repeat="invoice.appartments" data-repeat-as="appartment">
  <td>[[ appartment.description ]]</td>
  <td>[[ appartment.totalPrice ]] €</td>
</tr>

Clone this wiki locally