浏览代码

[Backend] User : correctif avoirs

develop
Guillaume 3 年前
父节点
当前提交
b2811bf31c
共有 1 个文件被更改,包括 21 次插入18 次删除
  1. +21
    -18
      ShopBundle/Resources/views/backend/default/block/macros.html.twig

+ 21
- 18
ShopBundle/Resources/views/backend/default/block/macros.html.twig 查看文件

@@ -332,6 +332,7 @@


{% macro list_reduction_credits(reductionCredits, user) %}
{% set merchant_current = merchantUtils.getMerchantCurrent() %}
<table class="table table-condensed">
<thead>
<tr>
@@ -344,24 +345,26 @@
</thead>
<tbody>
{% 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 %}
</tbody>
</table>

正在加载...
取消
保存