Ivan Yelizariev
authored
If we mix two types of global discounts, then one of the line is recomputed again and messes up all the numbers. STEPS: * configure global discount 10% and "discount on order" via coupons * Open POS > Add Large Meeting Table $ 3600 * Apply coupon, then apply global discount The problem happens because `baseToDiscount` already includes "discount on order", which is later recomputed again at https://github.com/odoo/odoo/blob/a3c236ef0e047127583f6565461f0b90781584e4/addons/pos_loyalty/static/src/js/Loyalty.js#L452-L455 BEFORE: ``` Large Meeting Table: $3600.00 [DISC] Discount (10%, No tax): -$324.00 10% on you order: -$327.60 ``` AFTER: ``` Large Meeting Table: $3600.00 [DISC] Discount (10%, No tax): -$324.00 10% on you order: -$360 ``` The problem is not reproduced in 16.2 since the following refactoring https://github.com/odoo/odoo/commit/c7fbae7a343dd90f8449ed94530f1fa2e6070690 opw-3187406 closes odoo/odoo#113762 Signed-off-by:Ivan Elizaryev (iel) <iel@odoo.com>
Name | Last commit | Last update |
---|