From e5e726b31072bcf1376cb7eda11fd57edb5bdfbb Mon Sep 17 00:00:00 2001 From: sparkyx Date: Sat, 29 Oct 2022 10:46:17 +0200 Subject: [PATCH] Fix : bug when of rounding number TOTAL_VEN_TVAC when generating an invoice --- include/class/document.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/class/document.class.php b/include/class/document.class.php index 65b903ca9..ffa42fcc7 100644 --- a/include/class/document.class.php +++ b/include/class/document.class.php @@ -1282,6 +1282,8 @@ class Document $sell=$p_array['e_march'.$i.'_price']; $qt=$p_array['e_quant'.$i]; $tot=bcmul($sell, $qt); + $tva_amount=round($tva_amount,2); + $tot=round($tot,2); $tot=bcadd($tot, $tva_amount); $sum=bcadd($sum, $tot); }