Browse Source

[Backend] User : correctif avoirs

develop
Guillaume 3 years ago
parent
commit
b2811bf31c
1 changed files with 21 additions and 18 deletions
  1. +21
    -18
      ShopBundle/Resources/views/backend/default/block/macros.html.twig

+ 21
- 18
ShopBundle/Resources/views/backend/default/block/macros.html.twig View File





{% macro list_reduction_credits(reductionCredits, user) %} {% macro list_reduction_credits(reductionCredits, user) %}
{% set merchant_current = merchantUtils.getMerchantCurrent() %}
<table class="table table-condensed"> <table class="table table-condensed">
<thead> <thead>
<tr> <tr>
</thead> </thead>
<tbody> <tbody>
{% for reductionCredit in reductionCredits %} {% for reductionCredit in reductionCredits %}
{% set isUsed = orderUtils.isReductionCreditUsed(reductionCredit, user) %}
<tr>
<td>{{ reductionCredit.title }}</td>
<td>
{{ reductionCredit.value|format_price(false) }}
</td>
<td>
{% include '@EasyAdmin/default/field_boolean.html.twig' with {value: reductionCredit.status} %}
</td>
<td>
{% include '@EasyAdmin/default/field_boolean.html.twig' with {value: isUsed} %}
</td>
<td>
{% if isUsed == false %}
{{ _self.button('ReductionCredit', 'edit', reductionCredit.id, 'primary') }}
{% endif %}
</td>
</tr>
{% if reductionCredit.getMerchant() == merchant_current %}
{% set isUsed = orderUtils.isReductionCreditUsed(reductionCredit, user) %}
<tr>
<td>{{ reductionCredit.title }}</td>
<td>
{{ reductionCredit.value|format_price(false) }}
</td>
<td>
{% include '@EasyAdmin/default/field_boolean.html.twig' with {value: reductionCredit.status} %}
</td>
<td>
{% include '@EasyAdmin/default/field_boolean.html.twig' with {value: isUsed} %}
</td>
<td>
{% if isUsed == false %}
{{ _self.button('ReductionCredit', 'edit', reductionCredit.id, 'primary') }}
{% endif %}
</td>
</tr>
{% endif %}
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>

Loading…
Cancel
Save