Kaynağa Gözat

Prix

feature/export_comptable
Guillaume 4 yıl önce
ebeveyn
işleme
b4b6376eb9
1 değiştirilmiş dosya ile 9 ekleme ve 3 silme
  1. +9
    -3
      ShopBundle/Services/Price/OrderShopPriceUtils.php

+ 9
- 3
ShopBundle/Services/Price/OrderShopPriceUtils.php Dosyayı Görüntüle

@@ -46,7 +46,13 @@ class OrderShopPriceUtils implements OrderShopPriceUtilsInterface

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
@@ -64,8 +70,8 @@ class OrderShopPriceUtils implements OrderShopPriceUtilsInterface
];
}

$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 ;

Yükleniyor…
İptal
Kaydet