{% 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 %}
{{ batch.clientDolibarrName }}
Date: {{ batch.createdAt|date }}
{% set index = 1 %}
{% for order in batch.orders %}
Num
Id
Dolibar Id
Sub Total
Shipping
Created At
Canal
Status
Action
{% set index = index + 1 %}
{% endfor %}
{{ 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 %}
{% set index = 1 %}
{% for order in batch.orders %}
Num
Dolibar Id
Full Name
Phone
Sub Total
Shipping
Created At
Canal
Status
Action
{% set index = index + 1 %}
{% endfor %}
{{ 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