From 4dfef24f2fed6f45954962ad7af16e8b9ca0fa34 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 30 Jun 2024 15:03:52 +0200 Subject: [PATCH] Doc --- htdocs/core/class/commonobject.class.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 22667bcd6bd..a30a3b6ea51 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3855,11 +3855,9 @@ abstract class CommonObject $fieldup = 'pu_ht'; } if ($this->element == 'expensereport') { - // force rounding mode to 1 - // otherwise when you set MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND to 1 - // you have 2 lines with same TTC amounts (6,2 Unit price TTC and VAT rate 20%) - // on the first line you got 5,17 on HT total - // when you got 5,16 on HT total and 1,04 on VAT total to get 6,20 on TTT total (see #30051) + // Force rounding mode to '0', otherwise when you set MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND to 1, you may have lines with different totals. + // For example, if you have 2 lines with same TTC amounts (6,2 Unit price TTC and VAT rate 20%), on the first line you got 5,17 on HT total + // and 5,16 on HT total and 1,04 on VAT total to get 6,20 on TTT total on second line (see #30051). $forcedroundingmode = '0'; $fieldup = 'value_unit'; $base_price_type = 'TTC';