Correct sign for debit amount

This commit is contained in:
Matthieu Dietrich
2016-07-06 16:25:54 +02:00
committed by Florian da Costa
parent 9baf2ff197
commit ebda3349a4

View File

@@ -76,7 +76,7 @@ class GenericFileParser(FileParser):
'name': line.get('label', '/'), 'name': line.get('label', '/'),
'date_maturity': line.get('date', datetime.datetime.now().date()), 'date_maturity': line.get('date', datetime.datetime.now().date()),
'credit': amount > 0.0 and amount or 0.0, 'credit': amount > 0.0 and amount or 0.0,
'debit': amount < 0.0 and amount or 0.0, 'debit': amount < 0.0 and -amount or 0.0,
'account_id': account_id, 'account_id': account_id,
'partner_id': partner_id, 'partner_id': partner_id,
} }