4 Replies
Hmm yeah it's because
bcdiv
doesn't have a scale
set so it defaults to 0 (or whatever you have set). Not sure if this is a bug or intended
@Abishek you can try using bcscale
(https://www.php.net/manual/en/function.bcscale.php) to set it to 2 somewhere in your app
Somewhere in the boot
method or soemething. It should solve your issuevendor/filament/support/src/helpers.php
You could send a PR..Thank you. Looking into it now
created the PR https://github.com/filamentphp/filament/pull/9131
GitHub
add scale to bcdiv to fix format_money method to include decimal va...
Fixes the format_money helper to use 2 decimal points when dividing
with the current implementation
Filament\Support\format_money(490, 'usd',100);
//returns $4.00 instead of $4.90
with th...