|
| 1 | +{% import "@SyliusAdmin/Common/Macro/money.html.twig" as money %} |
| 2 | + |
| 3 | +{% set orderPromotionAdjustment = constant('Sylius\\Component\\Core\\Model\\AdjustmentInterface::ORDER_PROMOTION_ADJUSTMENT') %} |
| 4 | +{% set unitPromotionAdjustment = constant('Sylius\\Component\\Core\\Model\\AdjustmentInterface::ORDER_ITEM_PROMOTION_ADJUSTMENT') %} |
| 5 | +{% set shippingAdjustment = constant('Sylius\\Component\\Core\\Model\\AdjustmentInterface::SHIPPING_ADJUSTMENT') %} |
| 6 | +{% set taxAdjustment = constant('Sylius\\Component\\Core\\Model\\AdjustmentInterface::TAX_ADJUSTMENT') %} |
| 7 | + |
| 8 | +{% set variant = item.variant %} |
| 9 | +{% set product = variant.product %} |
| 10 | + |
| 11 | +{% set aggregatedUnitPromotionAdjustments = item.getAdjustmentsTotalRecursively(unitPromotionAdjustment) + item.getAdjustmentsTotalRecursively(orderPromotionAdjustment) %} |
| 12 | +{% set subtotal = (item.unitPrice * item.quantity) + aggregatedUnitPromotionAdjustments %} |
| 13 | + |
| 14 | +{% set taxIncluded = sylius_admin_order_unit_tax_included(item) %} |
| 15 | +{% set taxExcluded = sylius_admin_order_unit_tax_excluded(item) %} |
| 16 | + |
| 17 | +<tr> |
| 18 | + <td class="single line"> |
| 19 | + {% include '@SyliusAdmin/Product/_info.html.twig' %} |
| 20 | + |
| 21 | + {{ bitbag_render_product_bundle_order_items(item) }} |
| 22 | + </td> |
| 23 | + <td class="right aligned unit-price"> |
| 24 | + {{ money.format(item.unitPrice, order.currencyCode) }} |
| 25 | + </td> |
| 26 | + <td class="right aligned unit-discount"> |
| 27 | + {{ money.format(item.units.first.adjustmentsTotal(unitPromotionAdjustment), order.currencyCode) }} |
| 28 | + </td> |
| 29 | + <td class="right aligned unit-order-discount"> |
| 30 | + <span style="font-style: italic;">~ {{ money.format(item.units.first.adjustmentsTotal(orderPromotionAdjustment), order.currencyCode) }}</span> |
| 31 | + </td> |
| 32 | + <td class="right aligned discounted-unit-price"> |
| 33 | + {{ money.format(item.fullDiscountedUnitPrice, order.currencyCode) }} |
| 34 | + </td> |
| 35 | + <td class="right aligned quantity"> |
| 36 | + {{ item.quantity }} |
| 37 | + </td> |
| 38 | + <td class="right aligned subtotal"> |
| 39 | + {{ money.format(subtotal, order.currencyCode) }} |
| 40 | + </td> |
| 41 | + <td class="right aligned tax"> |
| 42 | + <div class="tax-excluded">{{ money.format(taxExcluded, order.currencyCode) }}</div> |
| 43 | + <div class="tax-disabled"> |
| 44 | + <div class="tax-included"> {{ money.format(taxIncluded, order.currencyCode) }} |
| 45 | + </div> |
| 46 | + <small>({{ 'sylius.ui.included_in_price'|trans }})</small> |
| 47 | + </div> |
| 48 | + </td> |
| 49 | + <td class="right aligned total"> |
| 50 | + {{ money.format(item.total, order.currencyCode) }} |
| 51 | + </td> |
| 52 | +</tr> |
0 commit comments