Browse Source

Ajout de methode dans priceSolver : excludeTax

feature/section_export
Fabien Normand 3 weeks 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

} }
return $arrayComplementaryOrderShops; return $arrayComplementaryOrderShops;
} }
public function countValidComplementaryOrderShops(OrderShopInterface $orderShop): int public function countValidComplementaryOrderShops(OrderShopInterface $orderShop): int
{ {
return count($this->getValidComplementaryOrderShops($orderShop)); return count($this->getValidComplementaryOrderShops($orderShop));

+ 11
- 0
Solver/Price/PriceSolverTrait.php View File

return $price; 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) public function applyReductionPercent($price, $percentage)
{ {
return $this->applyPercent($price, -$percentage); return $this->applyPercent($price, -$percentage);

Loading…
Cancel
Save