|
|
|
|
|
|
|
|
{% import '@LcShop/backend/productfamily/macros.html.twig' as product_family_macros %} |
|
|
{% import '@LcShop/backend/productfamily/macros.html.twig' as product_family_macros %} |
|
|
{% trans_default_domain 'lcshop' %} |
|
|
{% trans_default_domain 'lcshop' %} |
|
|
|
|
|
|
|
|
{#{% import _self as formMacros %}#} |
|
|
|
|
|
|
|
|
{# {% import _self as formMacros %} #} |
|
|
<div class="row"> |
|
|
<div class="row"> |
|
|
{{ macros.startCard(12, 'ProductFamily.products', 'light', true) }} |
|
|
{{ macros.startCard(12, 'ProductFamily.products', 'light', true) }} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr> |
|
|
<tr> |
|
|
<th> |
|
|
<th> |
|
|
</th> |
|
|
</th> |
|
|
<th colspan="4" class="string"> |
|
|
|
|
|
|
|
|
<th colspan="4" class="string" v-show="productsQuantityAsTitle == false"> |
|
|
Titre |
|
|
Titre |
|
|
|
|
|
<button v-on:click="emptyProductsField('title');" |
|
|
|
|
|
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> |
|
|
</th> |
|
|
</th> |
|
|
<th colspan="2" class="string "> |
|
|
<th colspan="2" class="string "> |
|
|
Quantité |
|
|
Quantité |
|
|
|
|
|
<button v-on:click="emptyProductsField('quantity');" |
|
|
|
|
|
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> |
|
|
</th> |
|
|
</th> |
|
|
<th colspan="2" class="quantity"> |
|
|
<th colspan="2" class="quantity"> |
|
|
Unité |
|
|
Unité |
|
|
|
|
|
<button v-on:click="emptyProductsField('unit');" |
|
|
|
|
|
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> |
|
|
</th> |
|
|
</th> |
|
|
<th v-show="getBehaviorPrice() == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'" |
|
|
<th v-show="getBehaviorPrice() == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'" |
|
|
colspan="3" class="buyingPriceByRefUnit "> |
|
|
colspan="3" class="buyingPriceByRefUnit "> |
|
|
PA HT / ${ getUnitReference() } |
|
|
PA HT / ${ getUnitReference() } |
|
|
|
|
|
<button v-on:click="emptyProductsField('buyingPriceByRefUnit');" |
|
|
|
|
|
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> |
|
|
</th> |
|
|
</th> |
|
|
<th v-show="getBehaviorPrice() == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'" |
|
|
<th v-show="getBehaviorPrice() == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'" |
|
|
colspan="3" class="priceByRefUnit"> |
|
|
colspan="3" class="priceByRefUnit"> |
|
|
PA TTC / ${ getUnitReference() } |
|
|
PA TTC / ${ getUnitReference() } |
|
|
|
|
|
<button v-on:click="emptyProductsField('buyingPriceByRefUnitWithTax');" |
|
|
|
|
|
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> |
|
|
</th> |
|
|
</th> |
|
|
|
|
|
|
|
|
<th colspan="3" class="price main-info"> |
|
|
<th colspan="3" class="price main-info"> |
|
|
PA HT |
|
|
PA HT |
|
|
|
|
|
<button v-show="productFamily.behaviorPrice == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'" v-on:click="emptyProductsField('buyingPrice');" |
|
|
|
|
|
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> |
|
|
</th> |
|
|
</th> |
|
|
<th colspan="3" class="price" |
|
|
<th colspan="3" class="price" |
|
|
v-show="getBehaviorPrice() =='{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'"> |
|
|
v-show="getBehaviorPrice() =='{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'"> |
|
|
PA TTC |
|
|
PA TTC |
|
|
|
|
|
<button v-on:click="emptyProductsField('buyingPriceWithTax');" |
|
|
|
|
|
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> |
|
|
</th> |
|
|
</th> |
|
|
<th colspan="3" class="main-info"> |
|
|
<th colspan="3" class="main-info"> |
|
|
Coef |
|
|
Coef |
|
|
|
|
|
<button v-on:click="emptyProductsField('multiplyingFactor');" |
|
|
|
|
|
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> |
|
|
</th> |
|
|
</th> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<th v-show="getBehaviorPrice() == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'" |
|
|
<th v-show="getBehaviorPrice() == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'" |
|
|
colspan="3" class=""> |
|
|
colspan="3" class=""> |
|
|
PV HT / ${ getUnitReference() } |
|
|
PV HT / ${ getUnitReference() } |
|
|
|
|
|
<button v-on:click="emptyProductsField('priceByRefUnit');" |
|
|
|
|
|
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> |
|
|
</th> |
|
|
</th> |
|
|
<th v-show="getBehaviorPrice() == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'" |
|
|
<th v-show="getBehaviorPrice() == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'" |
|
|
colspan="3" class="price"> |
|
|
colspan="3" class="price"> |
|
|
PV TTC / ${ getUnitReference() } |
|
|
PV TTC / ${ getUnitReference() } |
|
|
|
|
|
<button v-on:click="emptyProductsField('priceByRefUnitWithTax');" |
|
|
|
|
|
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> |
|
|
</th> |
|
|
</th> |
|
|
|
|
|
|
|
|
<th colspan="3" class="price"> |
|
|
<th colspan="3" class="price"> |
|
|
{# v-show="getBehaviorPrice() =='{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'">#} |
|
|
|
|
|
|
|
|
{# v-show="getBehaviorPrice() =='{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'"> #} |
|
|
PV HT |
|
|
PV HT |
|
|
|
|
|
<button v-show="productFamily.behaviorPrice == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'" v-on:click="emptyProductsField('price');" |
|
|
|
|
|
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> |
|
|
</th> |
|
|
</th> |
|
|
<th colspan="3" class="price main-info"> |
|
|
<th colspan="3" class="price main-info"> |
|
|
PV TTC |
|
|
PV TTC |
|
|
|
|
|
<button v-show="productFamily.behaviorPrice == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'" v-on:click="emptyProductsField('priceWithTax');" |
|
|
|
|
|
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> |
|
|
</th> |
|
|
</th> |
|
|
<th colspan="2"> |
|
|
<th colspan="2"> |
|
|
Marge HT |
|
|
Marge HT |
|
|
|
|
|
|
|
|
<th colspan="2" class="" |
|
|
<th colspan="2" class="" |
|
|
v-show="behaviorExpirationDate== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_EXPIRATION_DATE_BY_PRODUCT') }}'"> |
|
|
v-show="behaviorExpirationDate== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_EXPIRATION_DATE_BY_PRODUCT') }}'"> |
|
|
<span style="text-transform: uppercase"> ${typeExpirationDate}</span> |
|
|
<span style="text-transform: uppercase"> ${typeExpirationDate}</span> |
|
|
|
|
|
<button v-on:click="emptyProductsField('propertyExpirationDate');" |
|
|
|
|
|
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> |
|
|
</th> |
|
|
</th> |
|
|
<th colspan="2" |
|
|
<th colspan="2" |
|
|
v-show="behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') }}'"> |
|
|
v-show="behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') }}'"> |
|
|
Stock |
|
|
Stock |
|
|
|
|
|
<button v-on:click="emptyProductsField('availableQuantity');" |
|
|
|
|
|
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> |
|
|
</th> |
|
|
</th> |
|
|
<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') }}'"> |
|
|
Stock par défaut |
|
|
Stock par défaut |
|
|
|
|
|
<button v-on:click="emptyProductsField('availableQuantityDefault');" |
|
|
|
|
|
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> |
|
|
</th> |
|
|
</th> |
|
|
<th colspan="2" |
|
|
<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') }}'"> |
|
|
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> |
|
|
<th> |
|
|
Rappel |
|
|
Rappel |
|
|
</th> |
|
|
</th> |
|
|
<th colspan="4" class="string"> |
|
|
|
|
|
|
|
|
<th colspan="4" class="string" v-show="productsQuantityAsTitle == false"> |
|
|
${title} |
|
|
${title} |
|
|
|
|
|
|
|
|
</th> |
|
|
</th> |
|
|
<th colspan="2" class="string "> |
|
|
<th colspan="2" class="string "> |
|
|
${productFamily.quantity} |
|
|
${productFamily.quantity} |
|
|
|
|
|
|
|
|
</th> |
|
|
</th> |
|
|
|
|
|
|
|
|
<th colspan="3" class="price"> |
|
|
<th colspan="3" class="price"> |
|
|
{# v-show="getBehaviorPrice() =='{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'">#} |
|
|
|
|
|
|
|
|
{# v-show="getBehaviorPrice() =='{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'"> #} |
|
|
${productFamily.price} |
|
|
${productFamily.price} |
|
|
</th> |
|
|
</th> |
|
|
<th colspan="3" class="price main-info"> |
|
|
<th colspan="3" class="price main-info"> |
|
|
|
|
|
|
|
|
</tfoot> |
|
|
</tfoot> |
|
|
</table> |
|
|
</table> |
|
|
|
|
|
|
|
|
<button type="button" class="add_tag_link btn-add-product btn btn-default" @click="addProductForm"><span |
|
|
|
|
|
class="fa fa-plus"></span> Ajouter une déclinaison |
|
|
|
|
|
</button> |
|
|
|
|
|
<p> |
|
|
|
|
|
<strong>Aide à l'utilisation - Raccourci clavier</strong> |
|
|
|
|
|
<ul> |
|
|
|
|
|
<li><strong>TAB</strong> : Champ suivant</li> |
|
|
|
|
|
<li><strong>SHIFT + TAB</strong> : Champ précédent</li> |
|
|
|
|
|
<li><strong>FLÈCHE BAS</strong> : Déclinaison suivante</li> |
|
|
|
|
|
<li><strong>FLÈCHE HAUT</strong> : Déclinaison précédente</li> |
|
|
|
|
|
<li><strong>SHIFT + [+]</strong> : Ajout d'une nouvelle déclinaison</li> |
|
|
|
|
|
</ul> |
|
|
|
|
|
</p> |
|
|
|
|
|
|
|
|
|
|
|
<div class="clearfix"></div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="col-12"> |
|
|
|
|
|
<button type="button" class="add_tag_link btn-add-product btn btn-default" @click="addProductForm"><span |
|
|
|
|
|
class="fa fa-plus"></span> Ajouter une déclinaison |
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
|
|
|
|
{{ form_row(form.productsQuantityAsTitle, {"attr":{'v-model' : 'productsQuantityAsTitle'}}) }} |
|
|
|
|
|
<p> |
|
|
|
|
|
<strong>Aide à l'utilisation - Raccourci clavier</strong> |
|
|
|
|
|
<ul> |
|
|
|
|
|
<li><strong>TAB</strong> : Champ suivant</li> |
|
|
|
|
|
<li><strong>SHIFT + TAB</strong> : Champ précédent</li> |
|
|
|
|
|
<li><strong>FLÈCHE BAS</strong> : Déclinaison suivante</li> |
|
|
|
|
|
<li><strong>FLÈCHE HAUT</strong> : Déclinaison précédente</li> |
|
|
|
|
|
<li><strong>SHIFT + [+]</strong> : Ajout d'une nouvelle déclinaison</li> |
|
|
|
|
|
</ul> |
|
|
|
|
|
</p> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="clearfix"></div> |
|
|
|
|
|
|
|
|
{{ macros.endCard() }} |
|
|
{{ macros.endCard() }} |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
{% for keyForm,i in sortableProductsField %} |
|
|
{% for keyForm,i in sortableProductsField %} |
|
|
{% set product = form.products[i] %} |
|
|
{% set product = form.products[i] %} |
|
|
|
|
|
|
|
|
{#{% if product.vars.value.status >= 0 and (product.vars.value.originProduct is null or product.vars.value.originProduct == false) %}#} |
|
|
|
|
|
|
|
|
{# {% if product.vars.value.status >= 0 and (product.vars.value.originProduct is null or product.vars.value.originProduct == false) %} #} |
|
|
window.productForm[{{ keyForm }}] = { |
|
|
window.productForm[{{ keyForm }}] = { |
|
|
{% if product.vars.value.originProduct is defined %}originProduct: parseInt({{ product.vars.value.originProduct }}),{% endif %} |
|
|
{% if product.vars.value.originProduct is defined %}originProduct: parseInt({{ product.vars.value.originProduct }}),{% endif %} |
|
|
{% if product.vars.value.status is defined %}status: parseInt({{ product.vars.value.status }}),{% endif %} |
|
|
{% if product.vars.value.status is defined %}status: parseInt({{ product.vars.value.status }}),{% endif %} |
|
|
|
|
|
|
|
|
{% if product.vars.value.availableQuantity %}availableQuantity: parseInt({{ product.vars.value.availableQuantity }}),{% endif %} |
|
|
{% if product.vars.value.availableQuantity %}availableQuantity: parseInt({{ product.vars.value.availableQuantity }}),{% endif %} |
|
|
{% if product.vars.value.availableQuantityDefault %}availableQuantityDefault: parseInt({{ product.vars.value.availableQuantityDefault }}),{% endif %} |
|
|
{% if product.vars.value.availableQuantityDefault %}availableQuantityDefault: parseInt({{ product.vars.value.availableQuantityDefault }}),{% endif %} |
|
|
{% if product.vars.value.propertyExpirationDate %}propertyExpirationDate: "{{ product.vars.value.propertyExpirationDate }}",{% endif %} |
|
|
{% if product.vars.value.propertyExpirationDate %}propertyExpirationDate: "{{ product.vars.value.propertyExpirationDate }}",{% endif %} |
|
|
{#{% if product.vars.value.expirationDate %}expirationDate: "{{ product.vars.value.expirationDate|date('d/m/Y') }}"{% endif %}#} |
|
|
|
|
|
|
|
|
{# {% if product.vars.value.expirationDate %}expirationDate: "{{ product.vars.value.expirationDate|date('d/m/Y') }}"{% endif %} #} |
|
|
}; |
|
|
}; |
|
|
window.formProductTemplate[{{ keyForm }}] = '{{ product_family_macros.product_row(product, totalProductOrdered[product.vars.value.id])|replace({"\n":' ', "\r":' ', "'" : "\\'"})|raw }}'; |
|
|
window.formProductTemplate[{{ keyForm }}] = '{{ product_family_macros.product_row(product, totalProductOrdered[product.vars.value.id])|replace({"\n":' ', "\r":' ', "'" : "\\'"})|raw }}'; |
|
|
{#{% endif %}#} |
|
|
|
|
|
|
|
|
{# {% endif %} #} |
|
|
{% endfor %} |
|
|
{% endfor %} |
|
|
|
|
|
|
|
|
</script> |
|
|
</script> |