Bläddra i källkod

Intégration app product édition avancé

packProduct
Fab 3 år sedan
förälder
incheckning
3a8b212d5b
2 ändrade filer med 6 tillägg och 0 borttagningar
  1. +1
    -0
      Solver/Price/ProductPriceSolver.php
  2. +5
    -0
      Solver/Product/ProductFamilySolver.php

+ 1
- 0
Solver/Price/ProductPriceSolver.php Visa fil

@@ -99,6 +99,7 @@ class ProductPriceSolver
$solver = $this->getSolver($product);

if ($solver->getBehaviorPriceInherited($product) == 'by-piece') {
dump($product);
return $solver->getBuyingPriceInherited($product);
} elseif ($solver->getBehaviorPriceInherited($product) == 'by-reference-unit') {
if ($solver->getQuantityInherited($product) > 0) {

+ 5
- 0
Solver/Product/ProductFamilySolver.php Visa fil

@@ -329,6 +329,11 @@ class ProductFamilySolver
return $productFamily->getBuyingPriceByRefUnit();
}

public function getBuyingPriceInherited(ProductFamilyInterface $productFamily): ?float
{
return $productFamily->getBuyingPrice();
}

public function getPriceByRefUnitInherited(ProductFamilyInterface $productFamily): ?float
{
return $productFamily->getPriceByRefUnit();

Laddar…
Avbryt
Spara