function money_format is deprecated in aove PHP 7.4. Replaced with price_format.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 25 Jul 2021 22:16:11 +0000 (00:16 +0200)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 25 Jul 2021 22:16:11 +0000 (00:16 +0200)
includes/current_user.inc
reporting/includes/pdf_report.inc

index b8cb5678ae1805a593aa5de7efa8ea340437d1a0..ac5f943e49c36db9d6b74c30dd71056ccf56021d 100644 (file)
@@ -366,14 +366,6 @@ function price_decimal_format($number, &$dec)
        }
        return number_format2($number, $dec);
 }
-// function money_format doesn't exist in OS Win. It is also deprecated above php 7.4.
-if (!function_exists('money_format'))
-{
-       function money_format($format, $number) 
-       {
-               return price_format($number);
-       } 
-}      
 
 // 2008-06-15. Added extra parameter $stock_id and reference for $dec
 //--------------------------------------------------------------------
index 97cb599f8a66c56d621d8359e269aeade5646b75..0d699731e75fbbdeaf80ac54f3a215b4e2031b1a 100644 (file)
@@ -773,7 +773,7 @@ class FrontReport extends Cpdf
                setlocale(LC_MONETARY, $amount_locale);
                if ($color_red && $txt < 0)
                        $this->SetTextColor(255, 0, 0);
-               $ret = $this->TextCol($c, $n, money_format($amount_format, $txt), $corr, $r, $border, $fill, $link, $stretch);
+               $ret = $this->TextCol($c, $n, price_format($txt), $corr, $r, $border, $fill, $link, $stretch);
                if ($color_red && $txt < 0)
                        $this->SetTextColor(0, 0, 0);
                return $ret;