Currency column automatically rounding to the nearest dollar
Currency column automatically rounding to the nearest dollar
marcusa007
Posts: 26Questions: 4Answers: 0
I have been searching for a while now and can't find where to fix this. I have 2 columns in editor that hold currency but every time I enter a dollar amount with decimals it rounds to the full dollar. I need it to do that at the penny level or not at all. I am sure it is just a setting somewhere but can't find it. Can someone please point me in the right direction. Thanks.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
this is what I currently have:
{ data: "vendor_billing.invoice_amt", render: $.fn.dataTable.render.number( ',', '.', 2, '$' ) }
Could you link me to the page please? Also, if you aren't using 1.10.13 could you update to that version.
Thanks,
Allan
I just updated to the new version. I have it on a local environment. Can I send you the code.
I sent the info to get into the page in a private message.
Thanks
Thanks for the link. So the issue is that the data from the server is something like:
invoice_amt: "550"
which is what Editor is editing. Editor edits the raw data, not the rendered data.The best thing to do would be to return a 2 decimal place number from the server in the
Billing
ajax request.Allan
You're a savor. You pointed me in the right direction. It was the database, the column was set to decimal (10,0) and switching it to float fixed the problem.
Thanks