<?php | |||||
namespace Lc\ShopBundle\Context; | |||||
interface OrderAmountMinInterface | |||||
{ | |||||
} |
'expanded' => true | 'expanded' => true | ||||
)); | )); | ||||
$formBuilder->add('behaviorBuyingPrice', ChoiceType::class, array( | |||||
'empty_data' => 'by-piece', | |||||
'choices' => array( | |||||
'field.ProductFamily.behaviorBuyingPriceOptions.byPiece' => 'by-piece', | |||||
'field.ProductFamily.behaviorBuyingPriceOptions.byRefUnit' => 'by-reference-unit' | |||||
), | |||||
'translation_domain' => 'lcshop', | |||||
'multiple' => false, | |||||
'expanded' => true | |||||
)); | |||||
$formBuilder->add('propertyOrganicLabel', ChoiceType::class, array( | $formBuilder->add('propertyOrganicLabel', ChoiceType::class, array( | ||||
'choices' => array( | 'choices' => array( | ||||
'field.ProductFamily.organicLabelOptions.ab' => 'ab', | 'field.ProductFamily.organicLabelOptions.ab' => 'ab', |
'required' => false, | 'required' => false, | ||||
'mapped' => false | 'mapped' => false | ||||
)); | )); | ||||
$builder->add('buyingPriceByRefUnit', NumberType::class, array( | |||||
'label' => 'Prix d\'achat', | |||||
'required'=>false, | |||||
'mapped' => false | |||||
)); | |||||
$builder->add('buyingPriceByRefUnitWithTax', NumberType::class, array( | |||||
'label' => 'Prix d\'achat TTC', | |||||
'required' => false, | |||||
'mapped' => false | |||||
)); | |||||
$builder->add('multiplyingFactor', NumberType::class, array( | $builder->add('multiplyingFactor', NumberType::class, array( | ||||
'label' => 'Coefficiant de multiplication', | 'label' => 'Coefficiant de multiplication', | ||||
'mapped'=>false, | 'mapped'=>false, | ||||
'required'=>false | 'required'=>false | ||||
)); | )); | ||||
$builder->add('priceByRefUnit', NumberType::class, array( | |||||
'required'=>false, | |||||
'mapped' => false | |||||
)); | |||||
$builder->add('priceByRefUnitWithTax', NumberType::class, array( | |||||
'required' => false, | |||||
'mapped' => false | |||||
)); | |||||
$builder->add('availableQuantity', NumberType::class, array( | $builder->add('availableQuantity', NumberType::class, array( | ||||
'label' => 'Quantité disponible', | 'label' => 'Quantité disponible', | ||||
'required' => false, | 'required' => false, |
<?php | |||||
namespace Lc\ShopBundle\Model; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
trait OrderAmountMin | |||||
{ | |||||
/** | |||||
* @ORM\Column(type="float") | |||||
*/ | |||||
private $orderAmountMin; | |||||
public function getOrderAmountMin(): ?float | |||||
{ | |||||
return $this->orderAmountMin; | |||||
} | |||||
public function setOrderAmountMin(float $orderAmountMin): self | |||||
{ | |||||
$this->orderAmountMin = $orderAmountMin; | |||||
return $this; | |||||
} | |||||
} |
use Doctrine\Common\Collections\Collection; | use Doctrine\Common\Collections\Collection; | ||||
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
use Lc\ShopBundle\Context\FilterMultipleMerchantsInterface; | use Lc\ShopBundle\Context\FilterMultipleMerchantsInterface; | ||||
use Lc\ShopBundle\Context\OrderAmountMinInterface; | |||||
/** | /** | ||||
* @ORM\MappedSuperclass() | * @ORM\MappedSuperclass() | ||||
*/ | */ | ||||
abstract class PointSale extends AbstractDocumentEntity implements FilterMultipleMerchantsInterface | |||||
abstract class PointSale extends AbstractDocumentEntity implements FilterMultipleMerchantsInterface, OrderAmountMinInterface | |||||
{ | { | ||||
use OrderAmountMin; | |||||
/** | /** | ||||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\MerchantInterface", inversedBy="pointSales") | * @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\MerchantInterface", inversedBy="pointSales") | ||||
*/ | */ |
*/ | */ | ||||
protected $behaviorAddToCart; | protected $behaviorAddToCart; | ||||
/** | |||||
* @ORM\Column(type="string", length=31) | |||||
*/ | |||||
protected $behaviorBuyingPrice; | |||||
/** | |||||
* @ORM\Column(type="boolean") | |||||
*/ | |||||
protected $displayPriceByRefUnit; | |||||
public function __construct() | public function __construct() | ||||
{ | { | ||||
$this->productCategories = new ArrayCollection(); | $this->productCategories = new ArrayCollection(); | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getBehaviorBuyingPrice(): ?string | |||||
{ | |||||
return $this->behaviorBuyingPrice; | |||||
} | |||||
public function setBehaviorBuyingPrice(?string $behaviorBuyingPrice): self | |||||
{ | |||||
$this->behaviorBuyingPrice = $behaviorBuyingPrice; | |||||
return $this; | |||||
} | |||||
public function getDisplayPriceByRefUnit(): ?bool | |||||
{ | |||||
return $this->displayPriceByRefUnit; | |||||
} | |||||
public function setDisplayPriceByRefUnit(?bool $displayPriceByRefUnit): self | |||||
{ | |||||
$this->displayPriceByRefUnit = $displayPriceByRefUnit; | |||||
return $this; | |||||
} | |||||
public function hasProductsWithVariousWeight() | public function hasProductsWithVariousWeight() | ||||
{ | { | ||||
if ($this->getActiveProducts()) { | if ($this->getActiveProducts()) { |
use Doctrine\ORM\EntityManager; | use Doctrine\ORM\EntityManager; | ||||
use Doctrine\ORM\EntityRepository; | use Doctrine\ORM\EntityRepository; | ||||
use Lc\ShopBundle\Context\FilterMerchantInterface; | use Lc\ShopBundle\Context\FilterMerchantInterface; | ||||
use Lc\ShopBundle\Context\FilterMultipleMerchantsInterface; | |||||
use Lc\ShopBundle\Context\MerchantUtilsInterface; | use Lc\ShopBundle\Context\MerchantUtilsInterface; | ||||
use Lc\ShopBundle\Context\StatusInterface; | use Lc\ShopBundle\Context\StatusInterface; | ||||
if ($criteria['merchant'] === false) unset($criteria['merchant']); | if ($criteria['merchant'] === false) unset($criteria['merchant']); | ||||
} | } | ||||
return parent::findBy($criteria, $orderBy, $limit, $offset); | return parent::findBy($criteria, $orderBy, $limit, $offset); | ||||
} | } |
->getResult() ; | ->getResult() ; | ||||
} | } | ||||
public function findAllByMerchant() | |||||
{ | |||||
return $this->createQueryBuilder('e') | |||||
->where(':currentMerchant MEMBER OF e.merchants') | |||||
->andWhere('e.status = 1') | |||||
->setParameter('currentMerchant', $this->merchantUtils->getMerchantCurrent()) | |||||
->getQuery() | |||||
->getResult() ; | |||||
} | |||||
} | } |
priceWithTax: null, | priceWithTax: null, | ||||
buyingPrice: null, | buyingPrice: null, | ||||
buyingPriceWithTax: null, | buyingPriceWithTax: null, | ||||
buyingPriceByRefUnit: null, | |||||
buyingPriceByRefUnitWithTax: null, | |||||
differentSupplierTaxRate: null, | differentSupplierTaxRate: null, | ||||
multiplyingFactor: null, | multiplyingFactor: null, | ||||
priceByRefUnit: null, | priceByRefUnit: null, | ||||
priceByRefUnitWithTax: null, | |||||
taxRate: null, | taxRate: null, | ||||
supplierTaxRate: null, | |||||
priceByRefUnitWithTax: null | |||||
supplierTaxRate: null | |||||
}, window.mixinPriceValues); | }, window.mixinPriceValues); | ||||
}, | }, | ||||
computed: { | computed: { | ||||
taxRateValue: function () { | taxRateValue: function () { | ||||
if(this.taxRate) { | |||||
if (this.taxRate) { | |||||
return this.taxRatesList[this.taxRate]['value']; | return this.taxRatesList[this.taxRate]['value']; | ||||
}else if (this.taxRate == null || this.taxRate == "undefined"){ | |||||
} else if (this.taxRate == null || this.taxRate == "undefined") { | |||||
return this.taxRatesList['default']['value']; | return this.taxRatesList['default']['value']; | ||||
}else{ | |||||
} else { | |||||
log('ERREUR : pas de taxRate') | log('ERREUR : pas de taxRate') | ||||
} | } | ||||
}, | }, | ||||
supplierTaxRateValue: function () { | supplierTaxRateValue: function () { | ||||
if(this.supplierTaxRate) { | |||||
if (this.supplierTaxRate) { | |||||
return this.taxRatesList[this.supplierTaxRate]['value']; | return this.taxRatesList[this.supplierTaxRate]['value']; | ||||
}else if (this.supplierTaxRate == null || this.supplierTaxRate == "undefined"){ | |||||
} else if (this.supplierTaxRate == null || this.supplierTaxRate == "undefined") { | |||||
return this.taxRateValue; | return this.taxRateValue; | ||||
}else{ | |||||
} else { | |||||
log('ERREUR : pas de supplier taxRate') | log('ERREUR : pas de supplier taxRate') | ||||
} | } | ||||
}, | }, | ||||
mounted: function () { | mounted: function () { | ||||
}, | }, | ||||
methods: { | methods: { | ||||
/*changeTaxRate: function () { | |||||
this.$emit('tax-rate-change'); | |||||
this.changePriceWithTax(); | |||||
},*/ | |||||
changeBuyingPrice: function () { | |||||
this.buyingPriceUpdate('buyingPrice'); | |||||
}, | |||||
changeBuyingPriceWithTax: function () { | |||||
this.buyingPriceUpdate('buyingPriceWithTax'); | |||||
init: function () { | |||||
this.buyingPriceUpdated(); | |||||
this.priceUpdated(); | |||||
this.unitUpdated(); | |||||
}, | }, | ||||
changePrice: function () { | |||||
this.priceUpdate('price'); | |||||
this.setMultiplyingFactor(); | |||||
priceUpdated: function () { | |||||
if(this.price) { | |||||
this.setPriceWithTax(); | |||||
this.setMultiplyingFactor(); | |||||
this.setPriceByRefUnit(); | |||||
this.setPriceByRefUnitWithTax(); | |||||
} | |||||
}, | }, | ||||
changePriceWithTax: function () { | |||||
this.priceUpdate('priceWithTax'); | |||||
this.setMultiplyingFactor(); | |||||
buyingPriceUpdated: function () { | |||||
if(this.buyingPrice) { | |||||
this.setBuyingPriceWithTax(); | |||||
this.setMultiplyingFactor(); | |||||
this.setBuyingPriceByRefUnit(); | |||||
this.setBuyingPriceByRefUnitWithTax(); | |||||
} | |||||
}, | }, | ||||
priceUpdate: function (priceType) { | |||||
if (priceType == 'priceWithTax' && this.price) { | |||||
this.price = parseFloat(this.price.replace(',', '.')).toFixed(3); | |||||
this.priceWithTax = getPriceWithTax(this.price, this.taxRateValue); | |||||
} else if (this.priceWithTax) { | |||||
if (typeof this.priceWithTax != "number") { | |||||
this.priceWithTax = parseFloat(this.priceWithTax.replace(',', '.')); | |||||
} | |||||
this.priceWithTax = this.priceWithTax.toFixed(2); | |||||
this.price = getPrice(this.priceWithTax, this.taxRateValue); | |||||
unitUpdated: function () { | |||||
if(this.unit) { | |||||
this.setPriceByRefUnit(); | |||||
this.setPriceByRefUnitWithTax(); | |||||
//this.setBuyingPriceByRefUnit(); | |||||
//this.setBuyingPriceByRefUnitWithTax(); | |||||
} | } | ||||
this.priceByRefUnitUpdate(); | |||||
}, | }, | ||||
buyingPriceUpdate: function (priceType) { | |||||
quantityUpdated: function () { | |||||
if(this.quantity) { | |||||
this.setPriceByRefUnit(); | |||||
this.setPriceByRefUnitWithTax(); | |||||
// this.setBuyingPriceByRefUnit(); | |||||
// this.setBuyingPriceByRefUnitWithTax(); | |||||
} | |||||
}, | |||||
//Toutes les fonctions ci-dessous ne font que mettre à jour les price et buyingPrice | |||||
buyingPriceWithTaxUpdated: function () { | |||||
this.setBuyingPriceFromBuyingPriceWithTax(); | |||||
this.buyingPriceUpdated(); | |||||
}, | |||||
buyingPriceByRefUnitUpdated: function () { | |||||
this.setBuyingPriceFromBuyingPriceByRefUnit(); | |||||
this.buyingPriceUpdated(); | |||||
}, | |||||
buyingPriceByRefUnitWithTaxUpdated: function () { | |||||
this.setBuyingPriceByRefUnitFromBuyingPriceByRefUnitWithTax(); | |||||
this.buyingPriceByRefUnitUpdated(); | |||||
}, | |||||
multiplyingFactorUpdated: function () { | |||||
this.setPriceFromMultiplyingFactor(); | |||||
this.priceUpdated(); | |||||
}, | |||||
priceWithTaxUpdated: function () { | |||||
this.setPriceFromPriceWithTax(); | |||||
this.priceUpdated(); | |||||
}, | |||||
priceByRefUnitUpdated: function () { | |||||
this.setPriceFromPriceByRefUnit(); | |||||
this.priceUpdated(); | |||||
}, | |||||
priceByRefUnitWithTaxUpdated: function () { | |||||
this.setPriceByRefUnitFromTax(); | |||||
this.priceByRefUnitUpdated(); | |||||
}, | |||||
if (priceType == 'buyingPriceWithTax' && this.buyingPrice) { | |||||
this.buyingPrice = parseFloat(this.buyingPrice.replace(',', '.')).toFixed(3); | |||||
this.buyingPriceWithTax = getPriceWithTax(this.buyingPrice, this.supplierTaxRateValue); | |||||
} else if (this.buyingPriceWithTax) { | |||||
//SETTER | |||||
setBuyingPriceFromBuyingPriceByRefUnit:function(){ | |||||
this.buyingPrice = parseFloat((this.buyingPriceByRefUnit * this.quantityValue) / this.unitCoefficient).toFixed(2); | |||||
}, | |||||
setBuyingPriceFromBuyingPriceWithTax: function () { | |||||
if (this.buyingPriceWithTax) { | |||||
this.buyingPriceWithTax = parseFloat(this.buyingPriceWithTax.replace(',', '.')).toFixed(2); | this.buyingPriceWithTax = parseFloat(this.buyingPriceWithTax.replace(',', '.')).toFixed(2); | ||||
this.buyingPrice = getPrice(this.buyingPriceWithTax, this.supplierTaxRateValue); | this.buyingPrice = getPrice(this.buyingPriceWithTax, this.supplierTaxRateValue); | ||||
} | } | ||||
this.setMultiplyingFactor(); | |||||
this.priceByRefUnitUpdate(); | |||||
}, | }, | ||||
updateMultiplyingFactor: function () { | |||||
this.priceWithTax = this.buyingPriceValue * this.multiplyingFactor; | |||||
this.priceUpdate('price'); | |||||
setBuyingPriceWithTax: function () { | |||||
if (this.buyingPrice) { | |||||
this.buyingPrice = parseFloat(this.buyingPrice.replace(',', '.')).toFixed(3); | |||||
this.buyingPriceWithTax = getPriceWithTax(this.buyingPrice, this.supplierTaxRateValue); | |||||
} | |||||
}, | |||||
setBuyingPriceByRefUnitFromBuyingPriceByRefUnitWithTax: function () { | |||||
if (this.buyingPriceByRefUnitWithTax) { | |||||
this.buyingPriceByRefUnitWithTax = parseFloat(this.buyingPriceByRefUnitWithTax.replace(',', '.')).toFixed(2); | |||||
this.buyingPriceByRefUnit = getPrice(this.buyingPriceByRefUnitWithTax, this.supplierTaxRateValue); | |||||
} | |||||
}, | |||||
setBuyingPriceByRefUnit: function () { | |||||
if (this.unitCoefficient && this.quantityValue) { | |||||
this.buyingPriceByRefUnit = parseFloat((this.buyingPriceValue / this.quantityValue) * this.unitCoefficient).toFixed(2); | |||||
} | |||||
}, | |||||
setBuyingPriceByRefUnitWithTax: function () { | |||||
if (this.buyingPriceByRefUnit) { | |||||
this.buyingPriceByRefUnit = parseFloat(this.buyingPriceByRefUnit.replace(',', '.')).toFixed(3); | |||||
this.buyingPriceByRefUnitWithTax = getPriceWithTax(this.buyingPriceByRefUnit, this.supplierTaxRateValue); | |||||
} | |||||
}, | }, | ||||
setMultiplyingFactor: function () { | setMultiplyingFactor: function () { | ||||
if (this.priceWithTax && this.buyingPrice) { | |||||
if (this.priceWithTax || this.buyingPrice) { | |||||
this.multiplyingFactor = parseFloat(this.priceWithTaxValue / this.buyingPriceValue).toFixed(3); | this.multiplyingFactor = parseFloat(this.priceWithTaxValue / this.buyingPriceValue).toFixed(3); | ||||
} | } | ||||
}, | }, | ||||
priceByRefUnitUpdate: function () { | |||||
setPriceByRefUnitFromTax: function () { | |||||
if (this.priceByRefUnitWithTax) { | |||||
this.priceByRefUnitWithTax = parseFloat(this.priceByRefUnitWithTax.replace(',', '.')).toFixed(2); | |||||
this.priceByRefUnit = getPrice(this.priceByRefUnitWithTax, this.taxRateValue); | |||||
} | |||||
}, | |||||
setPriceByRefUnit: function () { | |||||
if (this.unitCoefficient && this.quantityValue) { | if (this.unitCoefficient && this.quantityValue) { | ||||
this.priceByRefUnit = parseFloat((this.priceValue / this.quantityValue) * this.unitCoefficient).toFixed(2); | this.priceByRefUnit = parseFloat((this.priceValue / this.quantityValue) * this.unitCoefficient).toFixed(2); | ||||
} | |||||
}, | |||||
setPriceByRefUnitWithTax: function () { | |||||
if (this.unitCoefficient && this.quantityValue) { | |||||
this.priceByRefUnitWithTax = parseFloat((this.priceWithTaxValue / this.quantityValue) * this.unitCoefficient).toFixed(2); | this.priceByRefUnitWithTax = parseFloat((this.priceWithTaxValue / this.quantityValue) * this.unitCoefficient).toFixed(2); | ||||
} | } | ||||
} | |||||
}, | |||||
setPriceFromMultiplyingFactor: function () { | |||||
this.price = getPrice(this.buyingPriceValue * this.multiplyingFactor, this.taxRateValue); | |||||
}, | |||||
setPriceFromPriceByRefUnit: function () { | |||||
this.price = parseFloat((this.priceByRefUnit * this.quantityValue) / this.unitCoefficient).toFixed(2); | |||||
}, | |||||
setPriceFromPriceWithTax: function () { | |||||
if (typeof this.priceWithTax != "number") { | |||||
this.priceWithTax = parseFloat(this.priceWithTax.replace(',', '.')); | |||||
} | |||||
this.priceWithTax = this.priceWithTax.toFixed(2); | |||||
this.price = getPrice(this.priceWithTax, this.taxRateValue); | |||||
}, | |||||
setPriceWithTax() { | |||||
if (this.price) { | |||||
this.price = parseFloat(this.price.replace(',', '.')).toFixed(3); | |||||
this.priceWithTax = getPriceWithTax(this.price, this.taxRateValue); | |||||
} | |||||
}, | |||||
}, | }, | ||||
watch: {} | watch: {} | ||||
} | } | ||||
}, | }, | ||||
mounted: function () { | mounted: function () { | ||||
this.priceUpdate('priceWithTax'); | |||||
this.buyingPriceUpdate('buyingPriceWithTax'); | |||||
this.init(); | |||||
}, | }, | ||||
watch: { | watch: { | ||||
taxRate: function () { | taxRate: function () { | ||||
this.changePriceWithTax(); | |||||
this.changeBuyingPriceWithTax(); | |||||
this.setBuyingPriceWithTax(); | |||||
this.setPriceWithTax(); | |||||
this.setMultiplyingFactor(); | |||||
this.setPriceByUnitRefWithTax(); | |||||
}, | }, | ||||
supplierTaxRate: function () { | supplierTaxRate: function () { | ||||
this.changeBuyingPriceWithTax(); | |||||
this.setBuyingPriceWithTax(); | |||||
} | } | ||||
/*log($('.product-form.modal .select-unit')); | |||||
$('.product-form.modal .select-unit').find('option:selected').each(function(i,elm){ | |||||
$(this).prop("selected", false); | |||||
}); | |||||
log($('.product-form.modal .select-unit'));*/ | |||||
} | } | ||||
}); | }); | ||||
multiplyingFactorInherited: false, | multiplyingFactorInherited: false, | ||||
buyingPriceInherited: false, | buyingPriceInherited: false, | ||||
buyingPriceWithTaxInherited: false, | buyingPriceWithTaxInherited: false, | ||||
buyingPriceByRefUnitInherited: false, | |||||
buyingPriceByRefUnitWithTaxInherited: false, | |||||
priceByRefUnitInherited:false, | |||||
priceByRefUnitWithTaxInherited:false, | |||||
expirationDateInherited: false, | expirationDateInherited: false, | ||||
availableQuantityInherited: false, | availableQuantityInherited: false, | ||||
availableQuantityDefaultInherited: false, | availableQuantityDefaultInherited: false, | ||||
this.updateProductView(); | this.updateProductView(); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
titleUpdated:function(){}, | |||||
availableQuantityUpdated:function(){}, | |||||
availableQuantityDefaultUpdated:function(){}, | |||||
propertyExpirationDateUpdated:function(){}, | |||||
updateLine: function(){ | updateLine: function(){ | ||||
this.changePriceWithTax(); | |||||
this.changeBuyingPriceWithTax(); | |||||
this.init(); | |||||
}, | }, | ||||
updateProductForm: function () { | updateProductForm: function () { | ||||
this.changePriceWithTax(); | |||||
this.changeBuyingPriceWithTax(); | |||||
//EDIT UNIT | |||||
this.init(); | |||||
}, | }, | ||||
updateProductView: function () { | updateProductView: function () { | ||||
return { | return { | ||||
'title': this.title, | 'title': this.title, | ||||
'behaviorCountStock': this.behaviorCountStock, | 'behaviorCountStock': this.behaviorCountStock, | ||||
'behaviorBuyingPrice': this.behaviorBuyingPrice, | |||||
'displayPriceByRefUnit': this.displayPriceByRefUnit, | |||||
'unit': this.$refs.productUnitPrice.unit, | 'unit': this.$refs.productUnitPrice.unit, | ||||
'unitWording': this.$refs.productUnitPrice.unitWording, | |||||
'quantity': this.$refs.productUnitPrice.quantity, | 'quantity': this.$refs.productUnitPrice.quantity, | ||||
'price': this.$refs.productUnitPrice.price, | 'price': this.$refs.productUnitPrice.price, | ||||
'priceWithTax': this.$refs.productUnitPrice.priceWithTax, | 'priceWithTax': this.$refs.productUnitPrice.priceWithTax, | ||||
'buyingPrice': this.$refs.productUnitPrice.buyingPrice, | 'buyingPrice': this.$refs.productUnitPrice.buyingPrice, | ||||
'buyingPriceWithTax': this.$refs.productUnitPrice.buyingPriceWithTax, | 'buyingPriceWithTax': this.$refs.productUnitPrice.buyingPriceWithTax, | ||||
'buyingPriceByRefUnit': this.$refs.productUnitPrice.buyingPriceByRefUnit, | |||||
'buyingPriceByRefUnitWithTax': this.$refs.productUnitPrice.buyingPriceByRefUnitWithTax, | |||||
'priceByRefUnit': this.$refs.productUnitPrice.priceByRefUnit, | 'priceByRefUnit': this.$refs.productUnitPrice.priceByRefUnit, | ||||
'priceByRefUnitWithTax': this.$refs.productUnitPrice.priceByRefUnitWithTax, | 'priceByRefUnitWithTax': this.$refs.productUnitPrice.priceByRefUnitWithTax, | ||||
'taxRate': this.$refs.productUnitPrice.taxRate, | 'taxRate': this.$refs.productUnitPrice.taxRate, | ||||
isOrganic: null, | isOrganic: null, | ||||
propertyExpirationDate: null, | propertyExpirationDate: null, | ||||
behaviorCountStock: null, | behaviorCountStock: null, | ||||
behaviorBuyingPrice:null, | |||||
displayPriceByRefUnit: false, | |||||
typeExpirationDate: null, | typeExpirationDate: null, | ||||
behaviorExpirationDate: null, | behaviorExpirationDate: null, | ||||
propertyAllergens: null, | propertyAllergens: null, |
enabled: Activé | enabled: Activé | ||||
zips: Codes postaux | zips: Codes postaux | ||||
cities: Villes | cities: Villes | ||||
orderPriceMin: Montant minimum de commande | |||||
orderAmountMin: Montant minimum de commande | |||||
deliveryPrice: Montant de la livraison | deliveryPrice: Montant de la livraison | ||||
typeExpirationDate: Type de date d'expiration | typeExpirationDate: Type de date d'expiration | ||||
dlc: DLC | dlc: DLC | ||||
subscribeNewsletter: S'inscrire à la newsletter | subscribeNewsletter: S'inscrire à la newsletter | ||||
send: Envoyer | send: Envoyer | ||||
isSent: Envoyée | isSent: Envoyée | ||||
PointSale: | |||||
code: Code | |||||
codeHelp: Code utilisé pour retrouver l'ambassade dans le tunnel de commande (Non sensible à la casse) | |||||
Supplier: | Supplier: | ||||
user: Utilisateur lié | user: Utilisateur lié | ||||
propertyCharacteristics: Caractéristiques | propertyCharacteristics: Caractéristiques | ||||
propertyPackaging: Conditionnement | propertyPackaging: Conditionnement | ||||
propertyWeightQuantity: Poids/quantité | propertyWeightQuantity: Poids/quantité | ||||
displayPriceUnitRef: Afficher le prix par unité de référence | |||||
behaviorBuyingPrice: Affichage du prix d'achat | |||||
behaviorBuyingPriceOptions: | |||||
byPiece: À la pièce | |||||
byRefUnit: Par unité de référence | |||||
behaviorCountStockOptions: | behaviorCountStockOptions: | ||||
byQuantity: Gérer le stock par quantité | byQuantity: Gérer le stock par quantité | ||||
byProductFamily: Gérer le stock par produit (à l'unité) | byProductFamily: Gérer le stock par produit (à l'unité) |
</div> | </div> | ||||
{% if noCol == false %}</div>{% endif %} | {% if noCol == false %}</div>{% endif %} | ||||
{% endmacro %} | {% endmacro %} | ||||
{% macro productField(colspan, field, fieldName, fieldDisplay = false, displaySuffix="",attr="") %} | |||||
{% if fieldDisplay == false %}{% set fieldDisplay = fieldName %}{% endif %} | |||||
<td {{ attr|raw }} colspan="{{ colspan }}" class="{{ fieldName }}" v-on:click="{{ fieldName }}Inherited = true"> | |||||
<div v-show="{{ fieldName }}Inherited == false"> | |||||
<div v-if="{{ fieldName }}"> | |||||
{% verbatim %}{{ {% endverbatim %}{{ fieldDisplay }} {% verbatim %}}}{% endverbatim %}{{ displaySuffix }} | |||||
</div> | |||||
<div v-else class="inherited"> | |||||
{% verbatim %}{{ productFamily.{% endverbatim %}{{ fieldDisplay }} {% verbatim %}}}{% endverbatim %}{{ displaySuffix }} | |||||
</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> | |||||
</td> | |||||
{% endmacro %} |
{% if formValues.availableQuantity %}availableQuantity: "{{ formValues.availableQuantity }}",{% endif %} | {% if formValues.availableQuantity %}availableQuantity: "{{ formValues.availableQuantity }}",{% endif %} | ||||
{% if formValues.availableQuantityDefault %}availableQuantityDefault: "{{ formValues.availableQuantityDefault }}",{% endif %} | {% if formValues.availableQuantityDefault %}availableQuantityDefault: "{{ formValues.availableQuantityDefault }}",{% endif %} | ||||
{% if formValues.activeProducts %}activeProducts: "{{ formValues.activeProducts }}",{% endif %} | {% if formValues.activeProducts %}activeProducts: "{{ formValues.activeProducts }}",{% endif %} | ||||
{% if formValues.displayPriceByRefUnit == true %}displayPriceByRefUnit: {{ formValues.displayPriceByRefUnit }},{% endif %} | |||||
{% if formValues.behaviorBuyingPrice %}behaviorBuyingPrice: "{{ formValues.behaviorBuyingPrice }}",{% endif %} | |||||
{% if formValues.propertyOrganicLabel %}propertyOrganicLabelActive: true,{% endif %} | {% if formValues.propertyOrganicLabel %}propertyOrganicLabelActive: true,{% endif %} | ||||
{% if formValues.propertyNoveltyExpirationDate %}propertyNoveltyExpirationDateActive: true,{% endif %} | {% if formValues.propertyNoveltyExpirationDate %}propertyNoveltyExpirationDateActive: true,{% endif %} | ||||
{% if formValues.typeExpirationDate %}typeExpirationDate: "{{ formValues.typeExpirationDate }}",{% endif %} | {% if formValues.typeExpirationDate %}typeExpirationDate: "{{ formValues.typeExpirationDate }}",{% endif %} |
<div class="row"> | <div class="row"> | ||||
{{ macros.startCard(4, 'ProductFamily.unit','light') }} | {{ macros.startCard(4, 'ProductFamily.unit','light') }} | ||||
<div class="col-12"> | <div class="col-12"> | ||||
{{ form_row(form.unit, {"attr":{'v-model': 'unit', '@change': "priceByRefUnitUpdate"}}) }} | |||||
{{ form_row(form.unit, {"attr":{'v-model': 'unit', '@change': "unitUpdated"}}) }} | |||||
</div> | </div> | ||||
<div class="col-12"> | <div class="col-12"> | ||||
{{ form_label(form.quantity) }} | {{ form_label(form.quantity) }} | ||||
<div class="form-widget"> | <div class="form-widget"> | ||||
<div class="input-group"> | <div class="input-group"> | ||||
{{ form_widget(form.quantity, {'attr' : {'v-model': 'quantity', '@change': "priceByRefUnitUpdate"}}) }} | |||||
{{ form_widget(form.quantity, {'attr' : {'v-model': 'quantity', '@change': "quantityUpdated"}}) }} | |||||
<div class="input-group-append"> | <div class="input-group-append"> | ||||
<span class="input-group-text">${ unitWording }</span> | <span class="input-group-text">${ unitWording }</span> | ||||
</div> | </div> | ||||
{{ macros.startCard(8, 'ProductFamily.price','light') }} | {{ macros.startCard(8, 'ProductFamily.price','light') }} | ||||
<div class="form-group field-price col-12"> | <div class="form-group field-price col-12"> | ||||
<div class="row"> | <div class="row"> | ||||
<div class="col-12 form-group"> | |||||
{{ form_label(form.behaviorBuyingPrice) }} | |||||
{% for field in form.behaviorBuyingPrice %} | |||||
{{ form_widget(field, {"attr" : {"v-model" : 'behaviorBuyingPrice'}}) }} | |||||
{% endfor %} | |||||
</div> | |||||
<div class="col-12"> | <div class="col-12"> | ||||
{{ form_label(form.buyingPrice) }} | {{ form_label(form.buyingPrice) }} | ||||
</div> | </div> | ||||
<div class="col-6"> | |||||
<div class="col-6" v-show="behaviorBuyingPrice == 'by-piece'"> | |||||
<div class="form-widget"> | <div class="form-widget"> | ||||
<div class="input-group"> | <div class="input-group"> | ||||
{{ form_widget(form.buyingPrice, {'attr' : {'v-model': 'buyingPrice', '@change' : 'changeBuyingPriceWithTax'}}) }} | |||||
{{ form_widget(form.buyingPrice, {'attr' : {'v-model': 'buyingPrice', '@change' : 'buyingPriceUpdated'}}) }} | |||||
<div class="input-group-append"> | <div class="input-group-append"> | ||||
<span class="input-group-text">€ HT {#${ unitReference }#}</span> | <span class="input-group-text">€ HT {#${ unitReference }#}</span> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="col-6"> | |||||
<div class="col-6" v-show="behaviorBuyingPrice == 'by-piece'"> | |||||
<div class="form-widget"> | <div class="form-widget"> | ||||
<div class="input-group"> | <div class="input-group"> | ||||
{{ form_widget(form.buyingPriceWithTax, {'attr' : {'v-model': 'buyingPriceWithTax', '@change' : 'changeBuyingPrice'}}) }} | |||||
{{ form_widget(form.buyingPriceWithTax, {'attr' : {'v-model': 'buyingPriceWithTax', '@change' : 'buyingPriceWithTaxUpdated'}}) }} | |||||
<div class="input-group-append"> | <div class="input-group-append"> | ||||
<span class="input-group-text">€ TTC</span> | <span class="input-group-text">€ TTC</span> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="col-6" v-show="behaviorBuyingPrice == 'by-reference-unit'"> | |||||
<div class="form-widget"> | |||||
<div class="input-group"> | |||||
{{ form_widget(form.buyingPriceByRefUnit, {'attr' : {'v-model': 'buyingPriceByRefUnit', '@change' : 'buyingPriceByRefUnitUpdated'}}) }} | |||||
<div class="input-group-append"> | |||||
<span class="input-group-text">€ HT / ${ unitReference }</span> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-6" v-show="behaviorBuyingPrice == 'by-reference-unit'"> | |||||
<div class="form-widget"> | |||||
<div class="input-group"> | |||||
{{ form_widget(form.buyingPriceByRefUnitWithTax, {'attr' : {'v-model': 'buyingPriceByRefUnitWithTax', '@change' : 'buyingPriceByRefUnitWithTaxUpdated'}}) }} | |||||
<div class="input-group-append"> | |||||
<span class="input-group-text">€ TTC/ ${ unitReference }</span> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="form-group field-price col-12"> | <div class="form-group field-price col-12"> | ||||
<div class="form-widget"> | <div class="form-widget"> | ||||
{{ form_label(form.multiplyingFactor) }} | {{ form_label(form.multiplyingFactor) }} | ||||
<div class="input-group"> | <div class="input-group"> | ||||
{{ form_widget(form.multiplyingFactor, {'attr': {'v-model':'multiplyingFactor', '@change' : 'updateMultiplyingFactor'}}) }} | |||||
{{ form_widget(form.multiplyingFactor, {'attr': {'v-model':'multiplyingFactor', '@change' : 'multiplyingFactorUpdated'}}) }} | |||||
<div class="input-group-append"> | <div class="input-group-append"> | ||||
<span class="input-group-text">X</span> | <span class="input-group-text">X</span> | ||||
</div> | </div> | ||||
<div class="col-6"> | <div class="col-6"> | ||||
<div class="form-widget"> | <div class="form-widget"> | ||||
<div class="input-group"> | <div class="input-group"> | ||||
{{ form_widget(form.price, {'attr' : {'v-model': 'price', '@change' : 'changePriceWithTax'}}) }} | |||||
{{ form_widget(form.price, {'attr' : {'v-model': 'price', '@change' : 'priceUpdated'}}) }} | |||||
<div class="input-group-append"> | <div class="input-group-append"> | ||||
<span class="input-group-text">€ HT</span> | <span class="input-group-text">€ HT</span> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="col-6"> | <div class="col-6"> | ||||
<div class="input-group"> | <div class="input-group"> | ||||
{{ form_widget(form.priceWithTax, {'attr' : {'v-model': 'priceWithTax', '@change' : 'changePrice'}}) }} | |||||
{{ form_widget(form.priceWithTax, {'attr' : {'v-model': 'priceWithTax', '@change' : 'priceWithTaxUpdated'}}) }} | |||||
<div class="input-group-append"> | <div class="input-group-append"> | ||||
<span class="input-group-text">€ TTC</span> | <span class="input-group-text">€ TTC</span> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="form-group field-price col-12" v-show="unit != 'piece'"> | <div class="form-group field-price col-12" v-show="unit != 'piece'"> | ||||
{{ form_row(form.displayPriceByRefUnit, {"attr": {"v-model": 'displayPriceByRefUnit'}}) }} | |||||
</div> | |||||
<div class="form-group field-price col-12" v-show="displayPriceByRefUnit == true && unit != 'piece'"> | |||||
<div class="row"> | <div class="row"> | ||||
<div class="col-12"> | <div class="col-12"> | ||||
{{ form_label(form.priceByRefUnit) }} | {{ form_label(form.priceByRefUnit) }} | ||||
<div class="col-6"> | <div class="col-6"> | ||||
<div class="form-widget"> | <div class="form-widget"> | ||||
<div class="input-group"> | <div class="input-group"> | ||||
{{ form_widget(form.priceByRefUnit, {'attr' : {'v-model': 'priceByRefUnit', 'readonly':'readonly'}}) }} | |||||
{{ form_widget(form.priceByRefUnit, {'attr' : {'v-model': 'priceByRefUnit', '@change' : 'priceByRefUnitUpdated'}}) }} | |||||
<div class="input-group-append"> | <div class="input-group-append"> | ||||
<span class="input-group-text">€ HT / ${ unitReference }</span> | <span class="input-group-text">€ HT / ${ unitReference }</span> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="col-6"> | <div class="col-6"> | ||||
<div class="input-group"> | <div class="input-group"> | ||||
{{ form_widget(form.priceByRefUnitWithTax, {'attr' : {'v-model': 'priceByRefUnitWithTax','readonly':'readonly'}}) }} | |||||
{{ form_widget(form.priceByRefUnitWithTax, {'attr' : {'v-model': 'priceByRefUnitWithTax', '@change' : 'priceByRefUnitWithTaxUpdated'}}) }} | |||||
<div class="input-group-append"> | <div class="input-group-append"> | ||||
<span class="input-group-text">€ TTC / ${ unitReference }</span> | <span class="input-group-text">€ TTC / ${ unitReference }</span> | ||||
</div> | </div> |
<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> | ||||
<td colspan="2" class="title" v-on:click="titleInherited = true"> | |||||
{#<td colspan="2" class="title" v-on:click="titleInherited = true"> | |||||
<div v-show="titleInherited == false"> | <div v-show="titleInherited == false"> | ||||
<div v-if="title" class="blop"> | <div v-if="title" class="blop"> | ||||
{% verbatim %}{{ title }}{% endverbatim %} | {% verbatim %}{{ title }}{% endverbatim %} | ||||
<div v-show="titleInherited == true"> | <div v-show="titleInherited == true"> | ||||
{{ form_widget(product.title, {'attr' : {'v-model' : 'title', 'v-on:focusout': 'titleInherited = false'}}) }} | {{ form_widget(product.title, {'attr' : {'v-model' : 'title', 'v-on:focusout': 'titleInherited = false'}}) }} | ||||
</div> | </div> | ||||
</td> | |||||
</td>#} | |||||
<td colspan="1" class="quantity" v-on:click="quantityInherited = true"> | |||||
<div v-show="quantityInherited == false"> | |||||
<div v-if="quantity" class="blop"> | |||||
{% verbatim %}{{ quantity }}{% endverbatim %} | |||||
</div> | |||||
<div v-else class="inherited"> | |||||
{% verbatim %}{{ productFamily.quantity }}{% endverbatim %} | |||||
</div> | |||||
</div> | |||||
<div v-show="quantityInherited == true"> | |||||
{{ form_widget(product.quantity, {'attr' : {'v-model' : 'quantity', 'v-on:focusout': 'quantityInherited = false', '@change' : 'updateLine'}}) }} | |||||
</div> | |||||
</td> | |||||
{# | |||||
<td colspan="2" class="unit" v-on:click="unitInherited = true"> | <td colspan="2" class="unit" v-on:click="unitInherited = true"> | ||||
<div v-show="unitInherited == false"> | <div v-show="unitInherited == false"> | ||||
<div v-show="unitInherited == true"> | <div v-show="unitInherited == true"> | ||||
{{ form_widget(product.unit, {'attr' : {'v-model' : 'unit', 'v-on:focusout': 'unitInherited = false', '@change' : 'updateLine'}}) }} | {{ form_widget(product.unit, {'attr' : {'v-model' : 'unit', 'v-on:focusout': 'unitInherited = false', '@change' : 'updateLine'}}) }} | ||||
</div> | </div> | ||||
</td> | |||||
<td colspan="2" class="buyingPrice" v-on:click="buyingPriceInherited = true"> | |||||
<div v-show="buyingPriceInherited == false"> | |||||
<div v-if="buyingPrice" class="blop"> | |||||
{% verbatim %}{{ buyingPrice }}€{% endverbatim %} | |||||
</div> | |||||
<div v-else class="inherited"> | |||||
{% verbatim %}{{ productFamily.buyingPrice }}€{% endverbatim %} | |||||
</div> | |||||
</div> | |||||
<div v-show="buyingPriceInherited == true"> | |||||
{{ form_widget(product.buyingPrice, {'attr' : {'v-model' : 'buyingPrice', 'v-on:focusout': 'buyingPriceInherited = false', '@change' : 'changeBuyingPriceWithTax'}}) }} | |||||
</div> | |||||
</td> | |||||
<td colspan="2" class="buyingPriceWithTax" v-on:click="buyingPriceWithTaxInherited = true"> | |||||
<div v-show="buyingPriceWithTaxInherited == false"> | |||||
<div v-if="buyingPriceWithTax" class="blop"> | |||||
{% verbatim %}{{ buyingPriceWithTax }}€{% endverbatim %} | |||||
</div> | |||||
<div v-else class="inherited"> | |||||
{% verbatim %}{{ productFamily.buyingPriceWithTax }}€{% endverbatim %} | |||||
</div> | |||||
</div> | |||||
<div v-show="buyingPriceWithTaxInherited == true"> | |||||
{{ form_widget(product.buyingPriceWithTax, {'attr' : {'v-model' : 'buyingPriceWithTax', 'v-on:focusout': 'buyingPriceWithTaxInherited = false' , '@change' : 'changeBuyingPrice'}}) }} | |||||
</div> | |||||
</td> | |||||
<td colspan="2" class="multiplyingFactor" v-on:click="multiplyingFactorInherited = true"> | |||||
<div v-show="multiplyingFactorInherited == false"> | |||||
<div v-if="multiplyingFactor"> | |||||
{% verbatim %}{{ multiplyingFactor }}{% endverbatim %} | |||||
</div> | |||||
<div v-else class="inherited"> | |||||
{% verbatim %}{{ productFamily.multiplyingFactor }}{% endverbatim %} | |||||
</div> | |||||
</div> | |||||
<div v-show="multiplyingFactorInherited == true"> | |||||
{{ form_widget(product.multiplyingFactor, {'attr' : {'v-model' : 'multiplyingFactor', 'v-on:focusout': 'multiplyingFactorInherited = false', '@change' : 'updateMultiplyingFactor'}}) }} | |||||
</div> | |||||
</td> | |||||
<td colspan="2" class="price" v-on:click="priceInherited = true"> | |||||
<div v-show="priceInherited == false"> | |||||
<div v-if="price"> | |||||
{% verbatim %}{{ price }}€{% endverbatim %} | |||||
</div> | |||||
<div v-else class="inherited"> | |||||
{% verbatim %}{{ productFamily.price }}€{% endverbatim %} | |||||
</div> | |||||
</div> | |||||
<div v-show="priceInherited == true"> | |||||
{{ form_widget(product.price, {'attr' : {'v-model' : 'price', 'v-on:focusout': 'priceInherited = false', '@change' : 'changePriceWithTax'}}) }} | |||||
</div> | |||||
</td> | |||||
<td colspan="2" class="priceWithTax" v-on:click="priceWithTaxInherited = true"> | |||||
<div v-show="priceWithTaxInherited == false"> | |||||
<div v-if="priceWithTax"> | |||||
{% verbatim %}{{ priceWithTax }}€{% endverbatim %} | |||||
</div> | |||||
<div v-else class="inherited"> | |||||
{% verbatim %}{{ productFamily.priceWithTax }}€{% endverbatim %} | |||||
</div> | |||||
</div> | |||||
<div v-show="priceWithTaxInherited == true"> | |||||
{{ form_widget(product.priceWithTax, {'attr' : {'v-model' : 'priceWithTax', 'v-on:focusout': 'priceWithTaxInherited = false', '@change' : 'changePrice'}}) }} | |||||
</div> | |||||
</td> | |||||
{# <td colspan="2" class="priceByRefUnit"> | |||||
{% verbatim %}{{ priceByRefUnit }}€{% endverbatim %} | |||||
</td> | |||||
<td colspan="2" class="priceByRefUnit priceByRefUnitWithTax"> | |||||
{% verbatim %}{{ priceByRefUnitWithTax }}€{% endverbatim %} | |||||
</td>#} | </td>#} | ||||
<td v-show="productFamily.behaviorCountStock== 'by-product'" class="stock availableQuantity " v-on:click="availableQuantityInherited = true"> | |||||
<div v-show="availableQuantityInherited == false"> | |||||
<div v-if="availableQuantity"> | |||||
{% verbatim %}{{ availableQuantity }}{% endverbatim %} | |||||
</div> | |||||
<div v-else class="inherited"> | |||||
{% verbatim %}{{ productFamily.availableQuantity }}{% endverbatim %} | |||||
</div> | |||||
</div> | |||||
<div v-show="availableQuantityInherited == true"> | |||||
{{ form_widget(product.availableQuantity, {'attr' : {'v-model' : 'availableQuantity', 'v-on:focusout': 'availableQuantityInherited = false'}}) }} | |||||
</div> | |||||
</td> | |||||
<td v-show="productFamily.behaviorCountStock== 'by-product'" class="stock availableQuantityDefault" v-on:click="availableQuantityDefaultInherited = true"> | |||||
<div v-show="availableQuantityDefaultInherited == false"> | |||||
<div v-if="availableQuantityDefault"> | |||||
{% verbatim %}{{ availableQuantityDefault }}{% endverbatim %} | |||||
</div> | |||||
<div v-else class="inherited"> | |||||
{% verbatim %}{{ productFamily.availableQuantityDefault }}{% endverbatim %} | |||||
</div> | |||||
</div> | |||||
<div v-show="availableQuantityDefaultInherited == true"> | |||||
{{ form_widget(product.availableQuantityDefault, {'attr' : {'v-model' : 'availableQuantityDefault', 'v-on:focusout': 'availableQuantityDefaultInherited = false'}}) }} | |||||
</div> | |||||
</td> | |||||
<td v-show="productFamily.behaviorExpirationDate== 'by-product'" colspan="2" v-on:click="propertyExpirationDateInherited = true"> | |||||
<div v-show="propertyExpirationDateInherited == false"> | |||||
<div v-if="propertyExpirationDate"> | |||||
{% verbatim %}{{ propertyExpirationDateFormated }}{% endverbatim %} | |||||
</div> | |||||
<div v-else class="inherited"> | |||||
{% verbatim %}{{ propertyExpirationDateFormated }}{% endverbatim %} | |||||
</div> | |||||
</div> | |||||
<div v-show="propertyExpirationDateInherited == true"> | |||||
{{ form_widget(product.propertyExpirationDate, {'attr' : {'v-model' : 'propertyExpirationDate', 'v-on:focusout': 'propertyExpirationDateInherited = false'}}) }} | |||||
</div> | |||||
</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.behaviorBuyingPrice == \'by-piece\'"') }} | |||||
{{ macros.productField(2, product.buyingPriceWithTax, 'buyingPriceWithTax',false, '€', 'v-show="productFamily.behaviorBuyingPrice == \'by-piece\'"') }} | |||||
{{ macros.productField(2, product.buyingPriceByRefUnit, 'buyingPriceByRefUnit',false, '€', 'v-show="productFamily.behaviorBuyingPrice == \'by-reference-unit\'"') }} | |||||
{{ macros.productField(2, product.buyingPriceByRefUnitWithTax, 'buyingPriceByRefUnitWithTax',false, '€', 'v-show="productFamily.behaviorBuyingPrice == \'by-reference-unit\'"') }} | |||||
{{ macros.productField(2, product.multiplyingFactor, 'multiplyingFactor') }} | |||||
{{ macros.productField(2, product.price, 'price') }} | |||||
{{ macros.productField(2, product.priceWithTax, 'priceWithTax') }} | |||||
{{ macros.productField(2, product.priceByRefUnit, 'priceByRefUnit',false, '€', 'v-show="productFamily.displayPriceByRefUnit == true"') }} | |||||
{{ macros.productField(2, product.priceByRefUnitWithTax, 'priceByRefUnitWithTax',false, '€', 'v-show="productFamily.displayPriceByRefUnit == true"') }} | |||||
{{ macros.productField(2, product.availableQuantity, 'availableQuantity',false, '', 'v-show="productFamily.behaviorCountStock== \'by-product\'"') }} | |||||
{{ macros.productField(2, product.availableQuantityDefault, 'availableQuantityDefault',false, '', 'v-show="productFamily.behaviorCountStock== \'by-product\'"') }} | |||||
{{ macros.productField(2, product.propertyExpirationDate, 'propertyExpirationDate','propertyExpirationDateFormated', '', 'v-show="productFamily.behaviorExpirationDate== \'by-product\'"') }} | |||||
<td> | <td> | ||||
<button type="button" class="btn-remove-product btn btn-default" @click="deleteProductForm()"> | <button type="button" class="btn-remove-product btn btn-default" @click="deleteProductForm()"> | ||||
<th colspan="2" class="quantity"> | <th colspan="2" class="quantity"> | ||||
Unité | Unité | ||||
</th> | </th> | ||||
<th colspan="2" class="price"> | |||||
<th v-show="behaviorBuyingPrice == 'by-reference-unit'" colspan="2" class="buyingPriceByRefUnit"> | |||||
PA HT / ${ getUnitReference() } | |||||
</th> | |||||
<th v-show="behaviorBuyingPrice == 'by-reference-unit'" colspan="2" class="priceByRefUnit"> | |||||
PA TTC / ${ getUnitReference() } | |||||
</th> | |||||
<th v-show="behaviorBuyingPrice == 'by-piece'" colspan="2" class="price"> | |||||
PA HT | PA HT | ||||
</th> | </th> | ||||
<th colspan="2" class="price"> | |||||
<th v-show="behaviorBuyingPrice == 'by-piece'" colspan="2" class="price"> | |||||
PA TTC | PA TTC | ||||
</th> | </th> | ||||
<th colspan="2" class=""> | <th colspan="2" class=""> | ||||
<th colspan="2" class="price"> | <th colspan="2" class="price"> | ||||
PV TTC | PV TTC | ||||
</th> | </th> | ||||
{# <th colspan="2" class="priceByRefUnit"> | |||||
<th v-show="displayPriceByRefUnit == true" colspan="2" class="priceByRefUnit"> | |||||
PV HT / ${ getUnitReference() } | PV HT / ${ getUnitReference() } | ||||
</th> | </th> | ||||
<th colspan="2" class="priceByRefUnit"> | |||||
<th v-show="displayPriceByRefUnit == true" colspan="2" class="priceByRefUnit"> | |||||
PV TTC / ${ getUnitReference() } | PV TTC / ${ getUnitReference() } | ||||
</th>#} | |||||
</th> | |||||
<th v-show="behaviorCountStock== 'by-product'"> | <th v-show="behaviorCountStock== 'by-product'"> | ||||
Stock | Stock |