소스 검색

Processus de commande

feature/export_comptable
Fab 4 년 전
부모
커밋
4d31e094bf
2개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. +2
    -3
      ShopBundle/Services/Price/OrderShopPriceUtils.php
  2. +3
    -0
      ShopBundle/Services/Price/PriceUtilsTrait.php

+ 2
- 3
ShopBundle/Services/Price/OrderShopPriceUtils.php 파일 보기

@@ -95,8 +95,7 @@ class OrderShopPriceUtils implements OrderShopPriceUtilsInterface

if($orderReductionCart->getAppliedTo() === ReductionCart::APPLIED_TO_ORDER_PRODUCTS) {
if ($orderReductionCart->getUnit() == 'percent') {

$price = $this->applyReductionPercent(
$price = $this->amountReductionByPercentValue(
$this->getTotalOrderProducts($order),
$orderReductionCart->getValue()
);
@@ -117,7 +116,7 @@ class OrderShopPriceUtils implements OrderShopPriceUtilsInterface
if($orderReductionCart->getAppliedTo() === ReductionCart::APPLIED_TO_ORDER_PRODUCTS) {
if ($orderReductionCart->getUnit() == 'percent') {

$price = $this->applyReductionPercent(
$price = $this->amountReductionByPercentValue(
$this->getTotalOrderProductsWithTax($order),
$orderReductionCart->getValue()
);

+ 3
- 0
ShopBundle/Services/Price/PriceUtilsTrait.php 파일 보기

@@ -37,6 +37,9 @@ trait PriceUtilsTrait
{
return round((($price * 100)) / 100, 2);
}
public function amountReductionByPercentValue($price, $percent){
return round((($price * $percent)) / 100, 2);
}

public function applyReductionCatalog($entity, $price, $priceWithTax, $reductionCatalog = null, $withTax = true): ?float
{

Loading…
취소
저장