{% if "STOCK" in arrayRight or is_granted('ROLE_SUPER_ADMIN') %}
{% if "STOCK" in rights %} {% set total = 0 %} {% set reserved = 0 %} {% for stock in declinaison.stocks %} {% set total = total + stock.qtStock %} {% set reserved = reserved + stock.qtReserved %} {% endfor %} {% set dispo = total - reserved %} {% set seuil = declinaison.alertStockMin ?? 0 %} {% set achatHt = (declinaison.buyingPriceHt ?? 0) * total %} {% set achatTtc = (declinaison.buyingPriceTtc ?? 0) * total %} {% set venteHt = (declinaison.priceHt ?? 0) * total %} {% set venteTtc = (declinaison.priceTtc ?? 0) * total %} {# Tableau de bord #}

Synthèse du stock

Qté en stock
{{ total }}
Qté réservée
{{ reserved }}
Qté disponible
{{ dispo }}
Seuil qté
{{ seuil }}
Valorisation achat HT
{{ achatHt|number_format(3,'.',',') }} TND
Valorisation achat TTC
{{ achatTtc|number_format(3,'.',',') }} TND
Valorisation vente HT
{{ venteHt|number_format(3,'.',',') }} TND
Valorisation vente TTC
{{ venteTtc|number_format(3,'.',',') }} TND
{# Suivi opérationnel #}

Détail par entrepôt

{% if "STOCK_UPDATE" in rights %} {% endif %}
{% for stock in declinaison.stocks %} {% set dispoRow = stock.qtStock - stock.qtReserved %} {% else %} {% endfor %}
Entrepôt Qté stock Qté réservée Qté disponible Seuil Alerte Historique
{{ stock.storehouse }} {{ stock.qtStock }} {{ stock.qtReserved }} {{ dispoRow }}
{% if "PRODUIT_UPDATE" in rights %} {% endif %}
{% if dispoRow < seuil %} {% elseif dispoRow == seuil %} {% else %} {% endif %}
Aucun stock configuré.
{# Historique des mouvements modal #} {# Modal mouvement manuel #} {% endif %}
{% endif %}