Skip to content

Commit

Permalink
Do not display discounts on show if they do not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Zales0123 committed Jun 24, 2024
1 parent 47a3e85 commit 53afe17
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,14 @@
{{ money.format(item.total, order.currencyCode) }}
</td>
</tr>
{% set discounts = item.getAdjustments(adminOrderItemDiscountAdjustment) %}
{% if discounts is not empty %}
<tr>
<td colspan="9">
<strong>{{ 'setono_sylius_order_edit.ui.discounts'|trans }}:</strong>
{% for discount in item.getAdjustments(adminOrderItemDiscountAdjustment) %}
{% for discount in discounts %}
{{ money.format(discount.amount, order.currencyCode) }}{% if not loop.last %}, {% endif %}
{% endfor %}
</td>
</tr>
{% endif %}

0 comments on commit 53afe17

Please sign in to comment.