|
|
@@ -31,20 +31,29 @@ class OrderShopPriceUtils implements OrderShopPriceUtilsInterface |
|
|
|
} |
|
|
|
|
|
|
|
public function getTotalOrderProductsWithTax(OrderShopInterface $orderShop):float |
|
|
|
{ |
|
|
|
return $this->getTotalOrderProductsWithTaxByOrderProducts($orderShop->getOrderProducts()) ; |
|
|
|
} |
|
|
|
|
|
|
|
public function getTotalOrderProductsWithTaxByOrderProducts($orderProducts):float |
|
|
|
{ |
|
|
|
$total = 0; |
|
|
|
foreach ($orderShop->getOrderProducts() as $orderProduct) { |
|
|
|
foreach ($orderProducts as $orderProduct) { |
|
|
|
$total += $this->orderProductPriceUtils->getTotalWithTaxAndReduction($orderProduct); |
|
|
|
} |
|
|
|
|
|
|
|
return $total; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function getTotalOrderProductsTaxes(OrderShopInterface $orderShop):float |
|
|
|
{ |
|
|
|
return 0 ; |
|
|
|
$total = 0 ; |
|
|
|
|
|
|
|
foreach($orderShop->getOrderProducts() as $orderProduct) { |
|
|
|
$total += $this->orderProductPriceUtils->getTotalTaxes($orderProduct) / $this->getReductionsCoef($orderShop) ; |
|
|
|
} |
|
|
|
|
|
|
|
return $total ; |
|
|
|
} |
|
|
|
|
|
|
|
public function getOrderProductsTaxesAsArray(OrderShopInterface $orderShop):array |