From 241b2c6598bbb1d8d9fe2cebb8cf90b0b954d676 Mon Sep 17 00:00:00 2001 From: Jacek Pyziak Date: Wed, 16 Apr 2025 22:34:41 +0200 Subject: [PATCH] =?UTF-8?q?Zaktualizuj=20znacznik=20czasu=20i=20status=20p?= =?UTF-8?q?lik=C3=B3w=20w=20ftp-kr.sync.cache.json;=20dodaj=20zaokr=C4=85g?= =?UTF-8?q?lanie=20ceny=20w=20klasie=20Product?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/ftp-kr.sync.cache.json | 6 +++--- classes/Product.php | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.vscode/ftp-kr.sync.cache.json b/.vscode/ftp-kr.sync.cache.json index 7520cfe6..c53d9655 100644 --- a/.vscode/ftp-kr.sync.cache.json +++ b/.vscode/ftp-kr.sync.cache.json @@ -941,8 +941,8 @@ "defines.inc.php": { "type": "-", "size": 8247, - "lmtime": 1742897029493, - "modified": false + "lmtime": 1743429384853, + "modified": true }, "defines_uri.inc.php": { "type": "-", @@ -1025,7 +1025,7 @@ }, ".htaccess": { "type": "-", - "size": 3568, + "size": 3651, "lmtime": 0, "modified": true }, diff --git a/classes/Product.php b/classes/Product.php index ebbba501..523fb7b2 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -3954,6 +3954,11 @@ class ProductCore extends ObjectModel $price -= $specific_price_reduction; } + // Zaokrąglanie w górę tylko gdy mamy redukcję + if ($specific_price && $specific_price['reduction'] > 0) { + $price = Tools::ps_round($price); + } + // Group reduction if ($use_group_reduction) { $reduction_from_category = GroupReduction::getValueForProduct($id_product, $id_group);