mt940.processors module

mt940.processors.add_currency_pre_processor(currency, overwrite=True)[source]
mt940.processors.date_cleanup_post_processor(transactions, tag, tag_dict, result)[source]
mt940.processors.date_fixup_pre_processor(transactions, tag, tag_dict, *args)[source]

Replace illegal February 29, 30 dates with the last day of February.

German banks use a variant of the 30/360 interest rate calculation, where each month has always 30 days even February. Python’s datetime module won’t accept such dates.

mt940.processors.mBank_set_iph_id(transactions, tag, tag_dict, *args)[source]

mBank Collect uses ID IPH to distinguish between virtual accounts, adding iph_id may be helpful in further processing

mt940.processors.mBank_set_tnr(transactions, tag, tag_dict, *args)[source]

mBank Collect states TNR in transaction details as unique id for transactions, that may be used to identify the same transactions in different statement files eg. partial mt942 and full mt940 Information about tnr uniqueness has been obtained from mBank support, it lacks in mt940 mBank specification.

mt940.processors.mBank_set_transaction_code(transactions, tag, tag_dict, *args)[source]

mBank Collect uses transaction code 911 to distinguish icoming mass payments transactions, adding transaction_code may be helpful in further processing

mt940.processors.transaction_details_post_processor(transactions, tag, tag_dict, result, space=False)[source]

Parse the extra details in some transaction formats such as the 60-65 keys.

Parameters:
mt940.processors.transaction_details_post_processor_with_space(transactions, tag, tag_dict, result, *, space=True)

Parse the extra details in some transaction formats such as the 60-65 keys.

Parameters:
mt940.processors.transactions_to_transaction(*keys)[source]

Copy the global transactions details to the transaction.

Parameters:

*keys (str) – the keys to copy to the transaction