From 80ced1cc221e5601435473e6101d2961c167c61e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 14 Oct 2024 12:53:42 +0200 Subject: [PATCH] FIX convert amount into text when using numberwords --- htdocs/core/lib/functionsnumtoword.lib.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/htdocs/core/lib/functionsnumtoword.lib.php b/htdocs/core/lib/functionsnumtoword.lib.php index 7e16ff46de1d8..f349368078a72 100644 --- a/htdocs/core/lib/functionsnumtoword.lib.php +++ b/htdocs/core/lib/functionsnumtoword.lib.php @@ -36,8 +36,6 @@ */ function dol_convertToWord($num, $langs, $currency = '', $centimes = false) { - global $conf; - //$num = str_replace(array(',', ' '), '', trim($num)); This should be useless since $num MUST be a php numeric value if (!$num) { return false; @@ -48,13 +46,7 @@ function dol_convertToWord($num, $langs, $currency = '', $centimes = false) } if (isModEnabled('numberwords')) { - if ($currency) { - $type = '1'; - } else { - $type = '0'; - } - - $concatWords = $langs->getLabelFromNumber($num, $type); + $concatWords = $langs->getLabelFromNumber($num, $currency); return $concatWords; } else { $TNum = explode('.', (string) $num);