feat(helper): menambahkan fungsi baru yaitu remove decimal
This commit is contained in:
parent
e4b0c84180
commit
9321783452
@ -14,8 +14,13 @@ function removeRupiahFormatting($value)
|
||||
if (! function_exists('formatToRupiah')) {
|
||||
function formatToRupiah($value)
|
||||
{
|
||||
$valueFormatted = 'Rp'.number_format($value, 2, ',', '.');
|
||||
|
||||
return $valueFormatted;
|
||||
return 'Rp'.number_format($value, 0, ',', '.');
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('decimalToInteger')) {
|
||||
function decimalToInteger($value)
|
||||
{
|
||||
return number_format($value, 0, ',', '.');
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user