From 59b18a0398986624da017eb836126af1bcc33ae7 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Mon, 1 May 2023 16:06:04 +0200 Subject: [PATCH] =?UTF-8?q?Bug#2271:=20Banque=20:=20totaux=20non=20v=C3=A9?= =?UTF-8?q?rifi=C3=A9,arrondi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/class/acc_ledger_fin.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/class/acc_ledger_fin.class.php b/include/class/acc_ledger_fin.class.php index 30dd05b08..5ad81d64e 100644 --- a/include/class/acc_ledger_fin.class.php +++ b/include/class/acc_ledger_fin.class.php @@ -217,9 +217,9 @@ class Acc_Ledger_Fin extends Acc_Ledger if (noalyss_strlentrim($last_sold)!=0&&isNumber($last_sold)&&noalyss_strlentrim($first_sold)!=0&&isNumber($first_sold) ) { - $diff=bcsub($last_sold,$first_sold); - $diff=round($diff, 2)-round($tot_amount, 2); - $calc=bcadd($first_sold, $tot_amount, 4); + $diff=bcsub($last_sold,$first_sold,2); + $diff=bcsub($diff,$tot_amount,2); + $calc=bcadd($first_sold, $tot_amount, 2); if ($first_sold!=0||$last_sold!=0) { if ($diff!=0)