added json, xml and txt invoice renderer (#1576)

This commit is contained in:
Kevin Papst
2020-03-21 01:01:47 +01:00
committed by GitHub
parent c89750fe94
commit 1ca1b00d11
19 changed files with 560 additions and 53 deletions

View File

@@ -0,0 +1,7 @@
{% set json = model.toArray %}
{% set items = [] %}
{% for entry in model.calculator.entries %}
{% set items = items|merge([model.itemToArray(entry)]) %}
{% endfor %}
{% set json = json|merge({'items': items}) %}
{{ json|json_encode|raw}}