{% set col = "col-12" %} {% if voucher.childVouchers|length > 0 %} {% set col = "col-6" %} {% endif %}
Name {{ voucher.name }}
Code {{ voucher.childVouchers|length > 0 ? "****************" : voucher.code }}
Type {{ type[voucher.type] }}
Application {{ application[voucher.application] }}
Discount Type {{ discountType[voucher.discountType] }}
Discount Value {{ voucher.discountValue }}
Status {{ status[voucher.status] }}
Used {{ used[voucher.used] }}
CreatedAt {{ voucher.createdAt|date("d/m/Y H:i:s") }}
UpdatedAt {% if voucher.updatedAt is not null %} {{ voucher.updatedAt|date("d/m/Y H:i:s") }} {% endif %}
{% if voucher.childVouchers|length > 0 %}

List of all sub vouchers

{% for child in voucher.childVouchers %} {% if child.status == true %} {% if child.used == 1 %} {{ child.code}} {% else %} {{ child.code}} {% endif %} {% else %} {{ child.code}} {% endif %} {% endfor %}
{% endif %}
{% if voucher.childVouchers|length > 0 %} {% endif %}