{% extends 'base.html.twig' %}
{% set titleName = "Order Details " %}
{% block title %} POWER DATA | Order : {{ order.id }} {% endblock %}
{% block page %} {% if order.batch is not null %} {{ order.batch.numberOfLot }} | {% endif %}{{ order.id }} {% endblock %}
{% block breadcrumb %} {% if titleName != "Home" %} {{ titleName }} / {{ order.id }} {% endif %} {% endblock %}
{% block css %}
{% endblock %}
{% block content %}
Note :
{{ order.notes }}
Details{{ visitor.fullName }}
{{ order.clientDolibarrName }}
{{ order.createdAt|date }}
{% 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 }}
{% set index = 1 %}
{% for order in orders %}
Num
Id
Sub Total
Shipping
Created At
Process
Product
Shipping
New Order
{% set index = index + 1 %}
{% endfor %}
{{ index }}
{{ order.id }}
{% 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") }}
{% if order.reviews is not null %}
{{ order.reviews.feedbackProcess}}
{{ order.reviews.feedbackProduct}}
{{ order.reviews.feedbackShipping}}
{{ order.reviews.possibilityOfOtherOrder == 0 ? "No" : "Yes" }}
{% else %}
--
--
--
--
{% endif %}