{{ 'customer'|trans }} | {{ 'duration'|trans }} | {{ 'total_rate'|trans }} | |||||
---|---|---|---|---|---|---|---|
{% if not isEmptyModel %} {{ widgets.card_tool_button('collapse', {'onclick': "this.parentElement.parentElement.nextElementSibling.classList.toggle('d-none');return false;"}) }} {% endif %} | {% if is_granted('view', model.customer) %} {{ widgets.label_customer(model.customer) }} {% else %} {{ widgets.label_customer(model.customer) }} {% endif %} | {{ model.calculator.timeWorked|duration(isDecimal) }} | {{ model.calculator.total|money(currency) }} | {% for attrs in [{'class': 'd-inline-flex d-md-none'}, {'icon': false, 'class': 'd-none d-md-inline-flex'}] %} {{ widgets.action_button('print', {'url': '#', 'onclick': 'return singleInvoice(this, true)', 'title': 'preview'|trans, 'target': '_blank', 'attr': {'data-customer': model.customer.id, 'data-href': path('invoice_preview', {'customer': model.customer.id, 'token': csrf_token('invoice.preview')})}}|merge(attrs)) }} {{ widgets.action_button('invoice', {'url': '#', 'onclick': 'return singleInvoice(this, false)', 'title': 'action.save'|trans, 'attr': {'data-customer': model.customer.id, 'data-href': path('invoice_create', {'customer': model.customer.id, 'token': csrf_token('invoice.create')})}}|merge(attrs), 'success') }} {% endfor %} | |||
{% if not isEmptyModel %} {% form_theme customerForm 'form/horizontal.html.twig' %} {{ form_start(customerForm) }} {{ form_rest(customerForm) }} {{ form_end(customerForm) }} {% set isDecimal = true %} {% set entries = model.calculator.entries %} {% set currency = model.currency %} {% set itemsAmount = entries|length %} {{ tables.datatable_header(tableName, columns, model.query, {'boxClass': ''}) }} {% if limit_preview %} {% set entries = entries|slice(0, 100) %} {% endif %} {% for entry in entries %} {% set amount = entry.amount %} {% set duration = entry.duration|duration(isDecimal) %} {% set rate = 0 %} {% if entry.fixedRate is not null %} {% set rate = entry.fixedRate %} {% elseif entry.hourlyRate is not null %} {% set rate = entry.hourlyRate %} {% endif %} | |||||||
{{ entry.begin|date_short }} |
{% if is_granted('view', entry.project) %}
{{ widgets.label_project(entry.project) }}
{% else %}
{{ widgets.label_project(entry.project) }}
{% endif %}
{% if entry.activity is not null %}
{% if is_granted('view', entry.activity) %} {{ widgets.label_activity(entry.activity) }} {% else %} {{ widgets.label_activity(entry.activity) }} {% endif %} {% endif %} |
{% if entry.description is not empty %} {{ entry.description|desc2html }} {% endif %} | {{ widgets.label_user(entry.user) }} | {{ rate|money(currency) }} | {{ amount }} | {{ duration }} | {{ entry.rate|money(currency) }} |
ยป {{ 'preview.skipped_rows'|trans({'%rows%': (itemsAmount - 100)}) }} |