{% extends 'D2RowelBundle::base.html.twig' %}
{% block head_script_extra %}
{% endblock head_script_extra %}
{% block page_header %}
{% 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"} %}
Partner Manager:
ROWEL
Period:
{{ months[month] }}/{{ year }}
{% endblock page_header %}
{% block content %}
{#
#}
{# FILTER SECTION #}
{# STATS SECTION #}
{% if mis_alloced_waybills|length > 0 %}
{% endif %}
{% if calc_rules_exceptions|length > 0 %}
{% endif %}
{% if esculations|length > 0 %}
{% endif %}
{% if quoted|length > 0 %}
{% endif %}
{# INVOICE SECTION #}
{% if app.request.get('page') is not null %}
{% set current_page = app.request.get('page') %}
{% else %}
{% set current_page = 1 %}
{% endif %}
{% if invoice_file_list|length != 0 %}
{% for entity in invoice_file_list %}
{% if loop.first %}
{% endif %}
{% if is_granted('ROLE_ADMIN_WAYBILL_FILE_MANAGE') %}
{% if entity.getProcessStatus == constant('D2\\RowelBundle\\Entity\\InvoiceFile::TYPE_PS_IMPORTED') or entity.getProcessStatus == constant('D2\\RowelBundle\\Entity\\InvoiceFile::TYPE_PS_PAUSED') %}
{% elseif entity.getProcessStatus == constant('D2\\RowelBundle\\Entity\\InvoiceFile::TYPE_PS_PROCESSING') or entity.getProcessStatus == constant('D2\\RowelBundle\\Entity\\InvoiceFile::TYPE_PS_RELEASED')%}
{% endif %}
{% endif %}
{% if entity.getProcessStatus == constant('D2\\RowelBundle\\Entity\\InvoiceFile::TYPE_PS_PROCESSED') or entity.getProcessStatus == constant('D2\\RowelBundle\\Entity\\InvoiceFile::TYPE_PS_CHECKED') %}
{% if is_granted('ROLE_ADMIN_WAYBILL_VIEW') %}
{% endif %}
{% if is_granted('ROLE_ADMIN_WAYBILL_FILE_MANAGE') and entity.getLocked != true %}
{% endif %}
{% if is_granted('ROLE_ADMIN_WAYBILL_FILE_CREATE') and entity.getLocked != true %}
{% endif %}
{% elseif entity.getProcessStatus == constant('D2\\RowelBundle\\Entity\\InvoiceFile::TYPE_PS_INVOICED') %}
{% if is_granted('ROLE_ADMIN_WAYBILL_VIEW') %}
{% endif %}
{#
{% elseif entity.getProcessStatus == constant('D2\\UTIBundle\\Entity\\InvoiceFile::TYPE_PS_ERROR') %}
{% if is_granted('ROLE_ADMIN_WAYBILL_FILE_CREATE') %}
{% endif %}
#}
{% endif %}
{% if is_granted('ROLE_ADMIN_WAYBILL_FILE_DELETE') and entity.getLocked != true and entity.getProcessStatus != constant('D2\\RowelBundle\\Entity\\InvoiceFile::TYPE_PS_INVOICED') %}
×
{% endif %}
|
{% set file_type = d2_file_type(entity.origPath) %}
{% if file_type == 'csv' %}
{% elseif file_type == 'speadsheet' %}
{% elseif file_type == 'unknown' %}
{% endif %}
{% if entity.pdfInvoice %}
{% endif %}
{% set task_cnt = d2_partner_get_task_cnt(entity.periodMonth, entity.periodYear, 'WAYBILL_INVOICE', entity.partner.id, entity.maAccount.id, entity.id) %}
{% set note_cnt = d2_partner_get_note_cnt(entity.periodMonth, entity.periodYear, 'WAYBILL_INVOICE', entity.partner.id, entity.maAccount.id, entity.id) %}
{% if task_cnt['open_task_cnt'] > 0 %}
{% elseif task_cnt['closed_task_cnt'] > 0 %}
{% else %}
{% endif %}
{% if note_cnt > 0 %}
{% else %}
{% endif %}
|
Status: | {{ process_status_opts[entity.getProcessStatus] }}
{% if entity.getLocked == true %}
{% else %}
{% endif %}
|
Filename: | {{ entity.origPath|trim|slice(0, 25) }}
{% if entity.getLocked != true %}{% endif %}
|
Account: | {% if entity.maAccount is not null %}{{ entity.maAccount.maAccountName }}{% endif %}
{% if entity.getLocked != true %}{% endif %}
|
{% if entity.pdfInvoice %}
Invoice: | {{ entity.pdfInvoice.invoiceNumber }}
{% if entity.getLocked != true %}
|
{% endif %}
{% endif %}
Owner: | {% if entity.getUser %}{{ entity.getUser.getUsername|trim }} {% else %} Unknown {% endif %} |
Created: | {{ entity.date|date("Y/m/d g:ia") }} |
{% set import_status = d2_rowel_invoice_file_import_status(entity.id) %}
{% set check_status = d2_rowel_invoice_file_check_status(entity.id) %}
{% if import_status == true or check_status == true %}
{% else %}
{% endif %}
|
{% if not loop.first and loop.index%3 == 0 %}
{% set export_status = d2_partner_export_status(partner_id, 'WAYBILL') %}
{% if export_status == true %}
{% endif %}
{% endif %}
{# CREDIT NOTES #}
{% if credit_note_file_list|length != 0 %}
{% for entity in credit_note_file_list %}
{% if loop.first %}
{% endif %}
{% if is_granted('ROLE_ADMIN_PARTNER_MANAGE') %}
{% if entity.locked == false %}{% endif %}
{% if entity.locked == false %}{% endif %}
{% if entity.locked == false %}{% endif %}
{% if entity.locked == false %}×{% endif %}
{% endif %}
|
{% set task_cnt = d2_partner_get_task_cnt(entity.periodMonth, entity.periodYear, 'CREDIT_NOTE', entity.partner.id, entity.maAccount.id, entity.id) %}
{% set note_cnt = d2_partner_get_note_cnt(entity.periodMonth, entity.periodYear, 'CREDIT_NOTE', entity.partner.id, entity.maAccount.id, entity.id) %}
{% if task_cnt['open_task_cnt'] > 0 %}
{% elseif task_cnt['closed_task_cnt'] > 0 %}
{% else %}
{% endif %}
{% if note_cnt > 0 %}
{% else %}
{% endif %}
|
Credit: | {{ entity.creditNoteNumber }} |
{% for allocation in entity.getAllocations %}
{% if allocation.pdfInvoice is not null %}
Invoice: | {{ allocation.pdfInvoice.invoiceNumber }}
{% if entity.locked == false %}
|
{% endif %}
{% elseif allocation.rowelWaybill is not null %}
Waybill: | {{ allocation.rowelWaybill.waybill }}
{% if entity.locked == false %}
|
{% endif %}
{% endif %}
{% endfor %}
Owner: | {% if entity.getUser %}{{ entity.getUser.getUsername|trim }} {% else %} Unknown {% endif %} |
Created: | {{ entity.date|date("Y/m/d g:ia") }} |
Account: | {{ entity.getMaAccount.getMaAccountName }} |
|
{% if not loop.first and loop.index%3 == 0 %}
{% endif %}
{# STATEMENTS #}
{% if statement_file_list|length != 0 %}
{% for entity in statement_file_list %}
{% if loop.first %}
{% endif %}
{% if is_granted('ROLE_ADMIN_PARTNER_MANAGE') %}
×
{% endif %}
|
{% set task_cnt = d2_partner_get_task_cnt(entity.periodMonth, entity.periodYear, 'STATEMENT', entity.partner.id, entity.maAccount.id, entity.id) %}
{% set note_cnt = d2_partner_get_note_cnt(entity.periodMonth, entity.periodYear, 'STATEMENT', entity.partner.id, entity.maAccount.id, entity.id) %}
{% if task_cnt['open_task_cnt'] > 0 %}
{% elseif task_cnt['closed_task_cnt'] > 0 %}
{% else %}
{% endif %}
{% if note_cnt > 0 %}
{% else %}
{% endif %}
|
Owner: | {% if entity.getUser %}{{ entity.getUser.getUsername|trim }} {% else %} Unknown {% endif %} |
Created: | {{ entity.date|date("Y/m/d g:ia") }} |
Account: | {{ entity.getMaAccount.getMaAccountName }} |
Statement: | {{ entity.origPath|trim|slice(0, 28) }} |
{% for invoice in entity.getPdfInvoices %}
Invoice: | {{ invoice.invoiceNumber }}
|
{% endfor %}
{% for credit_note in entity.getPdfCreditNotes %}
Credit: | {{ credit_note.creditNoteNumber }}
|
{% endfor %}
|
{% if not loop.first and loop.index%3 == 0 %}
{% endif %}
{# ROWEL RATE CALCULATOR SETUP #}
{% if is_granted('ROLE_ADMIN_PARTNER_FREIGHT_CALC_VIEW') %}
{% endif %}
{% endblock content %}