Autres declinaisons
{{ declinaison.produit.produitDeclinationValues|length }} declinaison{{ declinaison.produit.produitDeclinationValues|length > 1 ? 's' : '' }}
{% for item in declinaison.produit.produitDeclinationValues %} {% set isCurrent = item.id == declinaison.id %} {% set totalStock = 0 %} {% set totalReserved = 0 %} {% for stock in item.stocks %} {% set totalStock = totalStock + (stock.qtStock ?? 0) %} {% set totalReserved = totalReserved + (stock.qtReserved ?? 0) %} {% endfor %} {% set productPromo = item.produit.promotion ?? null %} {% set promoActive = productPromo and date(productPromo.startAt) <= date() and date(productPromo.endAt) >= date() %} {% set saleTtc = item.produit.priceTtc ?? 0 %} {% set saleTtcAfterPromo = saleTtc %} {% if promoActive %} {% if productPromo.discountType == 'percent' %} {% set saleTtcAfterPromo = saleTtc - (saleTtc * productPromo.discountValue / 100) %} {% else %} {% set saleTtcAfterPromo = saleTtc - productPromo.discountValue %} {% endif %} {% if saleTtcAfterPromo < 0 %}{% set saleTtcAfterPromo = 0 %}{% endif %} {% endif %} {% endfor %}
Reference Nom Valeurs Prix achat TTC Prix TTC Disponible Action
{{ item.reference }} {{ item.name }}
{% for gv in item.groupDeclinationValues %} {{ gv.declination.name }}: {{ gv.value.name }} {% endfor %}
{{ item.buyingPriceTtc|number_format(3, '.', ',') }} TND {% if promoActive %} {{ saleTtc|number_format(3, '.', ',') }} TND {{ saleTtcAfterPromo|number_format(3, '.', ',') }} TND -{{ productPromo.discountValue }}{{ productPromo.discountType == 'percent' ? '%' : ' TND' }} {% else %} {{ saleTtc|number_format(3, '.', ',') }} TND {% endif %} {{ totalStock - totalReserved }} {% if isCurrent %} En cours {% else %} Ouvrir {% endif %}
{% for item in declinaison.produit.produitDeclinationValues %} {% set isCurrent = item.id == declinaison.id %} {% set totalStock = 0 %} {% set totalReserved = 0 %} {% for stock in item.stocks %} {% set totalStock = totalStock + (stock.qtStock ?? 0) %} {% set totalReserved = totalReserved + (stock.qtReserved ?? 0) %} {% endfor %} {% set productPromo = item.produit.promotion ?? null %} {% set promoActive = productPromo and date(productPromo.startAt) <= date() and date(productPromo.endAt) >= date() %} {% set saleTtc = item.produit.priceTtc ?? 0 %} {% set saleTtcAfterPromo = saleTtc %} {% if promoActive %} {% if productPromo.discountType == 'percent' %} {% set saleTtcAfterPromo = saleTtc - (saleTtc * productPromo.discountValue / 100) %} {% else %} {% set saleTtcAfterPromo = saleTtc - productPromo.discountValue %} {% endif %} {% if saleTtcAfterPromo < 0 %}{% set saleTtcAfterPromo = 0 %}{% endif %} {% endif %}
{% if isCurrent %} {{ item.name }} {% else %} {{ item.name }} {% endif %}
{{ item.reference }}
{% if isCurrent %} En cours {% endif %}
{% for gv in item.groupDeclinationValues %} {{ gv.declination.name }}: {{ gv.value.name }} {% endfor %}
Prix achat TTC {{ item.buyingPriceTtc|number_format(3, '.', ',') }} TND
Prix TTC {% if promoActive %} {{ saleTtc|number_format(3, '.', ',') }} TND {{ saleTtcAfterPromo|number_format(3, '.', ',') }} TND {% else %} {{ saleTtc|number_format(3, '.', ',') }} TND {% endif %}
Disponible {{ totalStock - totalReserved }}
{% if promoActive %}
Remise -{{ productPromo.discountValue }}{{ productPromo.discountType == 'percent' ? '%' : ' TND' }}
{% endif %}
{% if not isCurrent %} Ouvrir {% endif %}
{% endfor %}