ecino
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
8 additions and
0 deletions
-
account_bank_statement_import_camt/models/parser.py
|
@ -76,6 +76,14 @@ class CamtParser(models.AbstractModel): |
|
|
transaction, 'ref' |
|
|
transaction, 'ref' |
|
|
) |
|
|
) |
|
|
amount = self.parse_amount(ns, node) |
|
|
amount = self.parse_amount(ns, node) |
|
|
|
|
|
|
|
|
|
|
|
# Tx conversion devise |
|
|
|
|
|
xchgrate = node.xpath( |
|
|
|
|
|
'../../ns:AmtDtls/ns:TxAmt/ns:CcyXchg/ns:XchgRate', namespaces={'ns': ns}) |
|
|
|
|
|
# If there is a tx, then we do the conversion |
|
|
|
|
|
if xchgrate: |
|
|
|
|
|
amount = amount * float(xchgrate[0].text) |
|
|
|
|
|
|
|
|
if amount != 0.0: |
|
|
if amount != 0.0: |
|
|
transaction['amount'] = amount |
|
|
transaction['amount'] = amount |
|
|
# remote party values |
|
|
# remote party values |
|
|