invoiceninja / admin-portal

Invoice Ninja: Desktop/mobile admin portal built with Flutter
https://demo.invoiceninja.com
Other
1.6k stars 535 forks source link

Wrong calc of subtotal #405

Closed curzon01 closed 2 years ago

curzon01 commented 2 years ago

What version of Invoice Ninja are you running? ie v4.5.25 / v5.0.30 v5.3.49-C73

What environment are you running? self-hosting

Have you checked log files (storage/logs/) Please provide redacted output irrelevant

Have you searched existing issues? yes, see also invoiceninja/invoiceninja#4071

Have you reported this to Slack/forum before posting? no

Describe the bug In case of non-integer quantities, the subtotal deviates greatly from the sum of the individual line totals, which adds up to a considerable error with further positions. Even more, the display in the invoice overview shows also the different values.

Steps To Reproduce create an invoice with integer amounts divisible by three and non-integer quantities of 1/3 as 0.33333. The individual values are correct, the subtotal on customer invoice is not - the invoice overview table is correct where the subtotal on details are not.

Expected behavior Subtotal should be the sum of displayed (already rounded) line totals

Screenshots Bildschirmfoto vom 2022-01-26 12-56-30 Bildschirmfoto vom 2022-01-26 12-58-54

Additional context

(v5) Can you replicate the issue on our demo site? https://demo.invoiceninja.com yes, draft invoice 0026

Bildschirmfoto vom 2022-01-26 12-57-22

hillelcoren commented 2 years ago

Hi,

Thanks for catching this, it will be corrected in the next release.