Pārlūkot izejas kodu

Intégration app product édition avancé

packProduct
Fab pirms 3 gadiem
vecāks
revīzija
3a8b212d5b
2 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. +1
    -0
      Solver/Price/ProductPriceSolver.php
  2. +5
    -0
      Solver/Product/ProductFamilySolver.php

+ 1
- 0
Solver/Price/ProductPriceSolver.php Parādīt failu

@@ -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 Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt