[FIX] web: Wrong comparison in invoice analyes
Steps to reproduce the bug: Let's consider that we are in 2019 - Create two customer invoices: I1 and I2 - I1 with invoice date = 2 april 2019 and amount = 100€ - I2 with invoice date = 2 april 2018 and amount = 1000€ - Go to Reporting > Invoices - Click on widget "Time Ranges" and set "Based on" Invoice Date and "Range" This Year "Compare To" Previous Year Bug: The untaxed total for previous year was 1100€ instead of 1000€ because it counted previous year and this year. opw:1962027 closes odoo/odoo#32331 Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This commit is contained in:
@@ -258,8 +258,8 @@ var Domain = collections.Tree.extend({
|
||||
});
|
||||
break;
|
||||
case 'previous_year':
|
||||
leftBoundaryParams.years = leftBoundaryParams.years ? leftBoundaryParams.years-- : -1;
|
||||
rightBoundaryParams.years = rightBoundaryParams.years ? rightBoundaryParams.years-- : -1;
|
||||
leftBoundaryParams.years = leftBoundaryParams.years ? leftBoundaryParams.years - 1 : -1;
|
||||
rightBoundaryParams.years = rightBoundaryParams.years ? rightBoundaryParams.years - 1 : -1;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user