浏览代码

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

正在加载...
取消
保存