{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
{# @var field \EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto #}
{# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
{% if ea.crud.currentAction == 'detail' %}
<table class="table table-striped">
<tr>
<th>Nombre</th>
<th>Unidades</th>
<th>Precio</th>
</tr>
{% for value in field.value %}
<tr>
<td class="{{ not value.parent ? '' : 'ps-4' }}">{{ value.descripcion }}</td>
<td>{{ value.unidades }}</td>
<td>$ {{ value.preciototal }}</td>
</tr>
{% endfor %}
</table>
{% else %}
<span class="badge badge-secondary">{{ field.formattedValue }}</span>
{% endif %}