{% 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 %}
Note :
{{ order.notes }}
Details
{{ order.clientDolibarrName }}
{{ order.createdAt|date }}
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) %}
Barcode
Product
P.U
Qty
Subtotal
{% 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 %}
{{ 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 }}
{% elseif order.voucher is not null and order.voucher.application == constant('App\\Entity\\Power\\Voucher::APPLICATION_TYPE_SHIPPING') %}
{{ order.voucher.code }}
{{ order.voucher.name}}
-{{ voucherAmount }}
{% endif %}
{{ order.voucher.code }}
{{ order.voucher.name}}
Subtotal:
{{ subtotal }}
Shipping:
{{ order.shippingPrice }}
Total:
{{ subtotal + order.shippingPrice }}
Tunisia Express History
{% for item in tunisiaExpressData|reverse %}
id
Code
Label
Date
{% endfor %}
{{ 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 : '' }}