diff --git a/roles/timetracking/files/invoice-potaris-full-days.html.twig b/roles/timetracking/files/invoice-potaris-full-days.html.twig new file mode 100644 index 0000000..42f1a60 --- /dev/null +++ b/roles/timetracking/files/invoice-potaris-full-days.html.twig @@ -0,0 +1,170 @@ + + + + + {% block title %}{{ invoice['invoice.number'] }}-{{ invoice['customer.company']|default(invoice['customer.name'])|u.snake }}{% endblock %} + + + +
+
+ +{% set isDecimal = model.template.decimalDuration|default(false) %} +{% set currency = model.currency %} +
+
+ +
+
+ +
+
+ {{ 'invoice.to'|trans }} +
+ {{ model.customer.company|default(model.customer.name) }}
+ {{ model.customer.address|nl2br }} + {% if model.customer.vatId is not empty %} +
+ {{ 'vat_id'|trans }}: {{ model.customer.vatId }} + {% endif %} + {% if model.customer.number is not empty %} +
+ {{ 'label.number'|trans }}: {{ model.customer.number }} + {% endif %} + {% if model.query.project is not empty and model.query.project.orderNumber is not empty %} +
+ {{ 'label.orderNumber'|trans }}: {{ model.query.project.orderNumber }} + {% endif %} +
+
+ +
+ {{ 'invoice.from'|trans }} +
+ {{ model.template.company }}
+ {{ model.template.address|trim|nl2br }} + {% if model.template.vatId is not empty %} +
+ {{ 'vat_id'|trans }}: + {{ model.template.vatId }} + {% endif %} +
+ Steuernummer: 218/135/30020 +
+
+
+ +
+
+

+ {{ 'invoice.number'|trans }}: + {{ model.invoiceNumber }} + +
+ Leistungszeitraum: + {{ invoice['query.begin'] }} - {{ invoice['query.end'] }} + +
+ {{ 'invoice.due_days'|trans }}: + {{ model.dueDate|date_short }} +

+
+
+
+ +
+
+ + + + + + + + + + + + {% for entry in model.calculator.entries %} + {% set duration = entry.duration|duration(isDecimal) %} + {% if entry.fixedRate %} + {% set rate = entry.fixedRate %} + {% set duration = entry.amount/8.5|amount %} + {% else %} + {% set rate = entry.hourlyRate*8.5 %} + {% endif %} + + + + + + + + + {% endfor %} + + + {% if model.calculator.tax > 0 or not model.isHideZeroTax() %} + + + + + + + + + {% endif %} + + + + + +
{{ 'description'|trans }}TagessatzTage{{ 'total_rate'|trans }}
+ {% if entry.description is not empty %} + {{ entry.description|nl2br }} + {% else %} + {% if entry.activity is not null %}{{ entry.activity.name }} / {% endif %}{{ entry.project.name }} + {% endif %} + {{ rate|money(currency) }}{{ duration }}{{ entry.rate|money(currency) }}
+ {{ 'invoice.subtotal'|trans }} + {{ model.calculator.subtotal|money(currency) }}
+ {{ 'invoice.tax'|trans }} ({{ model.calculator.vat }}%) + {{ model.calculator.tax|money(currency) }}
+ {{ 'invoice.total'|trans }} + + {{ model.calculator.total|money(currency) }} +
+
+
+ +
+
+ {% if model.template.paymentTerms is not empty %} +
+ {{ model.template.paymentTerms|md2html }} +
+ {% endif %} +
+
+ + + +
+
+ + diff --git a/roles/timetracking/tasks/main.yaml b/roles/timetracking/tasks/main.yaml index 219bdcc..d3c2abc 100644 --- a/roles/timetracking/tasks/main.yaml +++ b/roles/timetracking/tasks/main.yaml @@ -8,9 +8,12 @@ - name: Copy Potaris twig Invoice Template copy: - src: invoice-potaris.html.twig + src: "{{ item }}" dest: /data/kimai-invoice-templates/ owner: www-data + with_items: + - invoice-potaris-full-days.html.twig + - invoice-potaris.html.twig - name: Create Kimai mysql-directory file: