Skip to content

Commit

Permalink
attempting to fix sparkassen problem (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolph committed Jan 3, 2019
1 parent 680cb55 commit e418f2c
Show file tree
Hide file tree
Showing 49 changed files with 291 additions and 91 deletions.
2 changes: 1 addition & 1 deletion mt940/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def parse(self, data):
# match it's difficult to get both the beginning and the end so we're
# working around it in a safer way to get everything.
tag_re = re.compile(
r'^:(?P<full_tag>(?P<tag>[0-9]{2}|NS)(?P<sub_tag>[A-Z])?):',
r'^:\n?(?P<full_tag>(?P<tag>[0-9]{2}|NS)(?P<sub_tag>[A-Z])?):',
re.MULTILINE)
matches = list(tag_re.finditer(data))

Expand Down
1 change: 1 addition & 0 deletions mt940/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ class Statement(Tag):
(?P<status>[A-Z]?[DC]) # 2a Debit/Credit Mark
(?P<funds_code>[A-Z])? # [1!a] Funds Code (3rd character of the currency
# code, if needed)
\n? # apparently some banks (sparkassen) incorporate newlines here
(?P<amount>[\d,]{1,15}) # 15d Amount
(?P<id>[A-Z][A-Z0-9 ]{3})? # 1!a3!c Transaction Type Identification Code
(?P<customer_reference>.{0,16}) # 16x Customer Reference
Expand Down
5 changes: 3 additions & 2 deletions tests/betterplace/amount_formats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ tags:
d{2})? # [4!n] Entry Date (MMDD)\n (?P<entry_day>\\d{2})?\n (?P<status>[A-Z]?[DC])\
\ # 2a Debit/Credit Mark\n (?P<funds_code>[A-Z])? # [1!a] Funds Code (3rd\
\ character of the currency\n # code, if needed)\n\
\ \\n? # apparently some banks (sparkassen) incorporate newlines here\n\
\ (?P<amount>[\\d,]{1,15}) # 15d Amount\n (?P<id>[A-Z][A-Z0-9 ]{3})?\
\ # 1!a3!c Transaction Type Identification Code\n (?P<customer_reference>.{0,16})\
\ # 16x Customer Reference\n (//(?P<bank_reference>.{0,16}))? # [//16x]\
Expand All @@ -97,13 +98,13 @@ tags:
S]{0,65}\\r?\\n?){0,8}[\\s\\S]{0,65}))\n ", 98]
34: !!python/object:mt940.tags.FloorLimitIndicator
re: !!python/object/apply:re._compile ["^\n (?P<currency>[A-Z]{3}) # 3!a Currency\n\
\ (?P<status>[DC]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ (?P<status>[DC ]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ # 15d Amount (includes decimal sign, so 16)\n $", 98]
NS: !!python/object:mt940.tags.NonSwift
re: !!python/object/apply:re._compile ["\n (?P<non_swift>\n (\\d{2}.{0,})\n\
\ (\\n\\d{2}.{0,})*\n )\n $", 98]
90: !!python/object:mt940.tags.SumEntries
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d+)\n (?P<currency>.{3})\
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d*)\n (?P<currency>.{3})\
\ # 3!a Currency\n (?P<amount>[\\d,]{1,15}) # 15d Amount\n ", 98]
90D: !!python/object:mt940.tags.SumDebitEntries
re: *id002
Expand Down
5 changes: 3 additions & 2 deletions tests/betterplace/currency_in_25.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ tags:
d{2})? # [4!n] Entry Date (MMDD)\n (?P<entry_day>\\d{2})?\n (?P<status>[A-Z]?[DC])\
\ # 2a Debit/Credit Mark\n (?P<funds_code>[A-Z])? # [1!a] Funds Code (3rd\
\ character of the currency\n # code, if needed)\n\
\ \\n? # apparently some banks (sparkassen) incorporate newlines here\n\
\ (?P<amount>[\\d,]{1,15}) # 15d Amount\n (?P<id>[A-Z][A-Z0-9 ]{3})?\
\ # 1!a3!c Transaction Type Identification Code\n (?P<customer_reference>.{0,16})\
\ # 16x Customer Reference\n (//(?P<bank_reference>.{0,16}))? # [//16x]\
Expand All @@ -89,13 +90,13 @@ tags:
S]{0,65}\\r?\\n?){0,8}[\\s\\S]{0,65}))\n ", 98]
34: !!python/object:mt940.tags.FloorLimitIndicator
re: !!python/object/apply:re._compile ["^\n (?P<currency>[A-Z]{3}) # 3!a Currency\n\
\ (?P<status>[DC]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ (?P<status>[DC ]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ # 15d Amount (includes decimal sign, so 16)\n $", 98]
NS: !!python/object:mt940.tags.NonSwift
re: !!python/object/apply:re._compile ["\n (?P<non_swift>\n (\\d{2}.{0,})\n\
\ (\\n\\d{2}.{0,})*\n )\n $", 98]
90: !!python/object:mt940.tags.SumEntries
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d+)\n (?P<currency>.{3})\
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d*)\n (?P<currency>.{3})\
\ # 3!a Currency\n (?P<amount>[\\d,]{1,15}) # 15d Amount\n ", 98]
90D: !!python/object:mt940.tags.SumDebitEntries
re: *id002
Expand Down
5 changes: 3 additions & 2 deletions tests/betterplace/empty_86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ tags:
d{2})? # [4!n] Entry Date (MMDD)\n (?P<entry_day>\\d{2})?\n (?P<status>[A-Z]?[DC])\
\ # 2a Debit/Credit Mark\n (?P<funds_code>[A-Z])? # [1!a] Funds Code (3rd\
\ character of the currency\n # code, if needed)\n\
\ \\n? # apparently some banks (sparkassen) incorporate newlines here\n\
\ (?P<amount>[\\d,]{1,15}) # 15d Amount\n (?P<id>[A-Z][A-Z0-9 ]{3})?\
\ # 1!a3!c Transaction Type Identification Code\n (?P<customer_reference>.{0,16})\
\ # 16x Customer Reference\n (//(?P<bank_reference>.{0,16}))? # [//16x]\
Expand All @@ -89,13 +90,13 @@ tags:
S]{0,65}\\r?\\n?){0,8}[\\s\\S]{0,65}))\n ", 98]
34: !!python/object:mt940.tags.FloorLimitIndicator
re: !!python/object/apply:re._compile ["^\n (?P<currency>[A-Z]{3}) # 3!a Currency\n\
\ (?P<status>[DC]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ (?P<status>[DC ]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ # 15d Amount (includes decimal sign, so 16)\n $", 98]
NS: !!python/object:mt940.tags.NonSwift
re: !!python/object/apply:re._compile ["\n (?P<non_swift>\n (\\d{2}.{0,})\n\
\ (\\n\\d{2}.{0,})*\n )\n $", 98]
90: !!python/object:mt940.tags.SumEntries
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d+)\n (?P<currency>.{3})\
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d*)\n (?P<currency>.{3})\
\ # 3!a Currency\n (?P<amount>[\\d,]{1,15}) # 15d Amount\n ", 98]
90D: !!python/object:mt940.tags.SumDebitEntries
re: *id002
Expand Down
5 changes: 3 additions & 2 deletions tests/betterplace/empty_entry_date.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ tags:
d{2})? # [4!n] Entry Date (MMDD)\n (?P<entry_day>\\d{2})?\n (?P<status>[A-Z]?[DC])\
\ # 2a Debit/Credit Mark\n (?P<funds_code>[A-Z])? # [1!a] Funds Code (3rd\
\ character of the currency\n # code, if needed)\n\
\ \\n? # apparently some banks (sparkassen) incorporate newlines here\n\
\ (?P<amount>[\\d,]{1,15}) # 15d Amount\n (?P<id>[A-Z][A-Z0-9 ]{3})?\
\ # 1!a3!c Transaction Type Identification Code\n (?P<customer_reference>.{0,16})\
\ # 16x Customer Reference\n (//(?P<bank_reference>.{0,16}))? # [//16x]\
Expand All @@ -89,13 +90,13 @@ tags:
S]{0,65}\\r?\\n?){0,8}[\\s\\S]{0,65}))\n ", 98]
34: !!python/object:mt940.tags.FloorLimitIndicator
re: !!python/object/apply:re._compile ["^\n (?P<currency>[A-Z]{3}) # 3!a Currency\n\
\ (?P<status>[DC]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ (?P<status>[DC ]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ # 15d Amount (includes decimal sign, so 16)\n $", 98]
NS: !!python/object:mt940.tags.NonSwift
re: !!python/object/apply:re._compile ["\n (?P<non_swift>\n (\\d{2}.{0,})\n\
\ (\\n\\d{2}.{0,})*\n )\n $", 98]
90: !!python/object:mt940.tags.SumEntries
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d+)\n (?P<currency>.{3})\
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d*)\n (?P<currency>.{3})\
\ # 3!a Currency\n (?P<amount>[\\d,]{1,15}) # 15d Amount\n ", 98]
90D: !!python/object:mt940.tags.SumDebitEntries
re: *id002
Expand Down
5 changes: 3 additions & 2 deletions tests/betterplace/empty_line.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ tags:
d{2})? # [4!n] Entry Date (MMDD)\n (?P<entry_day>\\d{2})?\n (?P<status>[A-Z]?[DC])\
\ # 2a Debit/Credit Mark\n (?P<funds_code>[A-Z])? # [1!a] Funds Code (3rd\
\ character of the currency\n # code, if needed)\n\
\ \\n? # apparently some banks (sparkassen) incorporate newlines here\n\
\ (?P<amount>[\\d,]{1,15}) # 15d Amount\n (?P<id>[A-Z][A-Z0-9 ]{3})?\
\ # 1!a3!c Transaction Type Identification Code\n (?P<customer_reference>.{0,16})\
\ # 16x Customer Reference\n (//(?P<bank_reference>.{0,16}))? # [//16x]\
Expand All @@ -89,13 +90,13 @@ tags:
S]{0,65}\\r?\\n?){0,8}[\\s\\S]{0,65}))\n ", 98]
34: !!python/object:mt940.tags.FloorLimitIndicator
re: !!python/object/apply:re._compile ["^\n (?P<currency>[A-Z]{3}) # 3!a Currency\n\
\ (?P<status>[DC]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ (?P<status>[DC ]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ # 15d Amount (includes decimal sign, so 16)\n $", 98]
NS: !!python/object:mt940.tags.NonSwift
re: !!python/object/apply:re._compile ["\n (?P<non_swift>\n (\\d{2}.{0,})\n\
\ (\\n\\d{2}.{0,})*\n )\n $", 98]
90: !!python/object:mt940.tags.SumEntries
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d+)\n (?P<currency>.{3})\
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d*)\n (?P<currency>.{3})\
\ # 3!a Currency\n (?P<amount>[\\d,]{1,15}) # 15d Amount\n ", 98]
90D: !!python/object:mt940.tags.SumDebitEntries
re: *id002
Expand Down
5 changes: 3 additions & 2 deletions tests/betterplace/missing_crlf_at_end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ tags:
d{2})? # [4!n] Entry Date (MMDD)\n (?P<entry_day>\\d{2})?\n (?P<status>[A-Z]?[DC])\
\ # 2a Debit/Credit Mark\n (?P<funds_code>[A-Z])? # [1!a] Funds Code (3rd\
\ character of the currency\n # code, if needed)\n\
\ \\n? # apparently some banks (sparkassen) incorporate newlines here\n\
\ (?P<amount>[\\d,]{1,15}) # 15d Amount\n (?P<id>[A-Z][A-Z0-9 ]{3})?\
\ # 1!a3!c Transaction Type Identification Code\n (?P<customer_reference>.{0,16})\
\ # 16x Customer Reference\n (//(?P<bank_reference>.{0,16}))? # [//16x]\
Expand All @@ -97,13 +98,13 @@ tags:
S]{0,65}\\r?\\n?){0,8}[\\s\\S]{0,65}))\n ", 98]
34: !!python/object:mt940.tags.FloorLimitIndicator
re: !!python/object/apply:re._compile ["^\n (?P<currency>[A-Z]{3}) # 3!a Currency\n\
\ (?P<status>[DC]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ (?P<status>[DC ]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ # 15d Amount (includes decimal sign, so 16)\n $", 98]
NS: !!python/object:mt940.tags.NonSwift
re: !!python/object/apply:re._compile ["\n (?P<non_swift>\n (\\d{2}.{0,})\n\
\ (\\n\\d{2}.{0,})*\n )\n $", 98]
90: !!python/object:mt940.tags.SumEntries
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d+)\n (?P<currency>.{3})\
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d*)\n (?P<currency>.{3})\
\ # 3!a Currency\n (?P<amount>[\\d,]{1,15}) # 15d Amount\n ", 98]
90D: !!python/object:mt940.tags.SumDebitEntries
re: *id002
Expand Down
5 changes: 3 additions & 2 deletions tests/betterplace/sepa_mt9401.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ tags:
d{2})? # [4!n] Entry Date (MMDD)\n (?P<entry_day>\\d{2})?\n (?P<status>[A-Z]?[DC])\
\ # 2a Debit/Credit Mark\n (?P<funds_code>[A-Z])? # [1!a] Funds Code (3rd\
\ character of the currency\n # code, if needed)\n\
\ \\n? # apparently some banks (sparkassen) incorporate newlines here\n\
\ (?P<amount>[\\d,]{1,15}) # 15d Amount\n (?P<id>[A-Z][A-Z0-9 ]{3})?\
\ # 1!a3!c Transaction Type Identification Code\n (?P<customer_reference>.{0,16})\
\ # 16x Customer Reference\n (//(?P<bank_reference>.{0,16}))? # [//16x]\
Expand All @@ -133,13 +134,13 @@ tags:
S]{0,65}\\r?\\n?){0,8}[\\s\\S]{0,65}))\n ", 98]
34: !!python/object:mt940.tags.FloorLimitIndicator
re: !!python/object/apply:re._compile ["^\n (?P<currency>[A-Z]{3}) # 3!a Currency\n\
\ (?P<status>[DC]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ (?P<status>[DC ]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ # 15d Amount (includes decimal sign, so 16)\n $", 98]
NS: !!python/object:mt940.tags.NonSwift
re: !!python/object/apply:re._compile ["\n (?P<non_swift>\n (\\d{2}.{0,})\n\
\ (\\n\\d{2}.{0,})*\n )\n $", 98]
90: !!python/object:mt940.tags.SumEntries
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d+)\n (?P<currency>.{3})\
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d*)\n (?P<currency>.{3})\
\ # 3!a Currency\n (?P<amount>[\\d,]{1,15}) # 15d Amount\n ", 98]
90D: !!python/object:mt940.tags.SumDebitEntries
re: *id002
Expand Down
5 changes: 3 additions & 2 deletions tests/betterplace/sepa_snippet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ tags:
d{2})? # [4!n] Entry Date (MMDD)\n (?P<entry_day>\\d{2})?\n (?P<status>[A-Z]?[DC])\
\ # 2a Debit/Credit Mark\n (?P<funds_code>[A-Z])? # [1!a] Funds Code (3rd\
\ character of the currency\n # code, if needed)\n\
\ \\n? # apparently some banks (sparkassen) incorporate newlines here\n\
\ (?P<amount>[\\d,]{1,15}) # 15d Amount\n (?P<id>[A-Z][A-Z0-9 ]{3})?\
\ # 1!a3!c Transaction Type Identification Code\n (?P<customer_reference>.{0,16})\
\ # 16x Customer Reference\n (//(?P<bank_reference>.{0,16}))? # [//16x]\
Expand All @@ -117,13 +118,13 @@ tags:
S]{0,65}\\r?\\n?){0,8}[\\s\\S]{0,65}))\n ", 98]
34: !!python/object:mt940.tags.FloorLimitIndicator
re: !!python/object/apply:re._compile ["^\n (?P<currency>[A-Z]{3}) # 3!a Currency\n\
\ (?P<status>[DC]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ (?P<status>[DC ]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ # 15d Amount (includes decimal sign, so 16)\n $", 98]
NS: !!python/object:mt940.tags.NonSwift
re: !!python/object/apply:re._compile ["\n (?P<non_swift>\n (\\d{2}.{0,})\n\
\ (\\n\\d{2}.{0,})*\n )\n $", 98]
90: !!python/object:mt940.tags.SumEntries
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d+)\n (?P<currency>.{3})\
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d*)\n (?P<currency>.{3})\
\ # 3!a Currency\n (?P<amount>[\\d,]{1,15}) # 15d Amount\n ", 98]
90D: !!python/object:mt940.tags.SumDebitEntries
re: *id002
Expand Down
5 changes: 3 additions & 2 deletions tests/betterplace/sepa_snippet_broken.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ tags:
d{2})? # [4!n] Entry Date (MMDD)\n (?P<entry_day>\\d{2})?\n (?P<status>[A-Z]?[DC])\
\ # 2a Debit/Credit Mark\n (?P<funds_code>[A-Z])? # [1!a] Funds Code (3rd\
\ character of the currency\n # code, if needed)\n\
\ \\n? # apparently some banks (sparkassen) incorporate newlines here\n\
\ (?P<amount>[\\d,]{1,15}) # 15d Amount\n (?P<id>[A-Z][A-Z0-9 ]{3})?\
\ # 1!a3!c Transaction Type Identification Code\n (?P<customer_reference>.{0,16})\
\ # 16x Customer Reference\n (//(?P<bank_reference>.{0,16}))? # [//16x]\
Expand All @@ -117,13 +118,13 @@ tags:
S]{0,65}\\r?\\n?){0,8}[\\s\\S]{0,65}))\n ", 98]
34: !!python/object:mt940.tags.FloorLimitIndicator
re: !!python/object/apply:re._compile ["^\n (?P<currency>[A-Z]{3}) # 3!a Currency\n\
\ (?P<status>[DC]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ (?P<status>[DC ]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ # 15d Amount (includes decimal sign, so 16)\n $", 98]
NS: !!python/object:mt940.tags.NonSwift
re: !!python/object/apply:re._compile ["\n (?P<non_swift>\n (\\d{2}.{0,})\n\
\ (\\n\\d{2}.{0,})*\n )\n $", 98]
90: !!python/object:mt940.tags.SumEntries
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d+)\n (?P<currency>.{3})\
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d*)\n (?P<currency>.{3})\
\ # 3!a Currency\n (?P<amount>[\\d,]{1,15}) # 15d Amount\n ", 98]
90D: !!python/object:mt940.tags.SumDebitEntries
re: *id002
Expand Down
5 changes: 3 additions & 2 deletions tests/betterplace/with_binary_character.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ tags:
d{2})? # [4!n] Entry Date (MMDD)\n (?P<entry_day>\\d{2})?\n (?P<status>[A-Z]?[DC])\
\ # 2a Debit/Credit Mark\n (?P<funds_code>[A-Z])? # [1!a] Funds Code (3rd\
\ character of the currency\n # code, if needed)\n\
\ \\n? # apparently some banks (sparkassen) incorporate newlines here\n\
\ (?P<amount>[\\d,]{1,15}) # 15d Amount\n (?P<id>[A-Z][A-Z0-9 ]{3})?\
\ # 1!a3!c Transaction Type Identification Code\n (?P<customer_reference>.{0,16})\
\ # 16x Customer Reference\n (//(?P<bank_reference>.{0,16}))? # [//16x]\
Expand All @@ -109,13 +110,13 @@ tags:
S]{0,65}\\r?\\n?){0,8}[\\s\\S]{0,65}))\n ", 98]
34: !!python/object:mt940.tags.FloorLimitIndicator
re: !!python/object/apply:re._compile ["^\n (?P<currency>[A-Z]{3}) # 3!a Currency\n\
\ (?P<status>[DC]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ (?P<status>[DC ]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ # 15d Amount (includes decimal sign, so 16)\n $", 98]
NS: !!python/object:mt940.tags.NonSwift
re: !!python/object/apply:re._compile ["\n (?P<non_swift>\n (\\d{2}.{0,})\n\
\ (\\n\\d{2}.{0,})*\n )\n $", 98]
90: !!python/object:mt940.tags.SumEntries
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d+)\n (?P<currency>.{3})\
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d*)\n (?P<currency>.{3})\
\ # 3!a Currency\n (?P<amount>[\\d,]{1,15}) # 15d Amount\n ", 98]
90D: !!python/object:mt940.tags.SumDebitEntries
re: *id002
Expand Down
5 changes: 3 additions & 2 deletions tests/cmxl/account_balance_credit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ tags:
d{2})? # [4!n] Entry Date (MMDD)\n (?P<entry_day>\\d{2})?\n (?P<status>[A-Z]?[DC])\
\ # 2a Debit/Credit Mark\n (?P<funds_code>[A-Z])? # [1!a] Funds Code (3rd\
\ character of the currency\n # code, if needed)\n\
\ \\n? # apparently some banks (sparkassen) incorporate newlines here\n\
\ (?P<amount>[\\d,]{1,15}) # 15d Amount\n (?P<id>[A-Z][A-Z0-9 ]{3})?\
\ # 1!a3!c Transaction Type Identification Code\n (?P<customer_reference>.{0,16})\
\ # 16x Customer Reference\n (//(?P<bank_reference>.{0,16}))? # [//16x]\
Expand All @@ -97,13 +98,13 @@ tags:
S]{0,65}\\r?\\n?){0,8}[\\s\\S]{0,65}))\n ", 98]
34: !!python/object:mt940.tags.FloorLimitIndicator
re: !!python/object/apply:re._compile ["^\n (?P<currency>[A-Z]{3}) # 3!a Currency\n\
\ (?P<status>[DC]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ (?P<status>[DC ]?) # 2a Debit/Credit Mark\n (?P<amount>[0-9,]{0,16})\
\ # 15d Amount (includes decimal sign, so 16)\n $", 98]
NS: !!python/object:mt940.tags.NonSwift
re: !!python/object/apply:re._compile ["\n (?P<non_swift>\n (\\d{2}.{0,})\n\
\ (\\n\\d{2}.{0,})*\n )\n $", 98]
90: !!python/object:mt940.tags.SumEntries
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d+)\n (?P<currency>.{3})\
re: &id002 !!python/object/apply:re._compile ["^\n (?P<number>\\d*)\n (?P<currency>.{3})\
\ # 3!a Currency\n (?P<amount>[\\d,]{1,15}) # 15d Amount\n ", 98]
90D: !!python/object:mt940.tags.SumDebitEntries
re: *id002
Expand Down

0 comments on commit e418f2c

Please sign in to comment.