From fac7d3706b670f6130655eef2e24ed35ea2d5583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B0=D0=B2=D0=B5=D0=BB?= Date: Tue, 14 Apr 2020 11:49:30 +0300 Subject: [PATCH] fix discount rounding --- retailcrm/lib/RetailcrmHistory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retailcrm/lib/RetailcrmHistory.php b/retailcrm/lib/RetailcrmHistory.php index 7aabe0c..ecc07b3 100755 --- a/retailcrm/lib/RetailcrmHistory.php +++ b/retailcrm/lib/RetailcrmHistory.php @@ -887,7 +887,7 @@ class RetailcrmHistory ) { $orderTotalProducts = $infoOrder['summ']; $deliveryCost = $infoOrder['delivery']['cost']; - $totalDiscount = $deliveryCost + $orderTotalProducts - $totalPaid; + $totalDiscount = round($deliveryCost + $orderTotalProducts - $totalPaid, 2); $orderCartRules = $orderToUpdate->getCartRules(); foreach ($orderCartRules as $valCartRules) {