{% if Documents|length > 0 %} {% for doc in Documents %} {% if doc.invoice %} {% set view_path = path(download,{'type':'Invoice','id':doc.id }) %} {% endif %} {% if doc.creditnote %} {% set view_path = path(download,{'type':'CreditNote','id':doc.id }) %} {% endif %} {% if doc.debitnote %} {% set view_path = path(download,{'type':'DebitNote','id':doc.id }) %} {% endif %} {% if doc.quote %} {% set view_path = path(download,{'type':'Quote','id':doc.id }) %} {% endif %} {% endfor %} {% endif %}
{{ knp_pagination_sortable(Documents, 'Date', 'd.date') }} {{ knp_pagination_sortable(Documents, 'Document No.', 'd.docno') }} {{ knp_pagination_sortable(Documents, 'Account No.', 'd.description') }} {{ knp_pagination_sortable(Documents, 'Description', 'd.description') }} Amount Status
{% if doc.invoice.date %}{{ doc.invoice.date|date('Y-m-d') }}{% endif %} {{ doc.invoice.docNo }} {{ Account.accountNumber }} {{ doc.invoice.description }} {{ doc.invoice.total|number_format(2, '.', '') }} {% for statusItem in attribute(Status, doc.id) %} {{ statusItem|raw }}
{% endfor %}
{% if doc.creditnote.date %}{{ doc.creditnote.date|date('Y-m-d') }}{% endif %} {{ doc.creditnote.docNo }} {{ Account.accountNumber }} {{ doc.creditnote.description }} {{ doc.creditnote.total|number_format(2, '.', '') }} N/A
{% if doc.debitnote.date %}{{ doc.debitnote.date|date('Y-m-d') }}{% endif %} {{ doc.debitnote.docNo }} {{ Account.accountNumber }} {{ doc.debitnote.description }} {{ doc.debitnote.total|number_format(2, '.', '') }} N/A
{% if doc.quote.date %}{{ doc.quote.date|date('Y-m-d') }}{% endif %} {{ doc.quote.docNo }} {{ Account.accountNumber }} {{ doc.quote.description }} {{ doc.quote.total|number_format(2, '.', '') }} {% for statusItem in attribute(Status, doc.id) %} {{ statusItem|raw }}
{% endfor %}