Browse Source

Correctif affichage des stocks

develop
Guillaume 3 years ago
parent
commit
622be22935
1 changed files with 8 additions and 9 deletions
  1. +8
    -9
      ShopBundle/Resources/views/backend/productfamily/macros.html.twig

+ 8
- 9
ShopBundle/Resources/views/backend/productfamily/macros.html.twig View File

{% trans_default_domain 'lcshop' %} {% trans_default_domain 'lcshop' %}


{% macro product_sales_statistic(productsSalesStatistic, productFamily=false) %} {% macro product_sales_statistic(productsSalesStatistic, productFamily=false) %}
{% for weekNumber, weekNumberQuantity in productsSalesStatistic %}
{% for weekNumber, weekNumberQuantity in productsSalesStatistic|reverse(true) %}
<span class="text-success"><i class="fa fa-calendar"></i> {{ weekNumber }}</span> <span class="text-success"><i class="fa fa-calendar"></i> {{ weekNumber }}</span>
<span class="text-info"><i class="fa fa-shopping-basket"></i> <span class="text-info"><i class="fa fa-shopping-basket"></i>
<strong> <strong>
{% for weekNumber, weekNumberQuantity in productsSalesStatistic['data']['total_sales']['data']|reverse(true) %} {% for weekNumber, weekNumberQuantity in productsSalesStatistic['data']['total_sales']['data']|reverse(true) %}
<span class="text-success"><i class="fa fa-calendar"></i> {{ weekNumber }}</span> <span class="text-success"><i class="fa fa-calendar"></i> {{ weekNumber }}</span>
<span class="text-info"><i class="fa fa-shopping-basket"></i> <span class="text-info"><i class="fa fa-shopping-basket"></i>
<strong>
{{ weekNumberQuantity is null ? 0 : weekNumberQuantity }}
{% if productFamily and (productFamily.behaviorDisplaySale== constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_DISPLAY_SALE_BY_MEASURE')) %}
{{ productFamily.unit.unitReference }}
{% endif %}
</strong>
</span>
<strong>
{{ weekNumberQuantity is null ? 0 : weekNumberQuantity }}
{% if productFamily and (productFamily.behaviorDisplaySale== constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_DISPLAY_SALE_BY_MEASURE')) %}
{{ productFamily.unit.unitReference }}
{% endif %}
</strong>
</span>
<br/> <br/>
{% endfor %} {% endfor %}
</button> </button>
{% endif %} {% endif %}

{% endmacro product_family_sales_statistic %} {% endmacro product_family_sales_statistic %}





Loading…
Cancel
Save