In this commit we fix the tax calculation
when applying a global discount in PoS.
Before this commit, when applying a discount
tax was calculated properly only in the use
case where in one order we had:
- products with a single one tax
After this commit, the calculation of discount
and taxes is extendeted to include these additonal
use cases:
- products with more than one tax applied to them
ex. Product A -> 10% + 20%
- products with different taxes in the same order
ex. Product A -> 10%
Product B -> 20%
- products with taxes that are included in prices
ex. Product A -> 10% (included in price) + 20%
Overall, we tried to follow a general approach
that will include as many use cases as possible
and every combination between them.
task-2421429
closesodoo/odoo#90505
Signed-off-by: Masereel Pierre <pim@odoo.com>