Browse Source

Intégration app product édition avancé

packProduct
Fab 3 years ago
parent
commit
3a8b212d5b
2 changed files with 6 additions and 0 deletions
  1. +1
    -0
      Solver/Price/ProductPriceSolver.php
  2. +5
    -0
      Solver/Product/ProductFamilySolver.php

+ 1
- 0
Solver/Price/ProductPriceSolver.php View File

@@ -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 View File

@@ -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();

Loading…
Cancel
Save