{% extends 'D2PartnerBundle::base.html.twig' %} {% block head_script_extra %} {% endblock head_script_extra %} {% block page_header %}
{% for k, v in app.request.query %} {% if k|lower not in ['search', 'page', 'month', 'year', 'partner', 'ma_account', 'company', 'type'] %} {% endif %} {% endfor %}
Displaying {{ (invoice_items.getCurrentPageNumber()-1) * invoice_items.getItemNumberPerPage() + 1 }} to {{ ((invoice_items.getCurrentPageNumber()-1) * invoice_items.getItemNumberPerPage()) + (invoice_items.getItems()|length) }} of {{ invoice_items.getTotalItemCount() }} Partner Invoice records
{% endblock page_header %} {% block content %} {% set months = {1:"Jan", 2:"Feb", 3:"Mar", 4:"Apr", 5:"May", 6:"Jun", 7:"Jul", 8:"Aug", 9:"Sep", 10:"Oct", 11:"Nov", 12:"Dec"} %} {% for entity in invoice_items %} {% endfor %}
{{ knp_pagination_sortable(invoice_items, 'Date', 'i.invoice_date') }} {{ knp_pagination_sortable(invoice_items, 'Month', 'i.period_month') }} {{ knp_pagination_sortable(invoice_items, 'Year', 'i.period_year') }} {{ knp_pagination_sortable(invoice_items, 'Company', 'ca.company_name') }} {{ knp_pagination_sortable(invoice_items, 'Invoice From', 'a.company_name') }} {{ knp_pagination_sortable(invoice_items, 'Account', 'ma.ma_account_code') }} {{ knp_pagination_sortable(invoice_items, 'Invoice Number', 'i.invoice_number') }} {{ knp_pagination_sortable(invoice_items, 'Amount ex VAT', 'i.amount_ex_vat') }} {{ knp_pagination_sortable(invoice_items, 'VAT', 'i.vat') }} {{ knp_pagination_sortable(invoice_items, 'Amount inc VAT', 'i.amount_inc_vat') }} Outstanding {{ knp_pagination_sortable(invoice_items, 'Locked', 'i.locked') }}
{{ entity.invoiceDate | date("Y/m/d") }} {{ months[entity.periodMonth] }} {{ entity.periodYear }} {% if entity.company is not null %} {{ entity.company.companyName | trim }} {% endif %} {{ entity.partner.companyName | trim }} {{ entity.maAccount.maAccountName | trim }} {{ entity.invoiceNumber | trim }} {{ entity.amountExVat|number_format(2, '.', ' ') }} {{ entity.vat|number_format(2, '.', ' ') }} {{ entity.amountIncVat|number_format(2, '.', ' ') }} {% set outstanding = entity.amountIncVat - d2_partner_invoice_allocation(entity.getId) %} {{ outstanding|number_format(2, '.', ' ') }} {{ entity.locked ? 'Locked' : 'Unlocked' }}
{% endblock content %}