{% import "macros/widgets.html.twig" as widgets %} {% extends 'invoice/layout.html.twig' %} {% block invoice %} {% set isDecimal = model.template.decimalDuration|default(false) %}
{% if model.query.project is not empty and model.query.project.orderNumber is not empty %} {% endif %}
{{ 'invoice.from'|trans }} {% if model.query.user is not empty %} {{ widgets.username(model.query.user) }} {% else %} {{ model.template.company }} {% endif %}
{{ 'label.date'|trans }} {% if model.query.begin|date('m') != model.query.end|date('m') or model.query.begin|date('Y') != model.query.end|date('Y') %} {{ model.query.begin|date_short }} - {{ model.query.end|date_short }} {% else %} {{ model.query.end|month_name }} {{ model.query.end|date('Y') }} {% endif %}
{{ 'label.customer'|trans }} {% if model.customer.number is not empty %}[{{ model.customer.number }}]{% endif %} {{ model.customer.name }}{% if model.customer.contact is not empty %} / {{ model.customer.contact }}{% endif %}
{{ 'label.orderNumber'|trans }} {{ model.query.project.orderNumber }}
{% if model.query.user is empty %} {% endif %} {% for entry in model.calculator.entries %} {% if model.query.user is empty %} {% endif %} {% endfor %} {% if model.query.user is empty %} {% endif %}
{{ 'label.date'|trans }}{{ 'label.user'|trans }}{{ 'label.activity'|trans }} {{ 'label.hours'|trans }}
{{ entry.begin|date_short }}{{ widgets.username(entry.user) }} {% if entry.description is not empty %} {{ entry.description|nl2br }} {% else %} {% if entry.activity is not null %}{{ entry.activity.name }} / {% endif %}{{ entry.project.name }} {% endif %} {{ entry.duration|duration(isDecimal) }}
{{ 'invoice.total_working_time'|trans }} {{ model.calculator.timeWorked|duration(isDecimal) }}
{% if model.template.paymentTerms is not empty %}

{{ 'label.payment_terms'|trans }}

{{ model.template.paymentTerms|trim|nl2br }}

{% endif %}
{{ 'invoice.signature_user'|trans }}
{{ 'invoice.signature_customer'|trans }}
{% endblock %}