Browse Source

Correctifs pages produits

feature/export_comptable
Fab 4 years ago
parent
commit
9984e80718
12 changed files with 268 additions and 105 deletions
  1. +28
    -16
      ShopBundle/Controller/Backend/ProductFamilyController.php
  2. +6
    -0
      ShopBundle/Form/Backend/ProductFamily/ProductType.php
  3. +27
    -2
      ShopBundle/Model/ProductFamily.php
  4. +3
    -2
      ShopBundle/Resources/public/css/backend/custom.css
  5. +89
    -31
      ShopBundle/Resources/public/js/backend/script/productfamily/vuejs-product-family.js
  6. +5
    -0
      ShopBundle/Resources/translations/lcshop.fr.yaml
  7. +10
    -10
      ShopBundle/Resources/views/backend/default/block/macros.html.twig
  8. +3
    -1
      ShopBundle/Resources/views/backend/productfamily/form.html.twig
  9. +1
    -0
      ShopBundle/Resources/views/backend/productfamily/panel_price.html.twig
  10. +74
    -41
      ShopBundle/Resources/views/backend/productfamily/panel_products.html.twig
  11. +14
    -0
      ShopBundle/Resources/views/backend/productfamily/panel_seo.html.twig
  12. +8
    -2
      ShopBundle/Resources/views/backend/productfamily/panel_stock.html.twig

+ 28
- 16
ShopBundle/Controller/Backend/ProductFamilyController.php View File



$formBuilder->add('warningMessageType', ChoiceType::class, array( $formBuilder->add('warningMessageType', ChoiceType::class, array(
'choices' => array( 'choices' => array(
'field.default.warningMessageTypeOptions.success' => 'success',
'field.default.warningMessageTypeOptions.error' => 'error',
'field.default.warningMessageTypeOptions.warning' => 'warning',
'field.default.warningMessageTypeOptions.info' => 'info'
'field.default.warningMessageTypeOptions.'.ProductFamily::WARNING_MESSAGE_TYPE_SUCCESS => ProductFamily::WARNING_MESSAGE_TYPE_SUCCESS,
'field.default.warningMessageTypeOptions.'.ProductFamily::WARNING_MESSAGE_TYPE_ERROR => ProductFamily::WARNING_MESSAGE_TYPE_ERROR,
'field.default.warningMessageTypeOptions.'.ProductFamily::WARNING_MESSAGE_TYPE_WARNING => ProductFamily::WARNING_MESSAGE_TYPE_WARNING,
'field.default.warningMessageTypeOptions.'.ProductFamily::WARNING_MESSAGE_TYPE_INFO => ProductFamily::WARNING_MESSAGE_TYPE_INFO
), ),
'translation_domain' => 'lcshop', 'translation_domain' => 'lcshop',
'multiple' => false, 'multiple' => false,
$formBuilder->add('behaviorAddToCart', ChoiceType::class, array( $formBuilder->add('behaviorAddToCart', ChoiceType::class, array(
'data' => $entity->getBehaviorAddToCart() ? $entity->getBehaviorAddToCart() : 'simple', 'data' => $entity->getBehaviorAddToCart() ? $entity->getBehaviorAddToCart() : 'simple',
'choices' => array( 'choices' => array(
'field.ProductFamily.behaviorAddToCartOptions.simple' => 'simple',
'field.ProductFamily.behaviorAddToCartOptions.multiple' => 'multiple'
'field.ProductFamily.behaviorAddToCartOptions.'.ProductFamily::BEHAVIOR_ADD_TO_CART_SIMPLE => ProductFamily::BEHAVIOR_ADD_TO_CART_SIMPLE,
'field.ProductFamily.behaviorAddToCartOptions.'.ProductFamily::BEHAVIOR_ADD_TO_CART_MULTIPLE => ProductFamily::BEHAVIOR_ADD_TO_CART_MULTIPLE
), ),
'translation_domain' => 'lcshop', 'translation_domain' => 'lcshop',
'multiple' => false, 'multiple' => false,
$formBuilder->add('behaviorPrice', ChoiceType::class, array( $formBuilder->add('behaviorPrice', ChoiceType::class, array(
'empty_data' => 'by-piece', 'empty_data' => 'by-piece',
'choices' => array( 'choices' => array(
'field.ProductFamily.behaviorPriceOptions.byPiece' => 'by-piece',
'field.ProductFamily.behaviorPriceOptions.byRefUnit' => 'by-reference-unit'
'field.ProductFamily.behaviorPriceOptions.'.ProductFamily::BEHAVIOR_PRICE_BY_PIECE => ProductFamily::BEHAVIOR_PRICE_BY_PIECE,
'field.ProductFamily.behaviorPriceOptions.'.ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT => ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT
), ),
'translation_domain' => 'lcshop', 'translation_domain' => 'lcshop',
'multiple' => false, 'multiple' => false,


$formBuilder->add('propertyOrganicLabel', ChoiceType::class, array( $formBuilder->add('propertyOrganicLabel', ChoiceType::class, array(
'choices' => array( 'choices' => array(
'field.ProductFamily.organicLabelOptions.ab' => 'ab',
'field.ProductFamily.organicLabelOptions.natureProgres' => 'nature-progres',
'field.ProductFamily.organicLabelOptions.hVE' => 'hve'
'field.ProductFamily.organicLabelOptions.'.ProductFamily::PROPERTY_ORGANIC_LABEL_AB => ProductFamily::PROPERTY_ORGANIC_LABEL_AB,
'field.ProductFamily.organicLabelOptions.'.ProductFamily::PROPERTY_ORGANIC_LABEL_NP => ProductFamily::PROPERTY_ORGANIC_LABEL_NP,
'field.ProductFamily.organicLabelOptions.'.ProductFamily::PROPERTY_ORGANIC_LABEL_HVE => ProductFamily::PROPERTY_ORGANIC_LABEL_HVE
), ),
'translation_domain' => 'lcshop', 'translation_domain' => 'lcshop',
'multiple' => false, 'multiple' => false,


$formBuilder->add('typeExpirationDate', ChoiceType::class, array( $formBuilder->add('typeExpirationDate', ChoiceType::class, array(
'choices' => array( 'choices' => array(
'field.default.dlc' => 'dlc',
'field.default.ddm' => 'ddm',
'field.default.dluo' => 'dluo'
'field.default.'.ProductFamily::TYPE_EXPIRATION_DATE_DLC => ProductFamily::TYPE_EXPIRATION_DATE_DLC,
'field.default.'.ProductFamily::TYPE_EXPIRATION_DATE_DDM => ProductFamily::TYPE_EXPIRATION_DATE_DDM,
'field.default.'.ProductFamily::TYPE_EXPIRATION_DATE_DLUO => ProductFamily::TYPE_EXPIRATION_DATE_DLUO
), ),
'translation_domain' => 'lcshop', 'translation_domain' => 'lcshop',
'multiple' => false, 'multiple' => false,
'required'=>false 'required'=>false
)); ));


$formBuilder->add('behaviorStockWeek', ChoiceType::class, array(
'choices' => array(
'field.ProductFamily.behaviorStockWeekOptions.'.ProductFamily::BEHAVIOR_STOCK_WEEK_RENEWABLE => ProductFamily::BEHAVIOR_STOCK_WEEK_RENEWABLE,
'field.ProductFamily.behaviorStockWeekOptions.'.ProductFamily::BEHAVIOR_STOCK_WEEK_RENEWABLE_VALIDATION => ProductFamily::BEHAVIOR_STOCK_WEEK_RENEWABLE_VALIDATION,
'field.ProductFamily.behaviorStockWeekOptions.'.ProductFamily::BEHAVIOR_STOCK_WEEK_NON_RENEWABLE => ProductFamily::BEHAVIOR_STOCK_WEEK_NON_RENEWABLE
),
'translation_domain' => 'lcshop',
'multiple' => false,
'expanded' => true,
'required'=>true
));

$formBuilder->add('behaviorExpirationDate', ChoiceType::class, array( $formBuilder->add('behaviorExpirationDate', ChoiceType::class, array(
'choices' => array( 'choices' => array(
'field.ProductFamily.behaviorExpirationDateOptions.productFamily' => 'by-product-family',
'field.ProductFamily.behaviorExpirationDateOptions.product' => 'by-product'
'field.ProductFamily.behaviorExpirationDateOptions.'.ProductFamily::BEHAVIOR_EXPIRATION_DATE_BY_PRODUCT_FAMILY => ProductFamily::BEHAVIOR_EXPIRATION_DATE_BY_PRODUCT_FAMILY,
'field.ProductFamily.behaviorExpirationDateOptions.'.ProductFamily::BEHAVIOR_EXPIRATION_DATE_BY_PRODUCT => ProductFamily::BEHAVIOR_EXPIRATION_DATE_BY_PRODUCT
), ),
'translation_domain' => 'lcshop', 'translation_domain' => 'lcshop',
'multiple' => false, 'multiple' => false,

+ 6
- 0
ShopBundle/Form/Backend/ProductFamily/ProductType.php View File

)); ));


$builder->add('position', HiddenType::class); $builder->add('position', HiddenType::class);
$builder->add('exportTitle', TextType::class, array(
'required' =>false
));
$builder->add('exportNote', TextType::class, array(
'required' =>false
));


} }



+ 27
- 2
ShopBundle/Model/ProductFamily.php View File



abstract class ProductFamily extends AbstractDocumentEntity implements ProductPropertyInterface, PriceInterface, FilterMerchantInterface abstract class ProductFamily extends AbstractDocumentEntity implements ProductPropertyInterface, PriceInterface, FilterMerchantInterface
{ {

use ProductPropertyTrait;

const BEHAVIOR_COUNT_STOCK_UNLIMITED = 'unlimited' ; const BEHAVIOR_COUNT_STOCK_UNLIMITED = 'unlimited' ;
const BEHAVIOR_COUNT_STOCK_BY_MEASURE = 'by-measure' ; const BEHAVIOR_COUNT_STOCK_BY_MEASURE = 'by-measure' ;
const BEHAVIOR_COUNT_STOCK_BY_PRODUCT_FAMILY = 'by-product-family' ; const BEHAVIOR_COUNT_STOCK_BY_PRODUCT_FAMILY = 'by-product-family' ;
const BEHAVIOR_COUNT_STOCK_BY_PRODUCT = 'by-product' ; const BEHAVIOR_COUNT_STOCK_BY_PRODUCT = 'by-product' ;
const TYPE_CREDIT = 'credit' ;


use ProductPropertyTrait;
const BEHAVIOR_STOCK_WEEK_RENEWABLE = 'renewable';
const BEHAVIOR_STOCK_WEEK_RENEWABLE_VALIDATION = 'renewable-with-validation';
const BEHAVIOR_STOCK_WEEK_NON_RENEWABLE = 'non-renewable';

const WARNING_MESSAGE_TYPE_SUCCESS = 'success';
const WARNING_MESSAGE_TYPE_ERROR = 'error';
const WARNING_MESSAGE_TYPE_WARNING = 'warning';
const WARNING_MESSAGE_TYPE_INFO = 'info';

const BEHAVIOR_ADD_TO_CART_SIMPLE = 'simple';
const BEHAVIOR_ADD_TO_CART_MULTIPLE = 'multiple';

const BEHAVIOR_PRICE_BY_PIECE = 'by-piece';
const BEHAVIOR_PRICE_BY_REFERENCE_UNIT = 'by-reference-unit';

const PROPERTY_ORGANIC_LABEL_AB = 'ab';
const PROPERTY_ORGANIC_LABEL_NP = 'nature-progres';
const PROPERTY_ORGANIC_LABEL_HVE = 'hve';

const TYPE_EXPIRATION_DATE_DLC = 'dlc';
const TYPE_EXPIRATION_DATE_DDM = 'ddm';
const TYPE_EXPIRATION_DATE_DLUO = 'dluo';


const BEHAVIOR_EXPIRATION_DATE_BY_PRODUCT_FAMILY = 'by-product-family';
const BEHAVIOR_EXPIRATION_DATE_BY_PRODUCT = 'by-product';


//Champ hydraté par ProductFamilyUtils //Champ hydraté par ProductFamilyUtils
protected $reductionCatalog; protected $reductionCatalog;

+ 3
- 2
ShopBundle/Resources/public/css/backend/custom.css View File

#lc-product-family-edit .products-collection-table th span {white-space: initial;} #lc-product-family-edit .products-collection-table th span {white-space: initial;}
#lc-product-family-edit .products-collection-table th:last-child{border-right: 1px solid #dee2e6;} #lc-product-family-edit .products-collection-table th:last-child{border-right: 1px solid #dee2e6;}
#lc-product-family-edit .products-collection-table td{border-left: 1px solid #dee2e6; text-align: center; font-size: 13px;} #lc-product-family-edit .products-collection-table td{border-left: 1px solid #dee2e6; text-align: center; font-size: 13px;}
#lc-product-family-edit .products-collection-table td:last-child{border-right: 1px solid #dee2e6;}
#lc-product-family-edit .products-collection-table td:last-child{border-right: 1px solid #dee2e6; white-space: nowrap; }
#lc-product-family-edit .btn-add-product {margin: 20px 0; float: right;} #lc-product-family-edit .btn-add-product {margin: 20px 0; float: right;}
#lc-product-family-edit .inherited {color: #888; font-style: italic; font-weight: initial;} #lc-product-family-edit .inherited {color: #888; font-style: italic; font-weight: initial;}
#lc-product-family-edit .products-collection-table td .value {min-width: 80%; margin: auto; min-height: 20px; cursor: pointer;}
#lc-product-family-edit .products-collection-table td .value {min-width: 80%; margin: auto; min-height: 35px; cursor: pointer;}
#lc-product-family-edit .products-collection-table td .modal {text-align: left;}


/* DeliveryZone */ /* DeliveryZone */



+ 89
- 31
ShopBundle/Resources/public/js/backend/script/productfamily/vuejs-product-family.js View File

buyingPriceWithTaxValue: function () { buyingPriceWithTaxValue: function () {
return this.buyingPriceWithTax; return this.buyingPriceWithTax;
}, },
buyingPriceByRefUnitValue:function(){
buyingPriceByRefUnitValue: function () {
return this.buyingPriceByRefUnit; return this.buyingPriceByRefUnit;
}, },
buyingPriceByRefUnitWithTaxValue:function(){
buyingPriceByRefUnitWithTaxValue: function () {
return this.buyingPriceByRefUnitWithTax; return this.buyingPriceByRefUnitWithTax;
}, },
multiplyingFactorValue:function(){
multiplyingFactorValue: function () {
return this.multiplyingFactor; return this.multiplyingFactor;
}, },
priceWithTaxValue: function () { priceWithTaxValue: function () {
priceValue: function () { priceValue: function () {
return this.price; return this.price;
}, },
priceByRefUnitValue:function(){
priceByRefUnitValue: function () {
return this.priceByRefUnit; return this.priceByRefUnit;
}, },
priceByRefUnitWithTaxValue:function(){
priceByRefUnitWithTaxValue: function () {
return this.priceByRefUnitWithTax; return this.priceByRefUnitWithTax;
}, },
quantityValue: function () { quantityValue: function () {
unitValue: function () { unitValue: function () {
return this.unit; return this.unit;
}, },
behaviorPriceValue:function(){
behaviorPriceValue: function () {
return this.behaviorPrice; return this.behaviorPrice;
}, },
taxRateValue: function () { taxRateValue: function () {
this.setBuyingPriceWithTax(); this.setBuyingPriceWithTax();
this.setBuyingPriceByRefUnitWithTax(); this.setBuyingPriceByRefUnitWithTax();
}, },
differentSupplierTaxRate:function(){
differentSupplierTaxRate: function () {
this.supplierTaxRate = null; this.supplierTaxRate = null;
}, },
activeProducts:function () {
activeProducts: function () {
this.$parent.updateActiveProducts(); this.$parent.updateActiveProducts();
}, },
behaviorPrice:function () {
if(this.behaviorPrice == 'by-reference-unit'){
behaviorPrice: function () {
if (this.behaviorPrice == 'by-reference-unit') {
this.quantity = 1; this.quantity = 1;
} }
} }
if (this.buyingPriceWithTax) return this.buyingPriceWithTax; if (this.buyingPriceWithTax) return this.buyingPriceWithTax;
else return this.productFamily.buyingPriceWithTax; else return this.productFamily.buyingPriceWithTax;
}, },
buyingPriceByRefUnitValue:function(){
buyingPriceByRefUnitValue: function () {
if (this.buyingPriceByRefUnit) return this.buyingPriceByRefUnit; if (this.buyingPriceByRefUnit) return this.buyingPriceByRefUnit;
else return this.productFamily.buyingPriceByRefUnit; else return this.productFamily.buyingPriceByRefUnit;
}, },
buyingPriceByRefUnitWithTaxValue:function(){
buyingPriceByRefUnitWithTaxValue: function () {
if (this.buyingPriceByRefUnitWithTax) return this.buyingPriceByRefUnitWithTax; if (this.buyingPriceByRefUnitWithTax) return this.buyingPriceByRefUnitWithTax;
else return this.productFamily.buyingPriceByRefUnitWithTax; else return this.productFamily.buyingPriceByRefUnitWithTax;
}, },
multiplyingFactorValue:function(){
multiplyingFactorValue: function () {
if (this.multiplyingFactor) return this.multiplyingFactor; if (this.multiplyingFactor) return this.multiplyingFactor;
else return this.productFamily.multiplyingFactor; else return this.productFamily.multiplyingFactor;
}, },
if (this.price) return this.price; if (this.price) return this.price;
else return this.productFamily.price; else return this.productFamily.price;
}, },
priceByRefUnitValue:function(){
priceByRefUnitValue: function () {
if (this.priceByRefUnit) return this.priceByRefUnit; if (this.priceByRefUnit) return this.priceByRefUnit;
else return this.productFamily.priceByRefUnit; else return this.productFamily.priceByRefUnit;
}, },
priceByRefUnitWithTaxValue:function(){
priceByRefUnitWithTaxValue: function () {
if (this.priceByRefUnitWithTax) return this.priceByRefUnitWithTax; if (this.priceByRefUnitWithTax) return this.priceByRefUnitWithTax;
else return this.productFamily.priceByRefUnitWithTax; else return this.productFamily.priceByRefUnitWithTax;
}, },
if (this.propertyExpirationDate) return this.propertyExpirationDate; if (this.propertyExpirationDate) return this.propertyExpirationDate;
else return this.productFamily.propertyExpirationDate; else return this.productFamily.propertyExpirationDate;
}, },
behaviorPriceValue:function(){
behaviorPriceValue: function () {
return this.productFamily.behaviorPrice; return this.productFamily.behaviorPrice;
}, },
finalPriceWithTax:function () {
return getPriceWithTax(parseFloat((this.priceByRefUnitValue * this.quantityValue) / this.unitCoefficient).toFixed(4), this.taxRateValue);
finalPriceWithTax: function () {
return getPriceWithTax(parseFloat((this.priceByRefUnitValue * this.quantityValue) / this.unitCoefficient).toFixed(4), this.taxRateValue);
} }
}, },
data() { data() {
buyingPriceWithTaxInherited: false, buyingPriceWithTaxInherited: false,
buyingPriceByRefUnitInherited: false, buyingPriceByRefUnitInherited: false,
buyingPriceByRefUnitWithTaxInherited: false, buyingPriceByRefUnitWithTaxInherited: false,
priceByRefUnitInherited:false,
priceByRefUnitWithTaxInherited:false,
priceByRefUnitInherited: false,
priceByRefUnitWithTaxInherited: false,
expirationDateInherited: false, expirationDateInherited: false,
availableQuantityInherited: false, availableQuantityInherited: false,
availableQuantityDefaultInherited: false, availableQuantityDefaultInherited: false,
}, window.productForm[this.keyForm]) }, window.productForm[this.keyForm])
}, },
mounted: function () { mounted: function () {
//INIT VAR
//INIT VAR
updateSortableProducts(); updateSortableProducts();
//this.setUnitSelect2(); //this.setUnitSelect2();
var app = this;

$(this.$el).find('input, select').on('keydown', function (e) {
if (e.keyCode == 13 || e.keyCode == 9) e.preventDefault();

//GAUCHE
if (e.shiftKey && e.keyCode == 9) {
e.preventDefault();
$prevField = $(this).parents('td').prevAll('td:visible').first().find('input, select');
app.setFocusOnField($prevField.data('ref'), $prevField.data('y'));

} else if (e.keyCode == '9') {
e.preventDefault();
$nextField = $(this).parents('td').nextAll('td:visible').first().find('input, select');
app.setFocusOnField($nextField.data('ref'), $nextField.data('y'));
}

//BAS
if (e.keyCode == '40') {
y = parseInt($(this).data('y')) + 1;
if (y >= app.$parent.$refs['productForm'].length) y = 0;
app.$parent.$refs['productForm'][y].setFocusOnField($(this).data('ref'), y);
}
//HAUT
if (e.keyCode == '38') {
y = parseInt($(this).data('y')) - 1;
if (y == -1) y = app.$parent.$refs['productForm'].length - 1;
app.$parent.$refs['productForm'][y].setFocusOnField($(this).data('ref'), y);
}

});




//METHOD //METHOD
//this.updateProductView(); //this.updateProductView();
}, },
methods: { methods: {
setUnitSelect2:function(){
setFocusOnField: function (field, y) {
this[field] = true;
this.$nextTick(function () {
log(field);
if (field == 'unitInherited') {
$('select[data-ref="' + field + '"]').eq(y).focus();
} else {
$('input[data-ref="' + field + '"]').eq(y).focus();

}
});

},
setUnitSelect2: function () {
$(this.$el).find('select').each(function (i, select) { $(this.$el).find('select').each(function (i, select) {
setSelect2($(select)); setSelect2($(select));
}); });
}, },
titleUpdated:function(){},
availableQuantityUpdated:function(){},
availableQuantityDefaultUpdated:function(){},
propertyExpirationDateUpdated:function(){},
titleUpdated: function () {
},
availableQuantityUpdated: function () {
},
availableQuantityDefaultUpdated: function () {
},
propertyExpirationDateUpdated: function () {
},


updateProductForm: function () { updateProductForm: function () {
this.init(); this.init();
this.$parent.formProductArray.splice(this.keyForm, 1); this.$parent.formProductArray.splice(this.keyForm, 1);
} }
}, },
modalProductForm: function () {
$('#modal-extends-product').modal('show')
},
}, },
watch: {} watch: {}
}); });
delimiters: ['${', '}'], delimiters: ['${', '}'],
computed: { computed: {
productFamily: function () { productFamily: function () {
if(this.isMounted) {
if (this.isMounted) {
return { return {
'title': this.title, 'title': this.title,
'behaviorCountStock': this.behaviorCountStock, 'behaviorCountStock': this.behaviorCountStock,
'behaviorStockWeek': this.behaviorStockWeek,
'behaviorPrice': this.$refs.productUnitPrice.behaviorPrice, 'behaviorPrice': this.$refs.productUnitPrice.behaviorPrice,
'unit': this.$refs.productUnitPrice.unit, //this.getProductUnitPrice('unit'), 'unit': this.$refs.productUnitPrice.unit, //this.getProductUnitPrice('unit'),
'unitWording': this.$refs.productUnitPrice.unitWording, 'unitWording': this.$refs.productUnitPrice.unitWording,
'reductionValue': this.reductionValue, 'reductionValue': this.reductionValue,
'reductionBehaviorTaxRate': this.reductionBehaviorTaxRate 'reductionBehaviorTaxRate': this.reductionBehaviorTaxRate
}; };
}else{
} else {
return { return {
'title': null, 'title': null,
'behaviorCountStock': null, 'behaviorCountStock': null,
'behaviorStockWeek': null,
'behaviorPrice': null, 'behaviorPrice': null,
'unit': null, 'unit': null,
'unitWording': null, 'unitWording': null,
'quantity': null, 'quantity': null,
'price': null, 'price': null,
'priceWithTax':null,
'priceWithTax': null,
'buyingPrice': null, 'buyingPrice': null,
'buyingPriceWithTax': null, 'buyingPriceWithTax': null,
'buyingPriceByRefUnit': null, 'buyingPriceByRefUnit': null,


return Object.assign( return Object.assign(
{ {
isMounted:false,
isMounted: false,
indexFormProduct: 0, indexFormProduct: 0,
title: null, title: null,
isNovelty: null, isNovelty: null,
isOrganic: null, isOrganic: null,
propertyExpirationDate: null, propertyExpirationDate: null,
behaviorCountStock: null, behaviorCountStock: null,
behaviorStockWeek:null,
typeExpirationDate: null, typeExpirationDate: null,
behaviorExpirationDate: null, behaviorExpirationDate: null,
propertyAllergens: null, propertyAllergens: null,
propertyOrganicLabelActive: false, propertyOrganicLabelActive: false,
propertyNoveltyExpirationDateActive: false, propertyNoveltyExpirationDateActive: false,
activeProducts:false,
activeProducts: false,


formProductArray: [], formProductArray: [],
currentSection: 'general', currentSection: 'general',
name: 'reduction', name: 'reduction',
nameDisplay: 'Réduction' nameDisplay: 'Réduction'
}, },
{
name: 'seo',
nameDisplay: 'SEO'
},
{ {
name: 'note', name: 'note',
nameDisplay: 'Note interne' nameDisplay: 'Note interne'

+ 5
- 0
ShopBundle/Resources/translations/lcshop.fr.yaml View File

addresses: Livraisons & facturation addresses: Livraisons & facturation
main: Général main: Général
products: Déclinaisons products: Déclinaisons
productsExtend: Champs supplémentaires
priceAndUnit: Tarifs / Unités / Quantités priceAndUnit: Tarifs / Unités / Quantités
categories: Catégories categories: Catégories
unit: Unité & quantité unit: Unité & quantité
simple: Simple simple: Simple
multiple: Multiple multiple: Multiple
activeReductionCatalog: Appliquer une réduction sur ce produit activeReductionCatalog: Appliquer une réduction sur ce produit
exportTitle: Titre à l'export
exportNote: Note à l'export
quantityLabel: Label quantité
quantityLabelHelp: Volumes / Poids .. (utiliser dans les caractéristiques du produit)
Reduction: Reduction:
usersActive: Filtrer sur les utilisateurs usersActive: Filtrer sur les utilisateurs
groupUsersActive: Filtrer sur les groupes d'utilisateurs groupUsersActive: Filtrer sur les groupes d'utilisateurs

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







{% macro productField(colspan, field, fieldName, fieldDisplay = false, displaySuffix="",attr="") %}
{% macro product_field(colspan, field, field_name, field_display = false, display_suffix="",attr="") %}


{% if fieldDisplay == false %}{% set fieldDisplay = fieldName %}{% endif %}
{% if field_display == false %}{% set field_display = field_name %}{% endif %}


<td {{ attr|raw }} colspan="{{ colspan }}" class="{{ fieldName }}">
<div class="value" v-show="{{ fieldName }}Inherited == false" v-on:click="{{ fieldName }}Inherited = true">
<div v-if="{{ fieldName }}">
{% verbatim %}{{ {% endverbatim %}{{ fieldDisplay }} {% verbatim %}}}{% endverbatim %}{{ displaySuffix }}
<td {{ attr|raw }} colspan="{{ colspan }}" class="{{ field_name }}">
<div class="value" v-show="{{ field_name }}Inherited == false" v-on:click="setFocusOnField('{{ field_name }}Inherited', keyForm)">
<div v-if="{{ field_name }}">
{% verbatim %}{{ {% endverbatim %}{{ field_display }} {% verbatim %}}}{% endverbatim %}{{ display_suffix }}
</div> </div>
<div v-else class="inherited"> <div v-else class="inherited">
{% verbatim %}{{ productFamily.{% endverbatim %}{{ fieldDisplay }} {% verbatim %}}}{% endverbatim %}{{ displaySuffix }}
{% verbatim %}{{ productFamily.{% endverbatim %}{{ field_display }} {% verbatim %}}}{% endverbatim %}{{ display_suffix }}
</div> </div>
</div> </div>
<div v-show="{{ fieldName }}Inherited == true">
{{ form_widget(field, {'attr' : {'v-model' : fieldName , 'v-on:focusout': fieldName~'Inherited = false', '@change' : fieldName~'Updated'}}) }}
<div v-show="{{ field_name }}Inherited == true">
{{ form_widget(field, {'attr' : {'v-model' : field_name , 'v-on:focusout': field_name~'Inherited = false', '@change' : field_name~'Updated', 'data-ref': field_name~'Inherited', ':data-y' : "keyForm" }}) }}
</div> </div>
<button v-show="{{ fieldName }}" v-on:click="{{ fieldName }} = null; {{ fieldName }}Inherited = false; "
<button v-show="{{ field_name }}" v-on:click="{{ field_name }} = null; {{ field_name }}Inherited = false; "
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>
</td> </td>
{% endmacro %} {% endmacro %}

+ 3
- 1
ShopBundle/Resources/views/backend/productfamily/form.html.twig View File

<div v-show="currentSection == 'reduction'" class="panel panel-default"> <div v-show="currentSection == 'reduction'" class="panel panel-default">
{% include '@LcShop/backend/productfamily/panel_reduction.html.twig' %} {% include '@LcShop/backend/productfamily/panel_reduction.html.twig' %}
</div> </div>

<div v-show="currentSection == 'seo'" class="panel panel-default">
{% include '@LcShop/backend/productfamily/panel_seo.html.twig' %}
</div>


<div v-show="currentSection == 'note'" class="panel panel-default"> <div v-show="currentSection == 'note'" class="panel panel-default">
<div class="row"> <div class="row">

+ 1
- 0
ShopBundle/Resources/views/backend/productfamily/panel_price.html.twig View File

</div> </div>
{{ macros.endCard(true) }} {{ macros.endCard(true) }}



{{ macros.startCard(0, 'ProductFamily.tax','light') }} {{ macros.startCard(0, 'ProductFamily.tax','light') }}
<div class="col-12"> <div class="col-12">
{{ form_row(form.taxRate, {'attr': {'v-model':'taxRate'}}) }} {{ form_row(form.taxRate, {'attr': {'v-model':'taxRate'}}) }}

+ 74
- 41
ShopBundle/Resources/views/backend/productfamily/panel_products.html.twig View File

{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} {% import '@LcShop/backend/default/block/macros.html.twig' as macros %}
{% trans_default_domain 'lcshop' %}
{% macro printProductRow(product) %} {% macro printProductRow(product) %}


<tr class="lc-draggable"> <tr class="lc-draggable">
<td><i class="fa fa-fw fa-sort"></i></td> <td><i class="fa fa-fw fa-sort"></i></td>
{{ macros.productField(2, product.title, 'title') }}
{{ macros.productField(1, product.quantity, 'quantity') }}
{{ macros.productField(2, product.unit, 'unit', 'unitWording') }}
{{ macros.productField(2, product.buyingPrice, 'buyingPrice',false, '€', 'v-show="productFamily.behaviorPrice == \'by-piece\'"') }}
{{ macros.productField(2, product.buyingPriceWithTax, 'buyingPriceWithTax',false, '€', 'v-show="productFamily.behaviorPrice == \'by-piece\'"') }}
{{ macros.productField(2, product.buyingPriceByRefUnit, 'buyingPriceByRefUnit',false, '€', 'v-show="productFamily.behaviorPrice == \'by-reference-unit\'"') }}
{{ macros.productField(2, product.buyingPriceByRefUnitWithTax, 'buyingPriceByRefUnitWithTax',false, '€', 'v-show="productFamily.behaviorPrice == \'by-reference-unit\'"') }}
{{ macros.productField(2, product.multiplyingFactor, 'multiplyingFactor') }}
{{ macros.productField(2, product.priceByRefUnit, 'priceByRefUnit',false, '€', 'v-show="productFamily.behaviorPrice == \'by-reference-unit\'"') }}
{{ macros.productField(2, product.priceByRefUnitWithTax, 'priceByRefUnitWithTax',false, '€', 'v-show="productFamily.behaviorPrice == \'by-reference-unit\'"') }}
<td colspan="2" v-show="productFamily.behaviorPrice == 'by-reference-unit'">
{{ macros.product_field(2, product.title, 'title') }}
{{ macros.product_field(1, product.quantity, 'quantity') }}
{{ macros.product_field(1, product.unit, 'unit', 'unitWording') }}
{{ macros.product_field(2, product.buyingPrice, 'buyingPrice',false, '€', 'v-show="productFamily.behaviorPrice == \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') ~ '\'"') }}
{{ macros.product_field(2, product.buyingPriceWithTax, 'buyingPriceWithTax',false, '€', 'v-show="productFamily.behaviorPrice == \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') ~ '\'"') }}
{{ macros.product_field(2, product.buyingPriceByRefUnit, 'buyingPriceByRefUnit',false, '€', 'v-show="productFamily.behaviorPrice == \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') ~ '\'"') }}
{{ macros.product_field(2, product.buyingPriceByRefUnitWithTax, 'buyingPriceByRefUnitWithTax',false, '€', 'v-show="productFamily.behaviorPrice == \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') ~ '\'"') }}
{{ macros.product_field(2, product.multiplyingFactor, 'multiplyingFactor') }}
{{ macros.product_field(2, product.priceByRefUnit, 'priceByRefUnit',false, '€', 'v-show="productFamily.behaviorPrice == \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') ~ '\'"') }}
{{ macros.product_field(2, product.priceByRefUnitWithTax, 'priceByRefUnitWithTax',false, '€', 'v-show="productFamily.behaviorPrice == \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') ~ '\'"') }}
<td colspan="2" v-show="productFamily.behaviorPrice == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'">
{% verbatim %}{{ finalPriceWithTax }}{% endverbatim %}€ {% verbatim %}{{ finalPriceWithTax }}{% endverbatim %}€
</td> </td>


{{ macros.productField(2, product.price, 'price', false, '€', 'v-show="productFamily.behaviorPrice == \'by-piece\'"') }}
{{ macros.productField(2, product.priceWithTax, 'priceWithTax', false, '€', 'v-show="productFamily.behaviorPrice == \'by-piece\'"') }}
{{ macros.product_field(2, product.price, 'price', false, '€', 'v-show="productFamily.behaviorPrice == \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') ~ '\'"') }}
{{ macros.product_field(2, product.priceWithTax, 'priceWithTax', false, '€', 'v-show="productFamily.behaviorPrice == \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') ~ '\'"') }}


{{ macros.productField(1, product.availableQuantity, 'availableQuantity',false, '', 'v-show="productFamily.behaviorCountStock== \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') ~ '\'"') }}
{{ macros.productField(1, product.availableQuantityDefault, 'availableQuantityDefault',false, '', 'v-show="productFamily.behaviorCountStock== \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') ~ '\'"') }}
{{ macros.product_field(1, product.availableQuantity, 'availableQuantity',false, '', 'v-show="productFamily.behaviorCountStock== \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') ~ '\'"') }}
{{ macros.product_field(1, 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') ~ '\'"') }}


{{ macros.productField(2, product.propertyExpirationDate, 'propertyExpirationDate','propertyExpirationDateValue', '', 'v-show="productFamily.behaviorExpirationDate== \'by-product\'"') }}
{{ macros.product_field(2, product.propertyExpirationDate, 'propertyExpirationDate','propertyExpirationDateValue', '', 'v-show="productFamily.behaviorExpirationDate== \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_EXPIRATION_DATE_BY_PRODUCT') ~ '\'"') }}


<td> <td>
<button type="button" class="btn-remove-product btn btn-default" @click="deleteProductForm()">
<button type="button" class="btn-remove-product btn-sm btn-info" @click="modalProductForm()">
<i class="fa fa-edit"></i>
</button>
<button type="button" class="btn-remove-product btn-sm btn-danger" @click="deleteProductForm()">
<i class="fa fa-trash"></i> <i class="fa fa-trash"></i>
</button> </button>
{{ form_widget(product.position, {'attr' : {'class': "field-position"}}) }} {{ form_widget(product.position, {'attr' : {'class': "field-position"}}) }}


<div class="modal fade show" id="modal-extends-product">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4>{{ "group.ProductFamily.productsExtend"|trans }}</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="col">
{{ form_row(product.exportTitle) }}
</div>
<div class="col">
{{ form_row(product.exportNote) }}

</div>

</div>
<div class="modal-footer justify-content-between">
<button type="button" class="btn btn-info float-right" data-dismiss="modal">Ok</button>
</div>
</div>
<!-- /.modal-content -->
</div>
</div>


</td> </td>
</tr> </tr>
{% endmacro %} {% endmacro %}
<th colspan="1" class="string "> <th colspan="1" class="string ">
Quantité Quantité
</th> </th>
<th colspan="2" class="quantity">
<th colspan="1" class="quantity">
Unité Unité
</th> </th>
<th v-show="getBehaviorPrice() == 'by-reference-unit'" colspan="2" class="buyingPriceByRefUnit">
<th v-show="getBehaviorPrice() == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'" colspan="2" class="buyingPriceByRefUnit">
PA HT / ${ getUnitReference() } PA HT / ${ getUnitReference() }
</th> </th>
<th v-show="getBehaviorPrice() == 'by-reference-unit'" colspan="2" class="priceByRefUnit">
<th v-show="getBehaviorPrice() == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'" colspan="2" class="priceByRefUnit">
PA TTC / ${ getUnitReference() } PA TTC / ${ getUnitReference() }
</th> </th>


<th colspan="2" class="price" v-show="getBehaviorPrice() =='by-piece'">
<th colspan="2" class="price" v-show="getBehaviorPrice() =='{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'">
PA HT PA HT
</th> </th>
<th colspan="2" class="price" v-show="getBehaviorPrice() =='by-piece'">
<th colspan="2" class="price" v-show="getBehaviorPrice() =='{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'">
PA TTC PA TTC
</th> </th>
<th colspan="2" class=""> <th colspan="2" class="">
</th> </th>




<th v-show="getBehaviorPrice() == 'by-reference-unit'" colspan="2" class="">
<th v-show="getBehaviorPrice() == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'" colspan="2" class="">
PV HT / ${ getUnitReference() } PV HT / ${ getUnitReference() }
</th> </th>
<th v-show="getBehaviorPrice() == 'by-reference-unit'" colspan="2" class="price">
<th v-show="getBehaviorPrice() == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'" colspan="2" class="price">
PV TTC / ${ getUnitReference() } PV TTC / ${ getUnitReference() }
</th> </th>


<th colspan="2" class="price" v-show="getBehaviorPrice() =='by-piece'">
<th colspan="2" class="price" v-show="getBehaviorPrice() =='{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'">
PV HT PV HT
</th> </th>
<th colspan="2" class="price"> <th colspan="2" class="price">
PV TTC PV TTC
</th> </th>


<th v-show="behaviorCountStock== 'by-product'">
<th v-show="behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') }}'">
Stock Stock
</th> </th>
<th v-show="behaviorCountStock== 'by-product'">
<th 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
</th> </th>
<th colspan="2" class="" v-show="behaviorExpirationDate== 'by-product'">
<th colspan="2" class="" 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>
</th> </th>
<th class=""> <th class="">
<th colspan="1" class="string "> <th colspan="1" class="string ">
${productFamily.quantity} ${productFamily.quantity}
</th> </th>
<th colspan="2" class="quantity">
<th colspan="1" class="quantity">
${productFamily.unitWording} ${productFamily.unitWording}
</th> </th>
<th v-show="getBehaviorPrice() == 'by-reference-unit'" colspan="2" class="buyingPriceByRefUnit">
<th v-show="getBehaviorPrice() == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'" colspan="2" class="buyingPriceByRefUnit">
${productFamily.buyingPriceByRefUnit} ${productFamily.buyingPriceByRefUnit}
</th> </th>
<th v-show="getBehaviorPrice() == 'by-reference-unit'" colspan="2" class="priceByRefUnit">
<th v-show="getBehaviorPrice() == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'" colspan="2" class="priceByRefUnit">
${productFamily.buyingPriceByRefUnitWithTax} ${productFamily.buyingPriceByRefUnitWithTax}
</th> </th>


<th colspan="2" class="price" v-show="getBehaviorPrice() =='by-piece'">
<th colspan="2" class="price" v-show="getBehaviorPrice() =='{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'">
${productFamily.buyingPrice} ${productFamily.buyingPrice}
</th> </th>
<th colspan="2" class="price" v-show="getBehaviorPrice() =='by-piece'">
<th colspan="2" class="price" v-show="getBehaviorPrice() =='{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'">
${productFamily.buyingPriceWithTax} ${productFamily.buyingPriceWithTax}
</th> </th>
<th colspan="2" class=""> <th colspan="2" class="">
</th> </th>




<th v-show="getBehaviorPrice() == 'by-reference-unit'" colspan="2" class="">
<th v-show="getBehaviorPrice() == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'" colspan="2" class="">
${productFamily.priceByRefUnit} ${productFamily.priceByRefUnit}
</th> </th>
<th v-show="getBehaviorPrice() == 'by-reference-unit'" colspan="2" class="price">
<th v-show="getBehaviorPrice() == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'" colspan="2" class="price">
${productFamily.priceByRefUnitWithTax} ${productFamily.priceByRefUnitWithTax}
</th> </th>


<th colspan="2" class="price" v-show="getBehaviorPrice() =='by-piece'">
<th colspan="2" class="price" v-show="getBehaviorPrice() =='{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') }}'">
${productFamily.price} ${productFamily.price}
</th> </th>
<th colspan="2" class="price"> <th colspan="2" class="price">
${productFamily.priceWithTax} ${productFamily.priceWithTax}
</th> </th>


<th v-show="behaviorCountStock== 'by-product'">
<th v-show="behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') }}'">
</th> </th>
<th v-show="behaviorCountStock== 'by-product'">
<th 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" class="" v-show="behaviorExpirationDate== 'by-product'">
<th colspan="2" class="" v-show="behaviorExpirationDate== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_EXPIRATION_DATE_BY_PRODUCT') }}'">
${propertyExpirationDate} ${propertyExpirationDate}
</th> </th>
<th class=""> <th class="">

+ 14
- 0
ShopBundle/Resources/views/backend/productfamily/panel_seo.html.twig View File

{% trans_default_domain 'lcshop' %}


{% import '@LcShop/backend/default/block/macros.html.twig' as macros %}
<div class="row">
{{ macros.startCard(12, 'ProductFamily.Seo', 'light') }}

<div class="col">
{{ form_row(form.metaTitle)}}
{{ form_row(form.metaDescription)}}
</div>

{{ macros.endCard() }}
</div>

+ 8
- 2
ShopBundle/Resources/views/backend/productfamily/panel_stock.html.twig View File

<div class="col"> <div class="col">
{{ form_label(form.behaviorCountStock) }} {{ form_label(form.behaviorCountStock) }}
{% for field in form.behaviorCountStock %} {% for field in form.behaviorCountStock %}
{% if field.vars.value == "by-product" %}
{% if field.vars.value == constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') %}
<div v-if="activeProducts == true"> <div v-if="activeProducts == true">
{{ form_widget(field, {"attr" : {"v-model" : 'behaviorCountStock'}}) }} {{ form_widget(field, {"attr" : {"v-model" : 'behaviorCountStock'}}) }}
</div> </div>
{{ form_widget(field, {"attr" : {"v-model" : 'behaviorCountStock'}}) }} {{ form_widget(field, {"attr" : {"v-model" : 'behaviorCountStock'}}) }}
{% endif %} {% endif %}
{% endfor %} {% endfor %}

{{ form_label(form.behaviorStockWeek) }}
{% for field in form.behaviorStockWeek %}
{{ form_widget(field, {"attr" : {"v-model" : 'behaviorStockWeek'}}) }}
{% endfor %}
</div> </div>
<div class="col"> <div class="col">
<div v-show="behaviorCountStock == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT_FAMILY') }}' || behaviorCountStock == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE') }}'" <div v-show="behaviorCountStock == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT_FAMILY') }}' || behaviorCountStock == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE') }}'"
</div> </div>
{{ form_help(form.availableQuantity) }} {{ form_help(form.availableQuantity) }}
</div> </div>

</div>
<div v-show="(behaviorCountStock == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT_FAMILY') }}' || behaviorCountStock == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE') }}') && behaviorStockWeek!= '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_STOCK_WEEK_NON_RENEWABLE') }}'">
{{ form_label(form.availableQuantityDefault) }} {{ form_label(form.availableQuantityDefault) }}
<div class="form-widget"> <div class="form-widget">
<div class="input-group"> <div class="input-group">

Loading…
Cancel
Save