|
@ -65,6 +65,7 @@ class CamtParser(models.AbstractModel): |
|
|
ns, node, [ |
|
|
ns, node, [ |
|
|
'./ns:RmtInf/ns:Strd/ns:CdtrRefInf/ns:Ref', |
|
|
'./ns:RmtInf/ns:Strd/ns:CdtrRefInf/ns:Ref', |
|
|
'./ns:Refs/ns:EndToEndId', |
|
|
'./ns:Refs/ns:EndToEndId', |
|
|
|
|
|
'./ns:Ntry/ns:AcctSvcrRef' |
|
|
], |
|
|
], |
|
|
transaction, 'ref' |
|
|
transaction, 'ref' |
|
|
) |
|
|
) |
|
@ -135,6 +136,7 @@ class CamtParser(models.AbstractModel): |
|
|
ns, node, [ |
|
|
ns, node, [ |
|
|
'./ns:NtryDtls/ns:RmtInf/ns:Strd/ns:CdtrRefInf/ns:Ref', |
|
|
'./ns:NtryDtls/ns:RmtInf/ns:Strd/ns:CdtrRefInf/ns:Ref', |
|
|
'./ns:NtryDtls/ns:Btch/ns:PmtInfId', |
|
|
'./ns:NtryDtls/ns:Btch/ns:PmtInfId', |
|
|
|
|
|
'./ns:NtryDtls/ns:TxDtls/ns:Refs/ns:AcctSvcrRef' |
|
|
], |
|
|
], |
|
|
transaction, 'ref' |
|
|
transaction, 'ref' |
|
|
) |
|
|
) |
|
@ -205,6 +207,12 @@ class CamtParser(models.AbstractModel): |
|
|
for entry_node in entry_nodes: |
|
|
for entry_node in entry_nodes: |
|
|
transactions.extend(self.parse_entry(ns, entry_node)) |
|
|
transactions.extend(self.parse_entry(ns, entry_node)) |
|
|
result['transactions'] = transactions |
|
|
result['transactions'] = transactions |
|
|
|
|
|
result['date'] = None |
|
|
|
|
|
if transactions: |
|
|
|
|
|
result['date'] = sorted(transactions, |
|
|
|
|
|
key=lambda x: x['date'], |
|
|
|
|
|
reverse=True |
|
|
|
|
|
)[0]['date'] |
|
|
return result |
|
|
return result |
|
|
|
|
|
|
|
|
def check_version(self, ns, root): |
|
|
def check_version(self, ns, root): |
|
|