Skip to content

Total price calculation is wrong #344

@htulibacki

Description

@htulibacki

It is not a good idea to round price with tax after summing it, becouse this could give you a wrong result. For example:

Product price Tax Product Price With Tax Qty Product Total
48.7 23% 59.901 3 179.703
40,57 23% 49.9011 5 249.5055
44.63 23% 54.8949 1 54.8949
- - - - 484.1034

When you round the total price to two digits, it will give you 484.10, and that is ok.

But in your store you want to present clients prices rounded to two digits, and the above table will look like this:

Product price Tax Product Price With Tax Qty Product Total
48.7 23% 59.90 3 179.7
40,57 23% 49.90 5 249.5
44.63 23% 54.89 1 54.89
- - - - 484.09

As you can see, the total price differs by 0.01, and there is no way to get the correct result.

Nevertheless, thank you for all your hard work, and i hope you will find a way to correct this soon :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions