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

{{ order.clientDolibarrName }} {{ order.createdAt|date }}

Created By
{{ order.createdBy.firstName }} {{ order.createdBy.lastName }}
Shipper
{{ order.shipper.name }}
Status
{{ order.arrayOfStatus[order.status] }}
Dolibarr Id
{{ order.dolibarId }}
{% if order.canal.name is defined %} {% endif %} {% if order.trackingCode is not null %}
Track Id
{{ order.trackingCode }}
{% endif %}
{% if order.status == 1 %} {% if (is_granted('ROLE_ADMIN') or is_granted('ROLE_ORDER_MANAGER') or is_granted('ROLE_ORDER_DELETE')) %} Delete {% endif %} {% elseif order.status == 3 %} {% if order.shipper.type in ['first','tunisiaExpress', "jax"] %} {% endif %} {% elseif order.status == 4 %} {% if order.shipper.type == 'first' %} Print    {% endif %} {% if order.shippingStatus is null and order.trackingCode is not null and order.shipper.type == 'tunisiaExpress' %} {% endif %} {% endif %} {% if order.shippingStatus is not null %} {% endif %}
{% set subtotal = 0 %} {% for product in order.data %} {% set subtotal = subtotal + ( product.price * product.qty) %} {% endfor %} {% if order.voucher is not null and order.voucher.application == constant('App\\Entity\\Power\\Voucher::APPLICATION_TYPE_PRODUCT') %} {% set voucherAmount = 0 %} {% if order.voucher.discountType == constant('App\\Entity\\Power\\Voucher::DISCOUNT_TYPE_FIX') %} {% set voucherAmount = order.voucher.discountValue %} {% set subtotal = subtotal - order.voucher.discountValue %} {% elseif order.voucher.discountType == constant('App\\Entity\\Power\\Voucher::DISCOUNT_TYPE_PERCENT') %} {% set voucherAmount = subtotal * (order.voucher.discountValue/100) %} {% set subtotal = subtotal - (subtotal * (order.voucher.discountValue/100)) %} {% endif %} {% if subtotal < 0 %} {% set subtotal = 0 %} {% endif %} {% elseif order.voucher is not null and order.voucher.application == constant('App\\Entity\\Power\\Voucher::APPLICATION_TYPE_SHIPPING') %} {% endif %}
Barcode Product P.U Qty Subtotal
{{ product.barcode is defined ? product.barcode : '' }} {{ product.name is defined ? product.name : '' }} {{ product.price is defined ? product.price : '' }} {{ product.qty is defined ? product.qty : ''}} {{ product.price * product.qty }}
{{ order.voucher.code }} {{ order.voucher.name}} -{{ voucherAmount }}
{{ order.voucher.code }} {{ order.voucher.name}}

Note :

{{ order.notes }}

Details

Subtotal: {{ subtotal }}
Shipping: {{ order.shippingPrice }}
Total: {{ subtotal + order.shippingPrice }}
{% if tunisiaExpressData is not null %}

Tunisia Express History

{% for item in tunisiaExpressData|reverse %} {% endfor %}
id Code Label Date
{{ item.id is defined ? item.id : '' }} {{ item.status_code is defined ? item.status_code : '' }} {{ item.status_label is defined ? item.status_label : '' }} {{ item.update_date is defined ? item.update_date : '' }}
{% endif %}
{% if order.status == 3 and order.shipper.type == 'first' %} {% elseif order.status == 3 and order.shipper.type == 'tunisiaExpress' %} {% elseif order.status == 3 and order.shipper.type == 'jax' %} {% endif %} {% endblock %} {% block script %} {% if order.shipper.type == "tunisiaExpress" %} {% endif %} {% endblock %}