Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/47995 incorrect precision #364

Merged
merged 2 commits into from
Sep 27, 2024
Merged

Conversation

bogdan202
Copy link
Collaborator

Questions Answers
Description? The module tries to refund an incorrect amount
Type? bug fix / improvement / new feature / refacto / critical
BC breaks? yes / no
Deprecations? yes / no
Fixed ticket? Fixes #{issue number here}.
How to test? PrestaShop 1.7.7 or higher. Default currency is JPY. Create an order and pay it with EUR. Update order status to 'Refund'

@bogdan202 bogdan202 changed the base branch from master to develop September 18, 2024 13:45
@bogdan202 bogdan202 requested a review from kgleizes September 18, 2024 13:56
@bogdan202 bogdan202 added the bug label Sep 18, 2024
@bogdan202 bogdan202 added this to the 6.4.3 milestone Sep 18, 2024
@@ -50,7 +49,7 @@ public function calculate($params)
}

foreach ($params['productList'] as $product) {
$amount += \Tools::ps_round($product['amount'], PayPal::getPrecision());
$amount += (float) $product['amount'];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Bogdan, i don't really understand why we remove the round with precision after changing it on paypal.php main class.

Why we don't use it once corrected with correct currency ?

Rounding is almost done after adding every product to the count (in another function) ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bogdan202 bogdan202 merged commit 9cb3deb into develop Sep 27, 2024
7 checks passed
@bogdan202 bogdan202 deleted the bugfix/47995-incorrect-precision branch September 27, 2024 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants