-
- Downloads
FIX: excl. tax price not properly rounded
When adding a 'free line' product or service in a supplier invoice, the amount excluding tax (HT) is not properly rounded, in particular when calculated from full tax price. This leads to inconsistencies in results when using large quantities or small precision in settings. Test case : with default settings MAIN_MAX_DECIMALS_UNIT = 5 MAIN_MAX_DECIMALS_TOT = 2 MAIN_MAX_DECIMALS_SHOWN = 8 Add in a new invoice a free product with 13.33 TTC (full tax), quantity 1, save, then edit the line with quantity 10111 Now in another invoice, add a free product with 13.33 TTC (full tax), quantity 10111, save. Exact same data in the two invoices, but Tax and grand total are different, and false in second case because computed before rounding. Also removed some direct access to $_POST array.
Please register or sign in to comment