Преглед изворни кода

Intégration app product édition avancé

packProduct
Fab пре 3 година
родитељ
комит
3a8b212d5b
2 измењених фајлова са 6 додато и 0 уклоњено
  1. +1
    -0
      Solver/Price/ProductPriceSolver.php
  2. +5
    -0
      Solver/Product/ProductFamilySolver.php

+ 1
- 0
Solver/Price/ProductPriceSolver.php Прегледај датотеку

@@ -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 Прегледај датотеку

@@ -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…
Откажи
Сачувај