{% extends kimai_context.modalRequest ? 'form.html.twig' : 'base.html.twig' %}

{% block main %}
    {% set formEditTemplate = kimai_context.modalRequest ? 'default/_form_modal.html.twig' : 'default/_form.html.twig' %}
    {% set formOptions = {
        'title': invoice.customer.name ~ ' – ' ~ invoice.createdAt|date_short~ ' – ' ~ invoice.total|money(invoice.customer.currency),
        'form': form,
        'back': path('admin_invoice_list')
    } %}
    {% embed formEditTemplate with formOptions %}{% endembed %}
{% endblock %}
