{% 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'] %} {% endif %} {% endfor %}
Displaying {{ (payment_items.getCurrentPageNumber()-1) * payment_items.getItemNumberPerPage() + 1 }} to {{ ((payment_items.getCurrentPageNumber()-1) * payment_items.getItemNumberPerPage()) + (payment_items.getItems()|length) }} of {{ payment_items.getTotalItemCount() }} Partner Payment records
{% endblock page_header %} {% block content %} {% for entity in payment_items %} {% endfor %}
{{ knp_pagination_sortable(payment_items, 'Date', 'p.payment_date') }} {{ knp_pagination_sortable(payment_items, 'Payment To', 'a.company_name') }} {{ knp_pagination_sortable(payment_items, 'Reference', 'p.reference') }} {{ knp_pagination_sortable(payment_items, 'Payment Amount', 'p.amount') }} Allocated Invoices
{{ entity.paymentDate | date("Y/m/d") }} {{ entity.partner.companyName | trim }} {{ entity.reference | trim }} {{ entity.amount|number_format(2, '.', ' ') }} {% set linked_invoices = entity.invoiceAllocations %} {% if linked_invoices|length > 0 %} {% for allocation in linked_invoices %} {% if allocation.partnerInvoice is not null %} {{ allocation.partnerInvoice.invoiceNumber }} {% else %} Not Allocated {% endif %} {% if loop.last == false %} / {% endif %} {% endfor %} {% endif %}
{% endblock content %}