Browse Source

Ajout de methode dans priceSolver : excludeTax

feature/section_export
Fabien Normand 1 week ago
parent
commit
1854203d28
2 changed files with 12 additions and 1 deletions
  1. +1
    -1
      Solver/Order/OrderShopSolver.php
  2. +11
    -0
      Solver/Price/PriceSolverTrait.php

+ 1
- 1
Solver/Order/OrderShopSolver.php View File

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

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

Loading…
Cancel
Save