|
- {% extends '@LcCaracole/admin/product/macro/product_family_macro.html.twig' %}
-
- {% macro product_family_sales_statistic(productsSalesStatistic, productFamily) %}
- {% if productsSalesStatistic and productsSalesStatistic|length %}
- <button type="button" data-product-family="{{ productFamily.id }}"
- class="lc-show-products-sales-statistic btn btn-sm"
- data-toggle="tooltip" title="{{ 'showHistorySales'|sov_trans_admin_action }}"
- data-url="{{ ea_url({crudAction : 'showSalesStatistic', entityId: productFamily.id }) }}">
- {% for key, weekNumberQuantity in productsSalesStatistic['data']['total_sales']['data'] %}
- <span class="text-success">
- <i class="fa fa-calendar"></i>
- {{ productsSalesStatistic['label'][key] }}</span>
- <span class="text-info"><i class="fa fa-shopping-basket"></i>
- <strong>
- {{ weekNumberQuantity is null ? 0 : weekNumberQuantity }}
- {% if productFamily and (productFamily.behaviorDisplaySale== constant('App\\Entity\\Product\\ProductFamily::BEHAVIOR_DISPLAY_SALE_BY_MEASURE')) %}
- {{ productFamily.unit.unitReference }}
- {% endif %}
- </strong>
- </span>
- <br/>
- {% endfor %}
- </button>
- {% endif %}
- {% endmacro product_family_sales_statistic %}
-
- {% macro autoresize_field(field) %}
- <tr>
- <td>{{ form_label(field) }}</td>
- <td>
- <div class="autoresize">
- {{ form_widget(field, {'attr' : {rows : '1'}}) }}
- </div>
- </td>
- </tr>
- {% endmacro autoresize_field %}
|