[FIX] account: reconciliation model with Tax 0
- Create the following reconciliation model: Line 1 is 50% of amount, tax is 20% Line 2 is 50% of amount, tax is 0% - Use this reconciliation model to reconcile an amount of 1000. 4 lines are created: - 2 lines for base amount (500) - 1 line for the 20% tax (100) - 1 line for the 0% tax (1000) Obviously, the last line is incorrect, and should be 0. opw-1837049
This commit is contained in:
committed by
Nicolas Martinelli
parent
c2fec7ed88
commit
37a901c061
@@ -964,6 +964,7 @@ var StatementModel = BasicModel.extend({
|
||||
var formatOptions = {
|
||||
currency_id: line.st_line.currency_id,
|
||||
};
|
||||
var amount = values.amount !== undefined ? values.amount : line.balance.amount;
|
||||
var prop = {
|
||||
'id': _.uniqueId('createLine'),
|
||||
'label': values.label || line.st_line.name,
|
||||
@@ -975,8 +976,7 @@ var StatementModel = BasicModel.extend({
|
||||
'debit': 0,
|
||||
'credit': 0,
|
||||
'base_amount': values.amount_type !== "percentage" ?
|
||||
(values.amount || line.balance.amount) :
|
||||
line.balance.amount * values.amount / 100,
|
||||
(amount) : line.balance.amount * values.amount / 100,
|
||||
'percent': values.amount_type === "percentage" ? values.amount : null,
|
||||
'link': values.link,
|
||||
'display': true,
|
||||
|
||||
Reference in New Issue
Block a user