Please sign in to comment.
[FIX] account_voucher: round globally
- Enable multi-currency. Company currency = USD, another currency = SGD - Update the exchange rate - Create a purchase journal. Assign SGD to this journal - Create a purchase tax of 7.00 % - Enable tax rounding globally - Create a purchase receipt with the following values 62.04 @ 7% tax 7.29 @ 7% tax An error occurs: 'Cannot create unbalanced journal entry.' Each line of the receipt creates its own tax line, which is therefore rounded => the total of the receipt is computed with a 'round globally' configuration, while the taxes are computed with a 'round per line' configuration. This is because `apply_taxes=True` is set in the context. This creates the tax line by forcing the rounding. Therefore, we call the method `_apply_taxes` explicitly in this specific case, and manually round the taxes once they are merged. opw-1938623 closes #31194
- Loading branch information...
Showing with 32 additions and 1 deletion.