Преглед изворни кода

[Backend] Produits : stock dans liste

feature/export_comptable
Guillaume пре 4 година
родитељ
комит
b29c91fad0
1 измењених фајлова са 19 додато и 4 уклоњено
  1. +19
    -4
      ShopBundle/Resources/views/backend/default/list-fields/field_product_family_available_quantity.html.twig

+ 19
- 4
ShopBundle/Resources/views/backend/default/list-fields/field_product_family_available_quantity.html.twig Прегледај датотеку

@@ -1,7 +1,22 @@
{% if value is defined and value is not null %}
{% if item.getBehaviorPrice() == constant("Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE") %}
{{ value }} pièce{% if value > 1 %}s{% endif %}
{% elseif item.getBehaviorPrice() == constant("Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT") %}
{{ value }} {{ item.getUnit().getUnit() }}
{% if value > 0 %}
{% set badge_class = 'badge-success' %}
{% else %}
{% set badge_class = 'badge-danger' %}
{% endif %}
<span class="badge {{ badge_class }}">
{% if item.getBehaviorCountStock() == constant("Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE") %}
{{ value }} {{ item.getUnit().getUnit() }}
{% elseif item.getBehaviorCountStock() == constant("Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT_FAMILY") %}
{{ value }} pièce{% if value > 1 %}s{% endif %}
{% elseif item.getBehaviorCountStock() == constant("Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT") %}
{{ item.getAvailableQuantityInherited() }} pièce{% if value > 1 %}s{% endif %} (déclinaisons)
{% endif %}
</span>
{% else %}
{% if item.getBehaviorCountStock() == constant("Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_UNLIMITED") %}
<span class="badge badge-success">Illimité</span>
{% else %}
<span class="badge badge-danger">Pas de stock</span>
{% endif %}
{% endif %}

Loading…
Откажи
Сачувај