sbejaoui
6 years ago
4 changed files with 717 additions and 3 deletions
-
68account_bank_statement_import_camt_oca/models/account_bank_statement_import.py
-
41account_bank_statement_import_camt_oca/models/parser.py
-
581account_bank_statement_import_camt_oca/test_files/test-camt053-more-than-one-xml
-
30account_bank_statement_import_camt_oca/tests/test_import_bank_statement.py
@ -0,0 +1,581 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.053.001.02"> |
|||
<BkToCstmrStmt> |
|||
<GrpHdr> |
|||
<MsgId>TESTBANK/NL/1420561226673</MsgId> |
|||
<CreDtTm>2014-01-06T16:20:26.673Z</CreDtTm> |
|||
</GrpHdr> |
|||
<Stmt> |
|||
<Id>1234Test/1</Id> |
|||
<LglSeqNb>2</LglSeqNb> |
|||
<CreDtTm>2014-01-06T16:20:26.673Z</CreDtTm> |
|||
<FrToDt> |
|||
<FrDtTm>2014-01-05T00:00:00.000Z</FrDtTm> |
|||
<ToDtTm>2014-01-05T23:59:59.999Z</ToDtTm> |
|||
</FrToDt> |
|||
<Acct> |
|||
<Id> |
|||
<IBAN>NL77ABNA0574908765</IBAN> |
|||
</Id> |
|||
<Nm>Example company</Nm> |
|||
<Svcr> |
|||
<FinInstnId> |
|||
<BIC>ABNANL2A</BIC> |
|||
</FinInstnId> |
|||
</Svcr> |
|||
</Acct> |
|||
<Bal> |
|||
<Tp> |
|||
<CdOrPrtry> |
|||
<Cd>OPBD</Cd> |
|||
</CdOrPrtry> |
|||
</Tp> |
|||
<Amt Ccy="EUR">15568.27</Amt> |
|||
<CdtDbtInd>CRDT</CdtDbtInd> |
|||
<Dt> |
|||
<Dt>2014-01-05</Dt> |
|||
</Dt> |
|||
</Bal> |
|||
<Bal> |
|||
<Tp> |
|||
<CdOrPrtry> |
|||
<Cd>CLBD</Cd> |
|||
</CdOrPrtry> |
|||
</Tp> |
|||
<Amt Ccy="EUR">15121.12</Amt> |
|||
<CdtDbtInd>CRDT</CdtDbtInd> |
|||
<Dt> |
|||
<Dt>2014-01-05</Dt> |
|||
</Dt> |
|||
</Bal> |
|||
<Ntry> |
|||
<Amt Ccy="EUR">754.25</Amt> |
|||
<CdtDbtInd>DBIT</CdtDbtInd> |
|||
<Sts>BOOK</Sts> |
|||
<BookgDt> |
|||
<Dt>2014-01-05</Dt> |
|||
</BookgDt> |
|||
<ValDt> |
|||
<Dt>2014-01-05</Dt> |
|||
</ValDt> |
|||
<BkTxCd> |
|||
<Domn> |
|||
<Cd>PMNT</Cd> |
|||
<Fmly> |
|||
<Cd>RDDT</Cd> |
|||
<SubFmlyCd>ESDD</SubFmlyCd> |
|||
</Fmly> |
|||
</Domn> |
|||
<Prtry> |
|||
<Cd>EI</Cd> |
|||
</Prtry> |
|||
</BkTxCd> |
|||
<NtryDtls> |
|||
<TxDtls> |
|||
<Refs> |
|||
<InstrId>INNDNL2U20141231000142300002844</InstrId> |
|||
<EndToEndId>435005714488-ABNO33052620</EndToEndId> |
|||
<MndtId>1880000341866</MndtId> |
|||
</Refs> |
|||
<AmtDtls> |
|||
<TxAmt> |
|||
<Amt Ccy="EUR">754.25</Amt> |
|||
</TxAmt> |
|||
</AmtDtls> |
|||
<RltdPties> |
|||
<Cdtr> |
|||
<Nm>INSURANCE COMPANY TESTX</Nm> |
|||
<PstlAdr> |
|||
<StrtNm>TEST STREET 20</StrtNm> |
|||
<TwnNm>1234 AB TESTCITY</TwnNm> |
|||
<Ctry>NL</Ctry> |
|||
</PstlAdr> |
|||
</Cdtr> |
|||
<CdtrAcct> |
|||
<Id> |
|||
<IBAN>NL46ABNA0499998748</IBAN> |
|||
</Id> |
|||
</CdtrAcct> |
|||
</RltdPties> |
|||
<RltdAgts> |
|||
<CdtrAgt> |
|||
<FinInstnId> |
|||
<BIC>ABNANL2A</BIC> |
|||
</FinInstnId> |
|||
</CdtrAgt> |
|||
</RltdAgts> |
|||
<RmtInf> |
|||
<Ustrd>Insurance policy 857239PERIOD 01.01.2014 - 31.12.2014</Ustrd> |
|||
</RmtInf> |
|||
<AddtlTxInf>MKB Insurance 859239PERIOD 01.01.2014 - 31.12.2014</AddtlTxInf> |
|||
</TxDtls> |
|||
</NtryDtls> |
|||
</Ntry> |
|||
<Ntry> |
|||
<Amt Ccy="EUR">664.05</Amt> |
|||
<CdtDbtInd>DBIT</CdtDbtInd> |
|||
<RvslInd>true</RvslInd> |
|||
<Sts>BOOK</Sts> |
|||
<BookgDt> |
|||
<Dt>2014-01-05</Dt> |
|||
</BookgDt> |
|||
<ValDt> |
|||
<Dt>2014-01-05</Dt> |
|||
</ValDt> |
|||
<BkTxCd> |
|||
<Domn> |
|||
<Cd>PMNT</Cd> |
|||
<Fmly> |
|||
<Cd>IDDT</Cd> |
|||
<SubFmlyCd>UPDD</SubFmlyCd> |
|||
</Fmly> |
|||
</Domn> |
|||
<Prtry> |
|||
<Cd>EIST</Cd> |
|||
</Prtry> |
|||
</BkTxCd> |
|||
<NtryDtls> |
|||
<Btch> |
|||
<MsgId>2014/125</MsgId> |
|||
<PmtInfId>2018/125-20141229-NORM</PmtInfId> |
|||
<NbOfTxs>2</NbOfTxs> |
|||
<TtlAmt Ccy="EUR">664.05</TtlAmt> |
|||
<CdtDbtInd>DBIT</CdtDbtInd> |
|||
</Btch> |
|||
<TxDtls> |
|||
<Refs> |
|||
<InstrId>TESTBANK/NL/20141229/01206408</InstrId> |
|||
<EndToEndId>TESTBANK/NL/20141229/01206408</EndToEndId> |
|||
<MndtId>NL22ZZZ524885430000-C0125.1</MndtId> |
|||
</Refs> |
|||
<AmtDtls> |
|||
<TxAmt> |
|||
<Amt Ccy="EUR">564.05</Amt> |
|||
</TxAmt> |
|||
</AmtDtls> |
|||
<RltdPties> |
|||
<Cdtr> |
|||
<Nm>Test Customer</Nm> |
|||
<PstlAdr> |
|||
<Ctry>NL</Ctry> |
|||
</PstlAdr> |
|||
</Cdtr> |
|||
<CdtrAcct> |
|||
<Id> |
|||
<IBAN>NL46ABNA0499998748</IBAN> |
|||
</Id> |
|||
</CdtrAcct> |
|||
</RltdPties> |
|||
<RltdAgts> |
|||
<CdtrAgt> |
|||
<FinInstnId> |
|||
<BIC>ABNANL2A</BIC> |
|||
</FinInstnId> |
|||
</CdtrAgt> |
|||
</RltdAgts> |
|||
<RmtInf> |
|||
<Ustrd>Direct Debit S14 0410</Ustrd> |
|||
</RmtInf> |
|||
<RtrInf> |
|||
<Rsn> |
|||
<Cd>AC06</Cd> |
|||
</Rsn> |
|||
</RtrInf> |
|||
<AddtlTxInf>Direct debit S14 0410 AC07 Rek.nummer blokkade TESTBANK/NL/20141229/01206408</AddtlTxInf> |
|||
</TxDtls> |
|||
<TxDtls> |
|||
<Refs> |
|||
<InstrId>TESTBANK/NL/20141229/01206407</InstrId> |
|||
<EndToEndId>TESTBANK/NL/20141229/01206407</EndToEndId> |
|||
<MndtId>NL22ZZZ524885430000-C0125.2</MndtId> |
|||
</Refs> |
|||
<AmtDtls> |
|||
<TxAmt> |
|||
<Amt Ccy="EUR">100.00</Amt> |
|||
</TxAmt> |
|||
</AmtDtls> |
|||
<RltdPties> |
|||
<Cdtr> |
|||
<Nm>Test Customer</Nm> |
|||
<PstlAdr> |
|||
<Ctry>NL</Ctry> |
|||
</PstlAdr> |
|||
</Cdtr> |
|||
<CdtrAcct> |
|||
<Id> |
|||
<IBAN>NL46ABNA0499998748</IBAN> |
|||
</Id> |
|||
</CdtrAcct> |
|||
</RltdPties> |
|||
<RltdAgts> |
|||
<CdtrAgt> |
|||
<FinInstnId> |
|||
<BIC>ABNANL2A</BIC> |
|||
</FinInstnId> |
|||
</CdtrAgt> |
|||
</RltdAgts> |
|||
<RmtInf> |
|||
<Ustrd>Direct Debit S14 0410</Ustrd> |
|||
</RmtInf> |
|||
<RtrInf> |
|||
<Rsn> |
|||
<Cd>AC06</Cd> |
|||
</Rsn> |
|||
</RtrInf> |
|||
<AddtlTxInf>Direct debit S14 0410 AC07 Rek.nummer blokkade TESTBANK/NL/20141229/01206408</AddtlTxInf> |
|||
</TxDtls> |
|||
</NtryDtls> |
|||
</Ntry> |
|||
<Ntry> |
|||
<Amt Ccy="EUR">1405.31</Amt> |
|||
<CdtDbtInd>CRDT</CdtDbtInd> |
|||
<Sts>BOOK</Sts> |
|||
<BookgDt> |
|||
<Dt>2014-01-05</Dt> |
|||
</BookgDt> |
|||
<ValDt> |
|||
<Dt>2014-01-05</Dt> |
|||
</ValDt> |
|||
<BkTxCd> |
|||
<Domn> |
|||
<Cd>PMNT</Cd> |
|||
<Fmly> |
|||
<Cd>RCDT</Cd> |
|||
<SubFmlyCd>ESCT</SubFmlyCd> |
|||
</Fmly> |
|||
</Domn> |
|||
<Prtry> |
|||
<Cd>ET</Cd> |
|||
</Prtry> |
|||
</BkTxCd> |
|||
<NtryDtls> |
|||
<TxDtls> |
|||
<Refs> |
|||
<InstrId>INNDNL2U20140105000217200000708</InstrId> |
|||
<EndToEndId>115</EndToEndId> |
|||
</Refs> |
|||
<AmtDtls> |
|||
<TxAmt> |
|||
<Amt Ccy="EUR">1405.31</Amt> |
|||
</TxAmt> |
|||
</AmtDtls> |
|||
<RltdPties> |
|||
<Dbtr> |
|||
<Nm>3rd party Media</Nm> |
|||
<PstlAdr> |
|||
<StrtNm>SOMESTREET 570-A</StrtNm> |
|||
<TwnNm>1276 ML HOUSCITY</TwnNm> |
|||
<Ctry>NL</Ctry> |
|||
</PstlAdr> |
|||
</Dbtr> |
|||
<DbtrAcct> |
|||
<Id> |
|||
<IBAN>NL69ABNA0522123643</IBAN> |
|||
</Id> |
|||
</DbtrAcct> |
|||
</RltdPties> |
|||
<RltdAgts> |
|||
<DbtrAgt> |
|||
<FinInstnId> |
|||
<BIC>ABNANL2A</BIC> |
|||
</FinInstnId> |
|||
</DbtrAgt> |
|||
</RltdAgts> |
|||
<AddtlTxInf>#RD PARTY MEDIA CUSNO 90782 4210773</AddtlTxInf> |
|||
</TxDtls> |
|||
</NtryDtls> |
|||
</Ntry> |
|||
</Stmt> |
|||
</BkToCstmrStmt> |
|||
</Document> |
|||
|
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.053.001.02"> |
|||
<BkToCstmrStmt> |
|||
<GrpHdr> |
|||
<MsgId>TESTBANK/NL/1420561226673</MsgId> |
|||
<CreDtTm>2014-01-06T16:20:26.673Z</CreDtTm> |
|||
</GrpHdr> |
|||
<Stmt> |
|||
<Id>1234Test/1</Id> |
|||
<LglSeqNb>2</LglSeqNb> |
|||
<CreDtTm>2014-01-06T16:20:26.673Z</CreDtTm> |
|||
<FrToDt> |
|||
<FrDtTm>2014-01-05T00:00:00.000Z</FrDtTm> |
|||
<ToDtTm>2014-01-05T23:59:59.999Z</ToDtTm> |
|||
</FrToDt> |
|||
<Acct> |
|||
<Id> |
|||
<IBAN>NL77ABNA0574908765</IBAN> |
|||
</Id> |
|||
<Nm>Example company</Nm> |
|||
<Svcr> |
|||
<FinInstnId> |
|||
<BIC>ABNANL2A</BIC> |
|||
</FinInstnId> |
|||
</Svcr> |
|||
</Acct> |
|||
<Bal> |
|||
<Tp> |
|||
<CdOrPrtry> |
|||
<Cd>OPBD</Cd> |
|||
</CdOrPrtry> |
|||
</Tp> |
|||
<Amt Ccy="EUR">15568.27</Amt> |
|||
<CdtDbtInd>CRDT</CdtDbtInd> |
|||
<Dt> |
|||
<Dt>2014-01-05</Dt> |
|||
</Dt> |
|||
</Bal> |
|||
<Bal> |
|||
<Tp> |
|||
<CdOrPrtry> |
|||
<Cd>CLBD</Cd> |
|||
</CdOrPrtry> |
|||
</Tp> |
|||
<Amt Ccy="EUR">15121.12</Amt> |
|||
<CdtDbtInd>CRDT</CdtDbtInd> |
|||
<Dt> |
|||
<Dt>2014-01-05</Dt> |
|||
</Dt> |
|||
</Bal> |
|||
<Ntry> |
|||
<Amt Ccy="EUR">754.25</Amt> |
|||
<CdtDbtInd>DBIT</CdtDbtInd> |
|||
<Sts>BOOK</Sts> |
|||
<BookgDt> |
|||
<Dt>2014-01-05</Dt> |
|||
</BookgDt> |
|||
<ValDt> |
|||
<Dt>2014-01-05</Dt> |
|||
</ValDt> |
|||
<BkTxCd> |
|||
<Domn> |
|||
<Cd>PMNT</Cd> |
|||
<Fmly> |
|||
<Cd>RDDT</Cd> |
|||
<SubFmlyCd>ESDD</SubFmlyCd> |
|||
</Fmly> |
|||
</Domn> |
|||
<Prtry> |
|||
<Cd>EI</Cd> |
|||
</Prtry> |
|||
</BkTxCd> |
|||
<NtryDtls> |
|||
<TxDtls> |
|||
<Refs> |
|||
<InstrId>INNDNL2U20141231000142300002844</InstrId> |
|||
<EndToEndId>435005714488-ABNO33052620</EndToEndId> |
|||
<MndtId>1880000341866</MndtId> |
|||
</Refs> |
|||
<AmtDtls> |
|||
<TxAmt> |
|||
<Amt Ccy="EUR">754.25</Amt> |
|||
</TxAmt> |
|||
</AmtDtls> |
|||
<RltdPties> |
|||
<Cdtr> |
|||
<Nm>INSURANCE COMPANY TESTX</Nm> |
|||
<PstlAdr> |
|||
<StrtNm>TEST STREET 20</StrtNm> |
|||
<TwnNm>1234 AB TESTCITY</TwnNm> |
|||
<Ctry>NL</Ctry> |
|||
</PstlAdr> |
|||
</Cdtr> |
|||
<CdtrAcct> |
|||
<Id> |
|||
<IBAN>NL46ABNA0499998748</IBAN> |
|||
</Id> |
|||
</CdtrAcct> |
|||
</RltdPties> |
|||
<RltdAgts> |
|||
<CdtrAgt> |
|||
<FinInstnId> |
|||
<BIC>ABNANL2A</BIC> |
|||
</FinInstnId> |
|||
</CdtrAgt> |
|||
</RltdAgts> |
|||
<RmtInf> |
|||
<Ustrd>Insurance policy 857239PERIOD 01.01.2014 - 31.12.2014</Ustrd> |
|||
</RmtInf> |
|||
<AddtlTxInf>MKB Insurance 859239PERIOD 01.01.2014 - 31.12.2014</AddtlTxInf> |
|||
</TxDtls> |
|||
</NtryDtls> |
|||
</Ntry> |
|||
<Ntry> |
|||
<Amt Ccy="EUR">664.05</Amt> |
|||
<CdtDbtInd>DBIT</CdtDbtInd> |
|||
<RvslInd>true</RvslInd> |
|||
<Sts>BOOK</Sts> |
|||
<BookgDt> |
|||
<Dt>2014-01-05</Dt> |
|||
</BookgDt> |
|||
<ValDt> |
|||
<Dt>2014-01-05</Dt> |
|||
</ValDt> |
|||
<BkTxCd> |
|||
<Domn> |
|||
<Cd>PMNT</Cd> |
|||
<Fmly> |
|||
<Cd>IDDT</Cd> |
|||
<SubFmlyCd>UPDD</SubFmlyCd> |
|||
</Fmly> |
|||
</Domn> |
|||
<Prtry> |
|||
<Cd>EIST</Cd> |
|||
</Prtry> |
|||
</BkTxCd> |
|||
<NtryDtls> |
|||
<Btch> |
|||
<MsgId>2014/125</MsgId> |
|||
<PmtInfId>2018/125-20141229-NORM</PmtInfId> |
|||
<NbOfTxs>2</NbOfTxs> |
|||
<TtlAmt Ccy="EUR">664.05</TtlAmt> |
|||
<CdtDbtInd>DBIT</CdtDbtInd> |
|||
</Btch> |
|||
<TxDtls> |
|||
<Refs> |
|||
<InstrId>TESTBANK/NL/20141229/01206408</InstrId> |
|||
<EndToEndId>TESTBANK/NL/20141229/01206408</EndToEndId> |
|||
<MndtId>NL22ZZZ524885430000-C0125.1</MndtId> |
|||
</Refs> |
|||
<AmtDtls> |
|||
<TxAmt> |
|||
<Amt Ccy="EUR">564.05</Amt> |
|||
</TxAmt> |
|||
</AmtDtls> |
|||
<RltdPties> |
|||
<Cdtr> |
|||
<Nm>Test Customer</Nm> |
|||
<PstlAdr> |
|||
<Ctry>NL</Ctry> |
|||
</PstlAdr> |
|||
</Cdtr> |
|||
<CdtrAcct> |
|||
<Id> |
|||
<IBAN>NL46ABNA0499998748</IBAN> |
|||
</Id> |
|||
</CdtrAcct> |
|||
</RltdPties> |
|||
<RltdAgts> |
|||
<CdtrAgt> |
|||
<FinInstnId> |
|||
<BIC>ABNANL2A</BIC> |
|||
</FinInstnId> |
|||
</CdtrAgt> |
|||
</RltdAgts> |
|||
<RmtInf> |
|||
<Ustrd>Direct Debit S14 0410</Ustrd> |
|||
</RmtInf> |
|||
<RtrInf> |
|||
<Rsn> |
|||
<Cd>AC06</Cd> |
|||
</Rsn> |
|||
</RtrInf> |
|||
<AddtlTxInf>Direct debit S14 0410 AC07 Rek.nummer blokkade TESTBANK/NL/20141229/01206408</AddtlTxInf> |
|||
</TxDtls> |
|||
<TxDtls> |
|||
<Refs> |
|||
<InstrId>TESTBANK/NL/20141229/01206407</InstrId> |
|||
<EndToEndId>TESTBANK/NL/20141229/01206407</EndToEndId> |
|||
<MndtId>NL22ZZZ524885430000-C0125.2</MndtId> |
|||
</Refs> |
|||
<AmtDtls> |
|||
<TxAmt> |
|||
<Amt Ccy="EUR">100.00</Amt> |
|||
</TxAmt> |
|||
</AmtDtls> |
|||
<RltdPties> |
|||
<Cdtr> |
|||
<Nm>Test Customer</Nm> |
|||
<PstlAdr> |
|||
<Ctry>NL</Ctry> |
|||
</PstlAdr> |
|||
</Cdtr> |
|||
<CdtrAcct> |
|||
<Id> |
|||
<IBAN>NL46ABNA0499998748</IBAN> |
|||
</Id> |
|||
</CdtrAcct> |
|||
</RltdPties> |
|||
<RltdAgts> |
|||
<CdtrAgt> |
|||
<FinInstnId> |
|||
<BIC>ABNANL2A</BIC> |
|||
</FinInstnId> |
|||
</CdtrAgt> |
|||
</RltdAgts> |
|||
<RmtInf> |
|||
<Ustrd>Direct Debit S14 0410</Ustrd> |
|||
</RmtInf> |
|||
<RtrInf> |
|||
<Rsn> |
|||
<Cd>AC06</Cd> |
|||
</Rsn> |
|||
</RtrInf> |
|||
<AddtlTxInf>Direct debit S14 0410 AC07 Rek.nummer blokkade TESTBANK/NL/20141229/01206408</AddtlTxInf> |
|||
</TxDtls> |
|||
</NtryDtls> |
|||
</Ntry> |
|||
<Ntry> |
|||
<Amt Ccy="EUR">1405.31</Amt> |
|||
<CdtDbtInd>CRDT</CdtDbtInd> |
|||
<Sts>BOOK</Sts> |
|||
<BookgDt> |
|||
<Dt>2014-01-05</Dt> |
|||
</BookgDt> |
|||
<ValDt> |
|||
<Dt>2014-01-05</Dt> |
|||
</ValDt> |
|||
<BkTxCd> |
|||
<Domn> |
|||
<Cd>PMNT</Cd> |
|||
<Fmly> |
|||
<Cd>RCDT</Cd> |
|||
<SubFmlyCd>ESCT</SubFmlyCd> |
|||
</Fmly> |
|||
</Domn> |
|||
<Prtry> |
|||
<Cd>ET</Cd> |
|||
</Prtry> |
|||
</BkTxCd> |
|||
<NtryDtls> |
|||
<TxDtls> |
|||
<Refs> |
|||
<InstrId>INNDNL2U20140105000217200000708</InstrId> |
|||
<EndToEndId>115</EndToEndId> |
|||
</Refs> |
|||
<AmtDtls> |
|||
<TxAmt> |
|||
<Amt Ccy="EUR">1405.31</Amt> |
|||
</TxAmt> |
|||
</AmtDtls> |
|||
<RltdPties> |
|||
<Dbtr> |
|||
<Nm>3rd party Media</Nm> |
|||
<PstlAdr> |
|||
<StrtNm>SOMESTREET 570-A</StrtNm> |
|||
<TwnNm>1276 ML HOUSCITY</TwnNm> |
|||
<Ctry>NL</Ctry> |
|||
</PstlAdr> |
|||
</Dbtr> |
|||
<DbtrAcct> |
|||
<Id> |
|||
<IBAN>NL69ABNA0522123643</IBAN> |
|||
</Id> |
|||
</DbtrAcct> |
|||
</RltdPties> |
|||
<RltdAgts> |
|||
<DbtrAgt> |
|||
<FinInstnId> |
|||
<BIC>ABNANL2A</BIC> |
|||
</FinInstnId> |
|||
</DbtrAgt> |
|||
</RltdAgts> |
|||
<AddtlTxInf>#RD PARTY MEDIA CUSNO 90782 4210773</AddtlTxInf> |
|||
</TxDtls> |
|||
</NtryDtls> |
|||
</Ntry> |
|||
</Stmt> |
|||
</BkToCstmrStmt> |
|||
</Document> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue