{%- set filename = invoice['invoice.date']|date('Y-m-d') ~ '_' ~ invoice['invoice.number']|replace({'/' : '-'}) ~ '_' ~ invoice['customer.company']|default(invoice['customer.name'])|replace({' ' : '-'}) -%} {%- set option = pdfContext.setOption('filename', filename) -%} {%- set option = pdfContext.setOption('format', 'A4-P') -%} {% set company = 'Martin Rattensberger' %} {% set tagline = 'IT Services' %} {% set weiss = '#FFFFFF' %} {% set hintergrund = '#576F80' %} {% set highlight = '#D4EFFC' %} {% set suppress = '#576F80' %} {% set logoUrl = config('theme.branding.logo') %} {% set groupByMaxProjects = 50 %} {% if logoUrl is empty %} {% set logoUrl = 'https://kimai.rattensberger.com/bilder/logo/martin_rattensberger_gr.png' %} {% endif %} {%- set setAutoTopMargin = pdfContext.setOption('setAutoTopMargin', false) -%} {%- set setAutoBottomMargin = pdfContext.setOption('setAutoBottomMargin', false) -%} {%- set marginBottom = pdfContext.setOption('margin_bottom', 20) -%} {%- set marginLeft = pdfContext.setOption('margin_left', 25) -%} {%- set marginRight = pdfContext.setOption('margin_right', 20) -%} {% set showFoldHoleMarks = showFoldHoleMarks ?? true %} {% set fallback = app.request is not null ? app.request.locale : 'de' %} {% set language = 'de' %} {% block title %}{{ invoice['invoice.date']|date('Y-m-d') }} {{ invoice['invoice.number'] }} {{ invoice['customer.company']|default(invoice['customer.name']) }}{% endblock %} {% block invoice_styles %} {% endblock %}
{% block invoice_address_sender %}
{{ invoice['user.display'] }} • {{ invoice['template.address']|nl2str(' • ') }}
{% endblock %} {% block invoice_address_recipient %}
{{ invoice['customer.name'] }}
{% if invoice['customer.contact'] %} {{ invoice['customer.contact'] }}
{% endif %} {{ invoice['customer.address']|nl2br }}
{% endblock %}
{% block invoice_content_subject %} {% endblock %} {% block invoice_details_invoice_number %} {% endblock %} {% block invoice_details_invoice_date %} {% endblock %} {% block invoice_details_service_date %} {% endblock %} {% block invoice_details_due_date %} {% endblock %} {% if invoice['customer.vat_id'] is not empty %} {% block invoice_details_customer_vatid %} {% endblock %} {% endif %}
{{ invoice['template.title'] }}{{ invoice['invoice.number'] }}
{{ 'date'|trans }} {{ invoice['invoice.date'] }}
{{ 'invoice.service_date'|trans }} {% if invoice['query.begin_month_number'] != invoice['query.end_month_number'] %} {{ invoice['query.begin'] }}
– {{ invoice['query.end'] }} {% else %} {{ invoice['query.begin_month_number'] }} / {{ invoice['query.begin_year'] }} {% endif %}
{{ 'invoice.due_days'|trans }} {{ invoice['invoice.due_date'] }}
{{ 'vat_id'|trans }} {{ invoice['customer.vat_id'] }}

{{ invoice['template.title'] }}

Sehr geehrte Damen und Herren,

heute erhalten Sie die Rechnung für die von mir vom {{ invoice['query.begin'] }} bis zum {{ invoice['query.end'] }} erbrachten Leistungen. Bitte zahlen Sie die Rechnung pünktlich, spätestens jedoch bis zum {{ invoice['invoice.due_date'] }}. {% block invoice_details_contact %} {% if invoice['user.email'] is not empty %} Bei Rückfragen erreichen Sie mich via E-Mail an {{ invoice['user.email'] }}. {% endif %} {% endblock %}

{% set pos = 1 %} {% if invoice['project.' ~ groupByMaxProjects ~ '.id'] is not defined %} {% for i in 0..groupByMaxProjects %} {% if i == 0 %} {% set id = 'project' %} {% else %} {% set id = 'project.' ~ i %} {% endif %} {% if invoice[id ~ '.id'] is defined and invoice[id ~ '.id'] is not null %} {% set totalDuration = 0 %} {% set totalAmount = 0 %} {% for entry in entries %} {% if entry['entry.type'] == 'timesheet' %} {% if entry['entry.project_id'] == invoice[id ~ '.id'] %} {% set totalAmount = totalAmount + entry['entry.total_plain'] %} {% set totalDuration = totalDuration + entry['entry.duration'] %} {% endif %} {% endif %} {% endfor %} {% endif %} {% endfor %} {% else %} {% for entry in entries %} {% if entry['entry.type'] == 'timesheet' %} {% endif %} {% endfor %} {% endif %} {% set hasOther = false %} {% for entry in entries %} {% if entry['entry.type'] != 'timesheet' %} {% if not hasOther %} {% set hasOther = true %} {% endif %} {% set pos = pos + 1 %} {% endif %} {% endfor %} {% if invoice['invoice.vat'] is not empty %} {% endif %}
Pos. {{ 'description'|trans }} # {{ 'unit_price'|trans }} {{ 'total_rate'|trans }}
{{ invoice[id ~ '.name'] }}
{{ pos }}{% set pos = pos + 1 %} {% if entry['entry.description'] is not empty %} {{ entry['entry.description'] }} {% endif %} {% if entry['entry.activity'] is not null %} ({{ entry['entry.activity'] }}) {% endif %} {{ entry['entry.duration_format'] }} {{ entry['entry.rate'] }} {{ entry['entry.total'] }}
Zwischensumme: {{ totalDuration|duration }} {{ totalAmount|money(invoice['invoice.currency']) }}
{{ pos }}{% set pos = pos + 1 %} {% if entry['entry.description'] is not empty %} {{ entry['entry.description'] }} {% endif %} {% if entry['entry.project'] is not null %} ({{ entry['entry.project'] }}) {% endif %} {% if entry['entry.activity'] is not null %} ({{ entry['entry.activity'] }}) {% endif %} {{ entry['entry.duration_format'] }} {{ entry['entry.rate'] }} {{ entry['entry.total'] }}
Auslagen
{{ pos }} {% if entry['entry.description'] is not empty %} {{ entry['entry.description'] }} {% endif %} {% if entry['entry.project'] is not null %} ({{ entry['entry.project'] }}) {% endif %} {{ entry['entry.amount'] }} {{ entry['entry.rate'] }} {{ entry['entry.total'] }}
{{ 'invoice.subtotal'|trans }} {{ invoice['invoice.subtotal'] }}
{{ 'invoice.tax'|trans }} ({{ invoice['invoice.vat'] }} %) {{ invoice['invoice.tax'] }}
{{ 'invoice.total'|trans }} {{ invoice['invoice.total'] }}
{% if model.template.paymentTerms is not empty %}

{{ model.template.paymentTerms|md2html }}

{% endif %}