Procházet zdrojové kódy

Frontend : correctifs

feature/export_comptable
Guillaume před 4 roky
rodič
revize
eb70ab17b0
2 změnil soubory, kde provedl 7 přidání a 4 odebrání
  1. +6
    -3
      ShopBundle/Services/Price/OrderShopPriceUtils.php
  2. +1
    -1
      ShopBundle/Services/Price/PriceUtils.php

+ 6
- 3
ShopBundle/Services/Price/OrderShopPriceUtils.php Zobrazit soubor

@@ -31,16 +31,19 @@ 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 ;

+ 1
- 1
ShopBundle/Services/Price/PriceUtils.php Zobrazit soubor

@@ -34,7 +34,7 @@ class PriceUtils implements PriceUtilsInterface
$service = 'orderProductPriceUtils' ;
}

if($entity instanceof OrderShopInterface) {
if($entity instanceof OrderShopInterface || is_array($entity)) {
$service = 'orderShopPriceUtils' ;
}


Načítá se…
Zrušit
Uložit