src/Flexy/FrontBundle/Themes/IlaveU/templates/admin/shopadmin/order/field/statusOrderPayment.html.twig line 1

  1. {# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
  2. {# @var field \EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto #}
  3. {# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
  4. {% set urlEditStatusPayment = ea_url().setController("App\\Flexy\\FrontBundle\\Themes\\IlaveU\\Controller\\ShopAdmin\\Order\\ChangeStatusOrderPaymentCrudController")
  5. .setAction("edit")
  6. .setEntityId(entity.instance.id)
  7.  %}
  8. {% if is_granted("ROLE_ADMIN") or is_granted("ROLE_SHIPPING_AGENT") %}
  9.     <a href="{{urlEditStatusPayment}}" >
  10.     {% endif %}
  11. {% if entity.instance.status == "canceled" %}
  12.     <span class="badge badge-danger" title="Annulé"><i class="fa-solid fa-ban"></i> Annulé</span>
  13. {% elseif (entity.instance.status == "paid" and entity.instance.fullRestAmount <= 0) or
  14.     (entity.instance.fullRestAmount <= 0 and entity.instance.fullTotalAmount > 0)
  15.  %}
  16.     <span class="badge badge-success" title="Aucun"><i class="fa-solid fa-circle-check"></i> Réglé</span>
  17. {% elseif (entity.instance.status == "partially-paid" or entity.instance.status == "paid") and entity.instance.fullRestAmount > 0 %}
  18.     <span class="badge badge-success" title="Aucun"><i class="fa-solid fa-circle-check"></i> Réglé partiellement</span>
  19. {% else %}
  20.     <span class="badge badge-danger" title="Aucun"><i class="fa-solid fa-clock-rotate-left"></i> Non réglé</span>
  21. {% endif %}
  22. {% if is_granted("ROLE_ADMIN") or is_granted("ROLE_SHIPPING_AGENT") %}
  23.     </a>
  24.     {% endif %}