From fece1a1b0fb28dfb5aceb223097dd50f86f91287 Mon Sep 17 00:00:00 2001 From: Sumit Panwar Date: Tue, 3 Oct 2023 15:28:31 +0530 Subject: [PATCH] Fixed: Wrong price values entered in order_detail table when Round Type setting is set to 'Round on each item' --- classes/Cart.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/Cart.php b/classes/Cart.php index 66c60bb88..9c62bc7ed 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -781,8 +781,8 @@ class CartCore extends ObjectModel case Order::ROUND_ITEM: default: - $row['total'] = Tools::ps_round($totalPriceByProductTaxExcl, _PS_PRICE_COMPUTE_PRECISION_) * (int)$row['cart_quantity']; - $row['total_wt'] = Tools::ps_round($totalPriceByProductTaxIncl, _PS_PRICE_COMPUTE_PRECISION_) * (int)$row['cart_quantity']; + $row['total'] = Tools::ps_round($totalPriceByProductTaxExcl, _PS_PRICE_COMPUTE_PRECISION_); + $row['total_wt'] = Tools::ps_round($totalPriceByProductTaxIncl, _PS_PRICE_COMPUTE_PRECISION_); break; } } @@ -804,8 +804,8 @@ class CartCore extends ObjectModel case Order::ROUND_ITEM: default: - $row['total'] = Tools::ps_round($totalPriceByProductTaxExcl, _PS_PRICE_COMPUTE_PRECISION_) * (int)$row['cart_quantity']; - $row['total_wt'] = Tools::ps_round($totalPriceByProductTaxIncl, _PS_PRICE_COMPUTE_PRECISION_) * (int)$row['cart_quantity']; + $row['total'] = Tools::ps_round($totalPriceByProductTaxExcl, _PS_PRICE_COMPUTE_PRECISION_); + $row['total_wt'] = Tools::ps_round($totalPriceByProductTaxIncl, _PS_PRICE_COMPUTE_PRECISION_); break; } } else {