upgrade first session to flightphp
This commit is contained in:
+16
-7
@@ -16,9 +16,9 @@ declare(strict_types=1);
|
||||
|
||||
/*************************** FORMAT ANGKA / CURRENCY *****************************/
|
||||
|
||||
if (!function_exists('rupiah')) {
|
||||
function rupiah($angka = 0, $desi = 0) {
|
||||
return number_format(doubleval($angka), intval($desi), ",", ".");
|
||||
if (!function_exists('rupiah')) {//oke
|
||||
function rupiah(string|float $angka = 0, int $desi = 0) {
|
||||
return number_format((float)$angka, $desi, ",", ".");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,10 +58,10 @@ if (!function_exists('kurung2')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('uang')) {
|
||||
function uang($angka = 0, $desi = 0) {
|
||||
$angka = str_replace(",","",$angka);
|
||||
return number_format(doubleval($angka), intval($desi));
|
||||
if (!function_exists('uang')) {//oke
|
||||
function uang(string|float $angka = '0', int $desi = 0) {
|
||||
$angka = str_replace(",", "", (string)$angka);
|
||||
return number_format((float)$angka, $desi);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,4 +350,13 @@ if (!function_exists('format_bytes')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('random_color')) {
|
||||
function random_color($trans = "0.6") {
|
||||
$col_r = mt_rand( 0, 255 );
|
||||
$col_g = mt_rand( 0, 255 );
|
||||
$col_b = mt_rand( 0, 255 );
|
||||
return "rgba(".$col_r.",".$col_g.",".$col_b.",".$trans.")";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user