{% import "macros/money.html.twig" as money %} {#{ dump(order) }#} {% set promotionsTotal = 0 %}
| # | Descrição | Qtd | Unt | Total | |
|---|---|---|---|---|---|
| {#{ variant.id }#} {# | #}{#{ product.name }#} {{ variant.name }} {% set options = [] %} {#% for o in variant.optionValues %}{% set options = options|merge([o.value|replace({' ':''})]) %}{% endfor %} {% if options|length %}({{ options|join('/') }}){% endif %#} | ||||
| # | {#% if variant.unidade %} {% set quant = (item.quantity/variant.unidade)|number_format(3,',','') %} {% else %#} {% set quant = item.quantity %} {#% endif %#} {{ quant }} | {#{ money.format(item.unitPrice, order.currencyCode) }#} {{ money.format(item.unitPrice, 'BRL') }} |
{% set promotionsItemTotal = 0 %}
{#% for unit in item.units %}
{% if unit.adjustments|length %}
{% set promotionsItemTotal = promotionsItemTotal + unit.adjustmentsTotal %}
{% set promotionsTotal = promotionsTotal + promotionsItemTotal %}
{% endif %}
{% endfor %#}
{% if promotionsItemTotal %}
|
||
| Promoção | {{ money.format(promotionsItemTotal, 'BRL') }} | {{ money.format(item.total, 'BRL') }} | |||
| Desconto | {{ money.format(item.adjustmentsTotal, 'BRL') }} | {{ money.format(item.total, 'BRL') }} | |||
| SUBTOTAL: | {{ money.format(order.itemsTotal ,'BRL') }} |
|
{% set orderPromotions = sylius_aggregate_adjustments(order.getAdjustmentsRecursively(orderPromotionAdjustment)) %}
{% if not orderPromotions is empty %}
{% for label, amount in orderPromotions %}
{{ label }}
{{ money.format(amount, 'BRL') }}
{% endfor %}
{% else %}
{{ 'sylius.ui.no_promotion'|trans }} . {% endif %} |
{{ 'sylius.ui.promotion_total'|trans }} : {{ money.format(order.orderPromotionTotal, 'BRL') }} |
| DESCONTO | {{ money.format(adjustment.amount, 'BRL') }} |
| {% if adjustment.type == 'shipping' %}FRETE:{% else %}DESCONTO:{% endif %} | {{ money.format(adjustment.amount, 'BRL') }} |
| DESCONTOS: | {{ money.format(order.adjustmentstotal, 'BRL') }} |
| Pagamento em {{ pag.method.name }} | {{ money.format(pag.amount, 'BRL') }} |
| TOTAL: {{ money.format(order.total, 'BRL') }} | |
| {{ ((totalPago-order.total)>0)? 'TROCO:': 'A PAGAR:' }} {% if (totalPago-order.total) == 0 %} PAGO {% else %} {{ money.format((totalPago-order.total)|abs, 'BRL') }} {% endif %} | |