Преглед на файлове

CreditUtils : ajustement payOrder et refundOrder

feature/souke
Guillaume Bourgeois преди 1 година
родител
ревизия
86427e1975
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. +2
    -2
      common/logic/User/CreditHistory/Service/CreditUtils.php

+ 2
- 2
common/logic/User/CreditHistory/Service/CreditUtils.php Целия файл

@@ -67,7 +67,7 @@ class CreditUtils extends AbstractService implements UtilsInterface

public function payOrder(Order $order, User $userAction, bool $checkCreditLimit): void
{
$amountRemaining = $this->orderSolver->getOrderAmountWithTax($order, Order::AMOUNT_REMAINING, true);
$amountRemaining = round($this->orderSolver->getOrderAmountWithTax($order, Order::AMOUNT_REMAINING), 2);

if($checkCreditLimit) {
$creditLimit = $this->producerRepository->getConfig('credit_limit');
@@ -93,7 +93,7 @@ class CreditUtils extends AbstractService implements UtilsInterface

public function refundOrder(Order $order, User $userAction): void
{
$amountPaid = $this->orderSolver->getOrderAmount($order, Order::AMOUNT_PAID, true);
$amountPaid = round($this->orderSolver->getOrderAmount($order, Order::AMOUNT_PAID), 2);

if ($amountPaid >= 0.01 && $order->id_user) {
$this->creditHistoryBuilder->createCreditHistory(

Loading…
Отказ
Запис