Use better name for the invoice account variable to compute remainder amount
This commit is contained in:
1 parent
6d5879cdb3
commit
2b9e1086a5
1 file changed
+2
-2
@@ -309,9 +309,9 @@ class InvoiceDeferred(Workflow, ModelSQL, ModelView):
|
||||
def amount_remainder(self):
|
||||
balance = 0
|
||||
for move in self.moves:
|
||||
income_account = self.invoice_line.account.current(move.date)
|
||||
invoice_account = self.invoice_line.account.current(move.date)
|
||||
for line in move.lines:
|
||||
if line.account == income_account:
|
||||
if line.account == invoice_account:
|
||||
balance += line.debit - line.credit
|
||||
return balance
|
||||
|
||||
|
||||
Reference in new issue
Block a user