I have an amount like 10 digits "1234567328.899"
I want to show as currency with commas in it like this:.
"$1,234,567,328.899".
I had written a standalone module to do that, it was working
partition_float(N,P,FP,L) ->
F = tl(tl(hd(io_lib:format("~.*f",[L,N-trunc(N)])))),
lists:flatten([partition_integer(trunc(N),P),FP,F]).
partition_float(Data, $,, $., 6).%% Where Data is ["1234567328.899", ""1217328.89", "67328", ...]
It was running successfully as a stand alone but when insert to the project of a chicagoboss, It's throwing following error.
[{"c:/Users/Dey/InheritanceTax/inheritance_tax/src/lib/data_util.erl",[{575,erl_lint,{call_to_redefined_old_bif,{trunc,1}}},{576,erl_lint,{call_to_redefined_old_bif,{trunc,1}}}]}]