From 755e857979001169a62698665a37d0d1dee0589a Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Wed, 9 Aug 2023 10:49:29 +0700 Subject: [PATCH] Add Money Format to Class --- system/autoload/Lang.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/system/autoload/Lang.php b/system/autoload/Lang.php index dc9292f6..15894492 100644 --- a/system/autoload/Lang.php +++ b/system/autoload/Lang.php @@ -4,12 +4,21 @@ * PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/) **/ -class Lang { - public static function T($var) { +class Lang +{ + public static function T($var) + { return Lang($var); } - public static function htmlspecialchars($var) { + public static function htmlspecialchars($var) + { return htmlspecialchars($var); } + + public static function moneyFormat($var) + { + global $config; + return $config['currency_code'] . ' ' .number_format($var, 0, $config['dec_point'], $config['thousands_sep']); + } }