{% extends 'base.html.twig' %} {% set titleName = "Batch Details " %} {% block title %} POWER DATA | Batch : {{ batch.numberOfLot }} {% endblock %} {% block page %} {{ batch.numberOfLot }} {% endblock %} {% block breadcrumb %} {% if titleName != "Home" %} {{ titleName }} / {{ batch.numberOfLot }} {% endif %} {% endblock %} {% block css %} {% if batch.status > 1 %} {% endif %} {% endblock %} {% block content %}
{% for message in app.flashes('success') %} {% endfor %} {% for message in app.flashes('error') %} {% endfor %}

{{ batch.clientDolibarrName }} Date: {{ batch.createdAt|date }}

Created By
{{ batch.createdBy.firstName }} {{ batch.createdBy.lastName }}
Shipper
{{ batch.shipper.name }}
Status
{{ batch.arrayOfStatus[batch.status] }}
{% if batch.status == 1 %} {% if is_granted('ROLE_ADMIN') or is_granted('ROLE_BATCH_MANAGER') %} Validate {% endif %} {% elseif batch.status == 2 %} Checking {% elseif batch.status == 3 %} To Completed {% elseif batch.status == 4 %} {% endif %}
{% if batch.status == 1 %}
{% set index = 1 %} {% for order in batch.orders %} {% set index = index + 1 %} {% endfor %}
Num Id Dolibar Id Sub Total Shipping Created At Canal Status Action
{{ index }} {{ order.id }} {{ order.dolibarId }} {% set total = 0 %} {% for item in order.data %} {% set total = total + (item.price * item.qty) %} {% endfor %} {% if order.voucher is not null and order.voucher.application == constant('App\\Entity\\Power\\Voucher::APPLICATION_TYPE_PRODUCT') %} {% if order.voucher.discountType == constant('App\\Entity\\Power\\Voucher::DISCOUNT_TYPE_FIX') %} {% set total = total - order.voucher.discountValue %} {% elseif order.voucher.discountType == constant('App\\Entity\\Power\\Voucher::DISCOUNT_TYPE_PERCENT') %} {% set total = total - (total * (order.voucher.discountValue/100)) %} {% endif %} {% set total = (total < 0) ? 0 : total %} {% endif %} {{ total }} {{ order.shippingPrice }} {{ order.createdAt|date("d/m/Y") }} {{ order.canal.name is defined ? order.canal.name :'' }} View {% if (is_granted('ROLE_ADMIN') or is_granted('ROLE_BATCH_MANAGER') ) and (batch.status == 1 or batch.status == 2) %} {% endif %} {% if order.shipper.type == 'first' and order.urlFirstPdf is not null %} Print    {% endif %}
{% else %}
{% set index = 1 %} {% for order in batch.orders %} {% set index = index + 1 %} {% endfor %}
Num Dolibar Id Full Name Phone Sub Total Shipping Created At Canal Status Action
{{ index }} {{ order.dolibarId }} {{ order.fullName }} {{ order.phone }} {% set total = 0 %} {% for item in order.data %} {% set total = total + (item.price * item.qty) %} {% endfor %} {% if order.voucher is not null and order.voucher.application == constant('App\\Entity\\Power\\Voucher::APPLICATION_TYPE_PRODUCT') %} {% if order.voucher.discountType == constant('App\\Entity\\Power\\Voucher::DISCOUNT_TYPE_FIX') %} {% set total = total - order.voucher.discountValue %} {% elseif order.voucher.discountType == constant('App\\Entity\\Power\\Voucher::DISCOUNT_TYPE_PERCENT') %} {% set total = total - (total * (order.voucher.discountValue/100)) %} {% endif %} {% set total = (total < 0) ? 0 : total %} {% endif %} {{ total }} {{ order.shippingPrice }} {{ order.createdAt|date("d/m/Y") }} {{ order.canal.name is defined ? order.canal.name :'' }} View {% if (is_granted('ROLE_ADMIN') or is_granted('ROLE_BATCH_MANAGER') ) and (batch.status == 1 or batch.status == 2) %} {% endif %} {% if order.shipper.type == 'first' and order.urlFirstPdf is not null %} Print    {% endif %}
Num Dolibar Id Full Name Phone Sub Total Shipping Created At Canal Status Action
{% endif %}
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_BATCH_MANAGER') %} {% endif %} {% endblock %} {% block script %} {% if batch.status > 1 %} {% endif %} {% endblock %}