From f09e8916c351f00f01f5267fef0ca081c86cce0b Mon Sep 17 00:00:00 2001 From: Lucas Marcouiller <45882981+Hystepik@users.noreply.github.com> Date: Fri, 27 Feb 2026 14:36:28 +0100 Subject: [PATCH] Fix bad rounding when spliting discounts (#37354) * Fix bad rounding when spliting discounts * fix ci --------- Co-authored-by: Lucas Marcouiller --- htdocs/comm/remx.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index c60be020eb9..4b7e9069787 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -84,7 +84,7 @@ if ($action == 'confirm_split' && GETPOST("confirm", "alpha") == 'yes' && $permi $error++; setEventMessages($langs->trans("ErrorFailedToLoadDiscount"), null, 'errors'); } - if (!$error && price2num((float) $amount_ttc_1 + (float) $amount_ttc_2) != $discount->amount_ttc) { + if (!$error && price2num((float) $amount_ttc_1 + (float) $amount_ttc_2, 'MT') != $discount->amount_ttc) { $error++; setEventMessages($langs->trans("TotalOfTwoDiscountMustEqualsOriginal"), null, 'errors'); }