From: Joe Hunt Date: Sun, 25 Jul 2021 22:16:11 +0000 (+0200) Subject: function money_format is deprecated in aove PHP 7.4. Replaced with price_format. X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=de3d40183070c76a9a9ad8451233c25bdf385ea3 function money_format is deprecated in aove PHP 7.4. Replaced with price_format. --- diff --git a/includes/current_user.inc b/includes/current_user.inc index b8cb5678..ac5f943e 100644 --- a/includes/current_user.inc +++ b/includes/current_user.inc @@ -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 //-------------------------------------------------------------------- diff --git a/reporting/includes/pdf_report.inc b/reporting/includes/pdf_report.inc index 97cb599f..0d699731 100644 --- a/reporting/includes/pdf_report.inc +++ b/reporting/includes/pdf_report.inc @@ -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;