src/IlaveU/FrontBundle/Themes/IlaveU/templates/admin/shopadmin/order/_orderTemplate.html.twig line 1
{% if order is defined %}{% set currency = settings.get.currency|trans({},"admin") %}{% set notAllProductCanBeTreatedInShippingMethod = false %}{% set oldReductionPromo = 0 %}{% if getMetaDataValue(order.metaData,"applied_cashback_amt") %}{% set oldReductionPromo = getMetaDataValue(order.metaData,"applied_cashback_amt") %}{% endif %}<div id="invoice"><div class="invoice-mask-logo"></div><div class="invoice"><div><header><div class="row"><div class="col"></div></div></header><main><div class="row contacts"><divclass="col-4 invoice-to"><!-- Info Company --><div class="date"><a target="_blank" href="#"><img width="120" src="{{settings.get().logoBase64}}"></a><p style="max-width:210px;font-size:0.7rem;" class="mt-3"><small>{{settings.get.address}}</small></p></div></div><div class="col-8 invoice-details"><div class="text-gray-light"></div>{% if order.customer %}<h2 class="to">{{order.customer.firstName}}{{order.customer.lastName}}</h2>{% else %}<h2 class="to">{{order.firstName}}{{order.lastName}}</h2>{% endif %}<div class="address d-none"><b>Adresse</b>{{order.customer ? order.customer.address : order.address}}</div><div class="address d-none"><b>Code postal</b>{{order.postCode}}</div><div class="address d-none"><b>Ville</b>{{order.city}}</div><div class="address"><b>Tel : </b>{% if order.customer %}<a href="tel:{{order.customer.phone}} ">{{order.customer.phone}}</a>{% else %}<a href="tel:{{order.tel}} ">{{order.tel}}></a>{% endif %}</div>{% if order.customer %}{% if order.customer.description %}<div class="badge badge-info"><b>Note</b>{{order.customer.description}}</div>{% endif %}{% endif %}<div class="email"><b>Email : </b>{% if order.customer %}<a href="mailto:{{order.customer.email}} ">{{order.customer.email}}{% else %}<a href="mailto:{{order.email}} ">{{order.email}}{% endif %}</a></div></div><div class="col-12 text-right mt-4" style="text-align:right;margin-top:30px;"><div class="date">Nombre total de produits<b>{% set totalProducts = 0 %}{% for singleOrderItem in order.orderItems %}{% if singleOrderItem.decimalQuantity != null and singleOrderItem.quantity >= 0 %}{% set totalProducts = totalProducts + 1 %}{% else %}{% if singleOrderItem.product %}{% set totalProducts = totalProducts + (singleOrderItem.product.defaultQuantity * singleOrderItem.quantity) %}{% else %}{% set totalProducts = totalProducts + singleOrderItem.quantity %}{% endif %}{% endif %}{% endfor %}{{totalProducts}}</b>| Num de{{order.orderType|trans({},"admin")}}<b>{{order.orderNumber}}</b>| Date de commande<b>{{order.createdAt|date('d/m/Y')}}</b></div></div></div><table border="0" cellspacing="0" cellpadding="0"><thead><tr><th>Produit</th><th class="text-left hide-for-small">Service</th><th class="text-right">Prix</th>{# <th class="text-right hide-for-small">Reduction</th> #}<th class="text-right">TOTAL</th></tr></thead><tbody>{% set totalCommission = 0 %}{% set totalOrder = 0 %}{% for singleOrderItem in order.orderItems %}{% set finalPrice = singleOrderItem.finalPrice %}<tr><td class="no">{{singleOrderItem.description}}{% if singleOrderItem.product %}{% if singleOrderItem.product.includedShippingMethods|length > 0 %}{% set notAllProductCanBeTreatedInShippingMethod = true %}{% if order.shippingMethod not in singleOrderItem.product.includedShippingMethods %}<br><small>Ce produit ne peut pas être traité en<b>{{order.shippingMethod.name}}</b></small>{% endif %}{% endif %}{% endif %}<!-- Button trigger modal --></td><td class="text-left hide-for-small"><p style="font-size:9px;">{% if singleOrderItem.product %}{% for categorie in singleOrderItem.product.categoriesProduct %}{{categorie}},{% endfor %}{% elseif singleOrderItem.packEngagement %}{{ singleOrderItem.packEngagement.pack.title }}{% endif %}</p></td><td class="unit" style="white-space:nowrap;">{{finalPrice }}{{currency}}X{{singleOrderItem.decimalQuantity ? singleOrderItem.decimalQuantity : singleOrderItem.quantity}}</td>{# <td class="qty hide-for-small" style="white-space:nowrap;">{% if singleOrderItem.reduction > 0 %}{{singleOrderItem.reduction }}{{currency}}{% elseif singleOrderItem.product %}{% if singleOrderItem.product.reduction > 0 %}{{singleOrderItem.product.reduction}}{{currency}}{% else %}0{{currency}}{% endif %}{% else %}0{{currency}}{% endif %}</td> #}<td class="total" style="white-space:nowrap;">{% set totalOrder = totalOrder + (singleOrderItem.totalAmount) %}{{singleOrderItem.totalAmount|number_format(2, ',', ' ') }}{{currency}}</td></tr>{% endfor %}</tbody><tfoot>{% set reductionCoupon = 0 %}{% if order.coupon %}{% if order.coupon.typeReduction == "percent" %}{% set reductionCoupon = (order.totalAmount / 100) * order.coupon.valueReduction %}{% else %}{% set reductionCoupon = order.coupon.valueReduction %}{% endif %}{% endif %}{% set totalToPay = (totalOrder + order.shippingFees + order.shippingTips) - reductionCoupon - order.reductionOnTotal + (order.getAmountPayedByCredit) %}<tr><td colspan="1" class="hide-for-small"></td><td colspan="2">Total produits</td><td>{{order.totalAmount|number_format(2, ',', ' ')}}{{currency}}</td></tr>{% if order.shippingFees > 0 %}<tr><td colspan="1" class="hide-for-small"></td><td colspan="2">Frais de livraison</td><td>{{ order.shippingFees|number_format(2, ',', ' ') }}{{currency}}</td></tr>{% endif %}{#{% if order.getTotalReduction > 0 %}<tr><td colspan="1" class="hide-for-small"></td><td colspan="2">Total Reduction sur produits</td><td>{{order.getTotalReduction|number_format(2, ',', ' ')}}{{currency}}</td></tr>{% endif %}#}{% if order.reduction and order.reduction > 0 %}<tr><td colspan="1" class="hide-for-small"></td><td colspan="2">Remise sur la commande ({{order.reductionInPercent}}%)</td><td>{{order.reduction|number_format(2, ',', ' ')}}{{currency}}</td></tr>{% endif %}{% if order.walletPaymentAmount > 0 %}<tr><td colspan="1" class="hide-for-small"></td><td colspan="2">Crédit utilisé</td><td>{{order.walletPaymentAmount|abs|number_format(2, ',', ' ')}}{{currency}}</td></tr>{% endif %}{% if order.getAmountEarnedAsCredit and order.getAmountEarnedAsCredit != 0 %}<tr><td colspan="1" class="hide-for-small"></td><td colspan="2">Montant ajouté au wallet client</td><td>{{order.getAmountEarnedAsCredit|abs|number_format(2, ',', ' ')}}{{currency}}</td></tr>{% endif %}{% if reductionCoupon > 0 %}<tr><td colspan="1" class="hide-for-small"></td><td colspan="2">Code Coupon utilisé ({{order.coupon.code }})</td><td>{{reductionCoupon|abs|number_format(2, ',', ' ')}}{{currency}}</td></tr>{% endif %}{% if order.shippingTips > 0 %}<tr><td colspan="1" class="hide-for-small"></td><td colspan="2">Pourboire pour le livreur</td><td>{{ order.shippingTips|number_format(2, ',', ' ') }}{{currency}}</td></tr>{% endif %}{% if oldReductionPromo > 0 %}<tr><td colspan="1" class="hide-for-small"></td><td colspan="2">Reduction Promo</td><td>{{oldReductionPromo|number_format(2, ',', ' ')}}{{currency}}</td></tr>{% endif %}{% if order.payedAmount > 0 %}<tr><td colspan="1" class="hide-for-small"></td><td colspan="2">Montant payé</td>{% set payedAmount = order.payedAmount %}{% if order.getAmountEarnedAsCredit > 0 %}{% set payedAmount = order.payedAmount + order.getAmountEarnedAsCredit %}{% endif %}<td colspan="2">{{ payedAmount|number_format(2, ',', ' ') }}{{currency}}</td>{#<td>{{order.totalAmount + order.ldryOrder.deliveryPrice}} {{currency}}</td>#}</tr>{% endif %}{% if order.fullRestAmount > 0 %}<tr><td colspan="1" class="hide-for-small"></td><td colspan="2">Reste à payer</td><td>{{ order.fullRestAmount|number_format(2, ',', ' ') }}{{currency}}</td></tr>{% endif %}<tr><td colspan="1" class="hide-for-small"></td><td colspan="2"><b>Montant Total</b></td><td colspan="2"><b>{{ (order.fullTotalAmount - oldReductionPromo)|number_format(2, ',', ' ') }}{{currency}}</b></td>{#<td>{{order.totalAmount + order.ldryOrder.deliveryPrice}} {{currency}}</td>#}</tr></tfoot></table><div class="thanks"></div><div class="notices "><div>INFOS:</div><div class="notice">{% if notAllProductCanBeTreatedInShippingMethod %}<p>Important:<span class="badge badge-info">Un ou plusieurs produits sélectionnés ne peuvent être traités en<b>{{order.shippingMethod.name}}</b></span></p>{% endif %}{% if order.comment %}<p>Note sur la commande:<span class="badge badge-info">{{order.comment}}</span></p>{% endif %}{% if order.shippingMethod %}{% if order.shippingMethod.isIsSeparatelyCalculated %}<p>Mode livraison :<span class="badge badge-success">{{order.shippingMethod}}</span></p>{% endif %}{% endif %}{% if order.paymentMethod %}<p>Mode Paiement :<span class="badge badge-success">{{order.paymentMethod }}</span></p>{% endif %}{% if order.agent %}<p>Livreur :<span class="badge badge-warning">{{order.agent.firstName}}{{order.agent.lastName}}</span></p>{% endif %}{% if order.shippingMethod %}{% set shippingDurationInMinutes = order.shippingMethod.shippingDuration * 60 %}{% if order.shippingMethod.isIsSeparatelyCalculated %}<p>Date collecte :<span class="badge badge-warning">{{order.startProcessingAt|date("Y-m-d H:i")}}-{{order.startProcessingAt|date_modify("+ "~shippingDurationInMinutes~" minutes")|date("H:i")}}</span></p><p>Date livraison :<span class="badge badge-warning">{{order.startDeliveryAt|date("Y-m-d H:i")}}-{{order.startDeliveryAt|date_modify("+ "~shippingDurationInMinutes~" minutes")|date("H:i")}}</span></p>{% endif %}{% endif %}{% if order.description %}<b>Informations utiles</b><div class="badge badge-info">{{order.description}}</div>{% endif %}</div></div></main></div><!--DO NOT DELETE THIS div. IT is responsible for showing footer always at the bottom--><div></div></div></div>{% endif %}