Maths Issue Everywhere

Hi,

I want to sell item with 3 qties for 100. or similar cases i’ve where maths issue i am facing,
i tried every single Currency Precision for this but still not worked.
this is very big problem for me.

The adjustment happens in the later sections if you have Rounded Total enabled:

@harshit-30 thanks for your reply, but in my case rounded total is disabled, because most of my items have prices in decimals, like 1.6, 2.4
so if i enable rounded total, it do 1.5 for 1.6 which is loss,
for 2.4 it do 2.5 which is not acceptable by customer.
the examples are above, i’ve alots of item in single invoice, so all calculation are messing up.

The rounding is not applicable to the Qty field, it applies to currency field types only. Can you please recheck?

Yes i know it only for currency fields, thats the problem,
i just want to sell 3 qty items in 100. so rate should be 33.3333333333 which is i am not able to enter in item table.

You can customize rate field to follow 9 decimal which is the max, but still it will not get what you need.

It is now a problem for the system its just a mathematical challenge which is always part of every computer.

Do you have any solution for this?

I think the solution is not to limit currency fields to 9 decimals.

Hahaha good solution.
Do you know how many decimals are there in any calculator?
Max 4 just because it is a software doesn’t mean we can have as many decimals we want.

It all depends on how much the database can take and how much competing power will be needed to calculate that.

Developers cannot take a risk of having a slow system or unstable system just to fulfill such rare case scenarios.

No hard feelings though.
Best way is to change the price to 99 and sell it for 99.
Or
handle it with rounding off.

Call is yours.

1 Like

I solved the issue by setting Rate field’s precision to 9 and amount precision to 2.

wow fantastic! Would you mind sharing some more tips about it?

@DaleKristen welcome to erpnext,
what do you want to know more about it?
goto customize form, then select sales invoice item,
open rate field, there you can find precision field, by default its blank, change it to 9.
thats all.

1 Like

Thank you so much for the details. I will definitely it.