{% import "macros/widgets.html.twig" as widgets %} {% extends 'invoice/layout.html.twig' %} {% block invoice %} {% set isDecimal = true %} {% set project = model.query.project %} {% set activity = model.query.activity %}
{% if project is not null %} {% endif %} {% if activity is not null %} {% endif %}
{{ 'invoice.from'|trans }} {% if model.query.user is not empty %} {{ widgets.username(model.query.user) }} {% else %} {{ model.template.company }} {% endif %}
{{ '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 %}
{{ '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 %}
{{ 'project'|trans }} {{ project.name }} {% if project.orderNumber is not empty %} ({{ 'orderNumber'|trans }}: {{ project.orderNumber }}) {% endif %}
{{ 'activity'|trans }} {{ activity.name }}
{% 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 %}
{{ 'date'|trans }}{{ 'user'|trans }}{{ 'activity'|trans }} {{ '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 %}

{{ 'payment_terms'|trans }}

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

{% endif %}

{{ 'invoice.signature_user'|trans }}

{{ 'invoice.signature_customer'|trans }}

{% endblock %}