|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function getTotalOrderProductsTaxes(OrderShopInterface $orderShop):float |
|
|
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 |
|
|
public function getOrderProductsTaxesAsArray(OrderShopInterface $orderShop):array |
|
|
|
|
|
|
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$orderProductsTaxes[$idTaxRate]['totalOrderProducts'] += $this->orderProductPriceUtils->getTotalWithReduction($orderProduct) * $this->getReductionsCoef($orderShop); |
|
|
|
|
|
$orderProductsTaxes[$idTaxRate]['totalTaxes'] += $this->orderProductPriceUtils->getTotalTaxes($orderProduct) * $this->getReductionsCoef($orderShop) ; |
|
|
|
|
|
|
|
|
$orderProductsTaxes[$idTaxRate]['totalOrderProducts'] += $this->orderProductPriceUtils->getTotalWithReduction($orderProduct) / $this->getReductionsCoef($orderShop); |
|
|
|
|
|
$orderProductsTaxes[$idTaxRate]['totalTaxes'] += $this->orderProductPriceUtils->getTotalTaxes($orderProduct) / $this->getReductionsCoef($orderShop) ; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return $orderProductsTaxes ; |
|
|
return $orderProductsTaxes ; |