浏览代码

Ajout de methode dans priceSolver : excludeTax

feature/section_export
Fabien Normand 3 周前
父节点
当前提交
1854203d28
共有 2 个文件被更改,包括 12 次插入1 次删除
  1. +1
    -1
      Solver/Order/OrderShopSolver.php
  2. +11
    -0
      Solver/Price/PriceSolverTrait.php

+ 1
- 1
Solver/Order/OrderShopSolver.php 查看文件

@@ -232,7 +232,7 @@ class OrderShopSolver
}
return $arrayComplementaryOrderShops;
}
public function countValidComplementaryOrderShops(OrderShopInterface $orderShop): int
{
return count($this->getValidComplementaryOrderShops($orderShop));

+ 11
- 0
Solver/Price/PriceSolverTrait.php 查看文件

@@ -20,6 +20,17 @@ trait PriceSolverTrait
return $price;
}

public function excludeTax($price, $taxRateValue, $round = true)
{
$price = $this->applyPercentNegative($price, $taxRateValue);

if($round) {
return $this->round($price);
}

return $price;
}

public function applyReductionPercent($price, $percentage)
{
return $this->applyPercent($price, -$percentage);

正在加载...
取消
保存