{ | { | ||||
$builder->add('activationDate', DateType::class, [ | $builder->add('activationDate', DateType::class, [ | ||||
'label' => 'Date d\'activation de votre bon cadeau', | |||||
'label' => 'Date d\'activation de votre bon cadeau :', | |||||
'widget'=> 'single_text', | 'widget'=> 'single_text', | ||||
'help'=> 'Date à partir de laquelle la personne pourra utiliser ce bon cadeau.' | 'help'=> 'Date à partir de laquelle la personne pourra utiliser ce bon cadeau.' | ||||
//'format'=> 'dd/MM/yyyy' | //'format'=> 'dd/MM/yyyy' | ||||
]) | ]) | ||||
->add('title', TextType::class, [ | ->add('title', TextType::class, [ | ||||
'label' => 'Message personnalisé affiché dans le bon cadeau', | |||||
'help'=> 'Exemple "Joyeux Noël Tonton ! "' | |||||
'label' => 'Message personnalisé affiché dans le bon cadeau :', | |||||
'help'=> 'Exemple "Joyeux Noël Tata Suzanne !"' | |||||
]) | ]) | ||||
->add('email', EmailType::class, [ | ->add('email', EmailType::class, [ | ||||
'label' => 'Email de la personne à qui vous souhaitez offrir ce bon cadeau' | |||||
'label' => 'Email de la personne à qui vous souhaitez offrir ce bon cadeau :', | |||||
'help'=> 'Le bon ne sera utilisable qu\'avec cet adresse e-mail' | |||||
]) | ]) | ||||
->add('ownerName', TextType::class,[ | ->add('ownerName', TextType::class,[ | ||||
'label' => 'Nom de la ou des personnes qui offrent ce bon cadeau', | |||||
'label' => 'Offert par :', | |||||
'help'=> 'Sera affiché dans le bon cadeau' | 'help'=> 'Sera affiché dans le bon cadeau' | ||||
]); | ]); | ||||
{% import '@LcShop/backend/productfamily/macros.html.twig' as macros %} | |||||
{{ macros.total_order_product_family(orderUtils.getTotalProductOrderedLastWeeks(item, 2, true)['total'], item, true) }} |
{% endmacro total_order_product %} | {% endmacro total_order_product %} | ||||
{% macro total_order_product_family(totalProductOrdered, productFamily) %} | |||||
{% macro total_order_product_family(totalProductOrdered, productFamily,forceByMeasure = false) %} | |||||
{% for weekNumber, weekNumberQuantity in totalProductOrdered %} | {% for weekNumber, weekNumberQuantity in totalProductOrdered %} | ||||
<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> | ||||
{{ weekNumberQuantity is null ? 0 : weekNumberQuantity}} | {{ weekNumberQuantity is null ? 0 : weekNumberQuantity}} | ||||
{% if productFamily and productFamily.behaviorCountStock== constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE') %} | |||||
{% if productFamily and (productFamily.behaviorCountStock== constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE') or forceByMeasure)%} | |||||
{{ productFamily.unit.unitReference }} | {{ productFamily.unit.unitReference }} | ||||
{% endif %} | {% endif %} | ||||
</strong> | </strong> | ||||
{{ _self.product_field(2, product.availableQuantityDefault, 'availableQuantityDefault',false, '', 'v-show="productFamily.behaviorCountStock== \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') ~ '\' && productFamily.behaviorStockWeek!= \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_STOCK_WEEK_NON_RENEWABLE') ~ '\'"') }} | {{ _self.product_field(2, product.availableQuantityDefault, 'availableQuantityDefault',false, '', 'v-show="productFamily.behaviorCountStock== \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') ~ '\' && productFamily.behaviorStockWeek!= \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_STOCK_WEEK_NON_RENEWABLE') ~ '\'"') }} | ||||
<td colspan="2" v-show="productFamily.behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') }}' || productFamily.behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE') }}'"> | |||||
<td colspan="2"> | |||||
{{ _self.total_order_product(totalProductOrdered) }} | {{ _self.total_order_product(totalProductOrdered) }} | ||||
<button v-on:click="emptyProductsField('availableQuantityDefault');" | <button v-on:click="emptyProductsField('availableQuantityDefault');" | ||||
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> | class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> | ||||
</th> | </th> | ||||
<th colspan="2" | |||||
v-show="behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') }}' || behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE') }}'"> | |||||
<th colspan="2"> | |||||
Semaine / Commandés | Semaine / Commandés | ||||
</th> | </th> | ||||
{#<th colspan="4" | {#<th colspan="4" | ||||
<th colspan="2" | <th colspan="2" | ||||
v-show="behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') }}' && behaviorStockWeek!= '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_STOCK_WEEK_NON_RENEWABLE') }}'"> | v-show="behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') }}' && behaviorStockWeek!= '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_STOCK_WEEK_NON_RENEWABLE') }}'"> | ||||
</th> | </th> | ||||
<th colspan="2" | |||||
v-show="behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') }}' || behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE') }}'"> | |||||
<th colspan="2"> | |||||
</th> | </th> | ||||
{#<th colspan="4" | {#<th colspan="4" | ||||
v-show="giftVoucherActive== true"> | v-show="giftVoucherActive== true"> |