{% import "macros/widgets.html.twig" as widgets %} {% extends 'invoice/layout.html.twig' %} {% block invoice %} {# You can overwrite these settings in your config/packages/local.yaml under the key "twig.globals.company" #} {% set company = company|default({ name: 'Kimai Inc.', homepage: 'www.kimai.org', email: 'kimai@example.com', phone: '0123-4567890', tax_number: 'YourTaxNumber', signature: '/build/images/signature.png', address: 'Kimai Inc. Example road 42 D – 12345 City ', bank_account: ' Kimai Inc. IBAN: DE00 0000 0000 0000 0000 00 BIC: XXXXXXXX (a bank name) ' }) %}

{{ model.template.address }}

{{ 'invoice.to'|trans }}

{{ model.customer.company|default(model.customer.name) }}
{{ model.customer.address|nl2br }}

{% if model.query.project is not empty and model.query.project.orderNumber is not empty %} {% endif %}
{{ 'label.date'|trans }}: {{ model.invoiceDate|date_short }}
{{ 'invoice.service_date'|trans }}: {{ model.query.end|month_name|trans }} {{ model.query.end|date('Y') }}
{{ 'invoice.number'|trans }}: {{ model.numberGenerator.invoiceNumber }}
{{ 'label.order_number'|trans }} {{ model.query.project.orderNumber }}

{{ model.template.title|default('invoice_renderer.timesheet'|trans) }}

{{ 'label.invoice_salutation'|trans|nl2br }}

{% for entry in model.calculator.entries %} {% set duration = entry.duration|duration() %} {% if entry.fixedRate is not null %} {% set rate = entry.fixedRate %} {% set duration = 1 %} {% elseif entry.hourlyRate is not null %} {% set rate = entry.hourlyRate %} {% else %} {% set rate = app.user.getPreferenceValue('hourly_rate') %} {% endif %} {% endfor %}
{{ 'label.description'|trans }} {{ 'label.unit_price'|trans }} {{ 'label.amount'|trans }} {{ 'label.total_rate'|trans }}
{% if entry.description is not empty %} {{ entry.description }} {% else %} {{ entry.activity.name }} / {{ entry.project.name }} {% endif %} {{ rate|money(model.calculator.currency) }} {{ duration }} {{ entry.rate|money(model.calculator.currency) }}
{{ 'invoice.subtotal'|trans }} {{ model.calculator.subtotal|money(model.calculator.currency) }}
{{ 'invoice.tax'|trans }} ({{ model.calculator.vat }}%) {{ model.calculator.tax|money(model.calculator.currency) }}
{{ 'invoice.total'|trans }} {{ model.calculator.total|money(model.calculator.currency) }}
{% if model.template.paymentTerms is not empty %} {% endif %}
{% endblock %}