How can I use number_to_currency
and make it delete the zeros in the decimal part?
So if I have a number 30.50, I want to keep the .50, but if I have 30.00, I want to delete those zeros. I see the precision, but I don't know if I can use it conditionally to just be applied if the trailing decimals are zeros...
Thanks
strip_insignificant_zeros
. So you can do something likenumber_to_currency(amount, precision: 2, strip_insignificant_zeros: false)
– Pekan