fix(helper): memperbaiki replaceCurrency

This commit is contained in:
Yoga Pangestu 2025-10-27 19:23:09 +07:00
parent 2537b64e6d
commit 406e0efeed

View File

@ -22,7 +22,13 @@ function replaceCurrency(?string $value = null)
return null;
}
return (int) Str::replace('.', '', $value);
$cleaned = Str::of($value)
->replace('Rp', '')
->replace('.', '')
->replace(' ', '')
->__toString();
return (int) $cleaned;
}
}