Browse Source

Processus de commande

feature/export_comptable
Fab 4 years ago
parent
commit
3d1baf513a
1 changed files with 18 additions and 1 deletions
  1. +18
    -1
      ShopBundle/Services/Price/OrderShopPriceUtils.php

+ 18
- 1
ShopBundle/Services/Price/OrderShopPriceUtils.php View File

$totalReductionAmount += $this->getOrderProductsReductionCartAmountWithoutTax($orderShop,$orderReductionCart); $totalReductionAmount += $this->getOrderProductsReductionCartAmountWithoutTax($orderShop,$orderReductionCart);
} }


foreach ($orderShop->getOrderReductionCredits() as $orderReductionCredit) {
$totalReductionAmount += $this->getOrderProductsReductionCreditAmountWithoutTax($orderShop,$orderReductionCredit);
}

$total -= $totalReductionAmount ; $total -= $totalReductionAmount ;


return $total ; return $total ;
} }




public function getTotalWithTaxAndReductions(OrderShopInterface $orderShop)
public function getTotalOrderProductsWithTaxAndReductions(OrderShopInterface $orderShop)
{ {
$total = $this->getTotalOrderProductsWithTax($orderShop) ;

$totalReductionAmount = 0 ;
foreach ($orderShop->getOrderReductionCarts() as $orderReductionCart) {
$totalReductionAmount += $this->getOrderProductsReductionCartAmountWithTax($orderShop,$orderReductionCart);
}


foreach ($orderShop->getOrderReductionCredits() as $orderReductionCredit) {
$totalReductionAmount += $this->getOrderProductsReductionCreditAmountWithTax($orderShop,$orderReductionCredit);
}

$total -= $totalReductionAmount ;

return $total ;
} }


public function getOrderProductsReductionCartAmountWithoutTax(OrderShopInterface $order, $orderReductionCart) public function getOrderProductsReductionCartAmountWithoutTax(OrderShopInterface $order, $orderReductionCart)

Loading…
Cancel
Save