src/Flexy/FrontBundle/Themes/IlaveU/templates/admin/shopadmin/order/field/fullRestAmount.html.twig line 1
{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
{# @var field \EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto #}
{# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
{% set order = entity.instance %}
{% set reductionPromo = 0 %}
{% if order.metaData|length > 0 %}
{% set reductionPromo = getMetaDataValue(order.metaData,"applied_cashback_amt") %}
{% endif %}
{% set adjustedFullRestAmount = order.fullRestAmount - reductionPromo %}
{% set badgeStyle = "badge-warning" %}
{% if adjustedFullRestAmount > 0 and adjustedFullRestAmount < order.fullTotalAmount %}
{% set badgeStyle = "badge-danger" %}
{% elseif adjustedFullRestAmount == 0 %}
{% set badgeStyle = "badge-success" %}
{% endif %}
<span class="badge {{badgeStyle}}" >
<b>
{{ adjustedFullRestAmount}} {{settings.get.currency}}
</b>
</span>