{% 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', 'from_date', 'year', 'partner', 'ma_account', 'company'] %} {% endif %} {% endfor %}
Displaying {{ (credit_note_items.getCurrentPageNumber()-1) * credit_note_items.getItemNumberPerPage() + 1 }} to {{ ((credit_note_items.getCurrentPageNumber()-1) * credit_note_items.getItemNumberPerPage()) + (credit_note_items.getItems()|length) }} of {{ credit_note_items.getTotalItemCount() }} Partner Credit Note 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 credit_note_items %} {% endfor %}
{{ knp_pagination_sortable(credit_note_items, 'Date', 'cn.credit_note_date') }} {{ knp_pagination_sortable(credit_note_items, 'Month', 'cn.period_month') }} {{ knp_pagination_sortable(credit_note_items, 'Year', 'cn.period_year') }} {{ knp_pagination_sortable(credit_note_items, 'Company', 'ca.company_name') }} {{ knp_pagination_sortable(credit_note_items, 'Credit From', 'a.company_name') }} {{ knp_pagination_sortable(credit_note_items, 'Account', 'ma.ma_account_code') }} {{ knp_pagination_sortable(credit_note_items, 'Doc Number', 'cn.credit_note_number') }} {{ knp_pagination_sortable(credit_note_items, 'Hidden', 'cn.hidden') }} {{ knp_pagination_sortable(credit_note_items, 'Locked', 'cn.locked') }} Invoice Waybill {{ knp_pagination_sortable(credit_note_items, 'ex VAT', 'cn.amount_ex_vat') }} {{ knp_pagination_sortable(credit_note_items, 'VAT', 'cn.vat') }} {{ knp_pagination_sortable(credit_note_items, 'inc VAT', 'cn.amount_inc_vat') }}
{{ entity.creditNoteDate | date("Y/m/d") }} {{ months[entity.periodMonth] }} {{ entity.periodYear }} {% if entity.company is not null %} {{ entity.company.companyName | trim }} {% endif %} {{ entity.partner.companyName | trim }} {% if entity.maAccount %} {{ entity.maAccount.maAccountName|trim }} {% else %} NOT SET {% endif %} {{ entity.CreditNoteNumber | trim }} {{ entity.hidden ? 'Hidden' : 'Shown' }} {{ entity.locked ? 'Locked' : 'Unlocked' }} {% if entity.allocations|length > 0 %} {% for allocation in entity.allocations %} {% if allocation.pdfInvoice is not null %} {{ allocation.pdfInvoice.invoiceNumber|trim }} {% endif %} {% endfor %} {% endif %} {% if entity.allocations|length > 0 %} {% for allocation in entity.allocations %} {% if allocation.rttWaybill is not null %} {{ allocation.rttWaybill.consignmentId|trim }} {% elseif allocation.courieritWaybill is not null %} {{ allocation.courieritWaybill.waybillNumber|trim }} {% elseif allocation.ewcWaybill is not null %} {{ allocation.ewcWaybill.waybill|trim }} {% elseif allocation.kingsWaybill is not null %} {{ allocation.kingsWaybill.waybill|trim }} {% elseif allocation.cargoworksWaybill is not null %} {{ allocation.cargoworksWaybill.waybill|trim }} {% elseif allocation.churchillsWaybill is not null %} {{ allocation.churchillsWaybill.waybill|trim }} {% elseif allocation.expresswaysWaybill is not null %} {{ allocation.expresswaysWaybill.waybill|trim }} {% elseif allocation.utiWaybill is not null %} {{ allocation.utiWaybill.shipmentNumber|trim }} {% elseif allocation.skynetWaybill is not null %} {{ allocation.skynetWaybill.waybill|trim }} {% elseif allocation.gavicWaybill is not null %} {{ allocation.gavicWaybill.waybill|trim }} {% elseif allocation.fpDuToitWaybill is not null %} {{ allocation.fpDuToitWaybill.waybill|trim }} {% elseif allocation.celticFreightWaybill is not null %} {{ allocation.celticFreightWaybill.waybill|trim }} {% elseif allocation.bbTransportWaybill is not null %} {{ allocation.bbTransportWaybill.waybill|trim }} {% elseif allocation.transWorldWaybill is not null %} {{ allocation.transWorldWaybill.waybill|trim }} {% elseif allocation.camposWaybill is not null %} {{ allocation.camposWaybill.waybill|trim }} {% elseif allocation.aramexWaybill is not null %} {{ allocation.aramexWaybill.waybill|trim }} {% elseif allocation.abafaziWaybill is not null %} {{ allocation.abafaziWaybill.waybill|trim }} {% elseif allocation.fedexWaybill is not null %} {{ allocation.fedexWaybill.waybill|trim }} {% elseif allocation.emitWaybill is not null %} {{ allocation.emitWaybill.waybill|trim }} {% elseif allocation.rowelWaybill is not null %} {{ allocation.rowelWaybill.waybill|trim }} {% elseif allocation.inMotionWaybill is not null %} {{ allocation.inMotionWaybill.waybill|trim }} {% elseif allocation.adhocWaybillWaybill is not null %} {{ allocation.adhocWaybillWaybill.waybill|trim }} {% elseif allocation.rbAndSonWaybill is not null %} {{ allocation.rbAndSonWaybill.waybill|trim }} {% elseif allocation.skynetReversal is not null %} {{ allocation.skynetReversal.waybill|trim }} {% elseif allocation.utiReversal is not null %} {{ allocation.utiReversal.shipmentNumber|trim }} {% endif %} {% endfor %} {% endif %} {{ entity.amountExVat|number_format(2, '.', ' ') }} {{ entity.vat|number_format(2, '.', ' ') }} {{ entity.amountIncVat|number_format(2, '.', ' ') }}
{% endblock content %}