banking-addons-team team mailing list archive
-
banking-addons-team team
-
Mailing list archive
-
Message #01624
[Merge] lp:~therp-nl/banking-addons/ba70-abnamro_sepa_batch_detect into lp:banking-addons
Stefan Rijnhart (Therp) has proposed merging lp:~therp-nl/banking-addons/ba70-abnamro_sepa_batch_detect into lp:banking-addons.
Commit message:
[IMP] abnamro: transaction type recognition from SEPA type
Requested reviews:
Banking Addons Core Editors (banking-addons-team)
For more details, see:
https://code.launchpad.net/~therp-nl/banking-addons/ba70-abnamro_sepa_batch_detect/+merge/208933
--
https://code.launchpad.net/~therp-nl/banking-addons/ba70-abnamro_sepa_batch_detect/+merge/208933
Your team Banking Addons Core Editors is requested to review the proposed merge of lp:~therp-nl/banking-addons/ba70-abnamro_sepa_batch_detect into lp:banking-addons.
=== modified file 'account_banking_nl_abnamro/abnamro.py'
--- account_banking_nl_abnamro/abnamro.py 2013-10-02 08:56:55 +0000
+++ account_banking_nl_abnamro/abnamro.py 2014-03-01 14:54:55 +0000
@@ -91,6 +91,7 @@
'UNKN': bt.ORDER, # everything else
'SEPA': bt.ORDER,
'PAYB': bt.PAYMENT_BATCH,
+ 'RETR': bt.STORNO,
}
def __init__(self, line, *args, **kwargs):
@@ -257,8 +258,11 @@
if self.transfer_type == 'SEPA':
sepa_dict = get_sepa_dict(''.join(fields))
sepa_type = sepa_dict.get('TRTP') or ''
- if sepa_type.upper() != 'SEPA OVERBOEKING':
- raise ValueError, _('Sepa transaction type %s not handled yet') % sepa_type
+ self.transfer_type = {
+ 'SEPA BATCH': 'PAYB',
+ 'SEPA BATCH SALARIS': 'PAYB',
+ 'SEPA TERUGBOEKING': 'RETR',
+ }.get(sepa_type.upper(), 'SEPA')
self.remote_account = sepa_dict.get('IBAN',False)
self.remote_bank_bic = sepa_dict.get('BIC', False)
self.remote_owner = sepa_dict.get('NAME', False)
Follow ups