feat(helper): menambahkan fungsi baru yaitu remove decimal

This commit is contained in:
Yoga Pangestu 2024-11-25 17:31:40 +07:00
parent e4b0c84180
commit 9321783452

View File

@ -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, ',', '.');
}
}