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 1/2] 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) { From 60065630708f72e1748cb67bb459441c00b1c713 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:55:06 +0300 Subject: [PATCH 2/2] bump version --- CHANGELOG.md | 3 +++ VERSION | 2 +- retailcrm/retailcrm.php | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb160dc..7cb7b69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v2.5.1 +* Исправлена ошибка с некорректным значением скидки в заказе по истории + ## v2.5.0 * Добавлена возможность выгрузки брошенных корзин diff --git a/VERSION b/VERSION index 437459c..73462a5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.5.0 +2.5.1 diff --git a/retailcrm/retailcrm.php b/retailcrm/retailcrm.php index 4d61d8b..12f260e 100755 --- a/retailcrm/retailcrm.php +++ b/retailcrm/retailcrm.php @@ -39,7 +39,7 @@ class RetailCRM extends Module { $this->name = 'retailcrm'; $this->tab = 'export'; - $this->version = '2.5.0'; + $this->version = '2.5.1'; $this->author = 'Retail Driver LCC'; $this->displayName = $this->l('RetailCRM'); $this->description = $this->l('Integration module for RetailCRM');