Skip to content

Commit bc0014e

Browse files
committed
[IMP] add new paser for SEPA, need to be correctly implemented but I don't know where is the norme :(, waiting for an email response from CFONB organisation
1 parent 8a9cd07 commit bc0014e

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

cfonb/parser/common.py

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def get_parser(cls, key):
6565
for sub_cls in cls.__subclasses__():
6666
if sub_cls._code == key:
6767
return sub_cls
68-
raise Exception('No class found')
68+
raise Exception('No class found for key %s'%key)
6969

7070
def __init__(self):
7171
self._regex
@@ -364,6 +364,31 @@ class ParserCBE(Parser):
364364
('creditor_account', G_ALL, 70),
365365
]
366366

367+
368+
##### TODO FIXME this 3 new parser are introduced by the new sepa norme but
369+
# you know administration is an administration and so the spec for the norme
370+
# are somewhere but I still not suceed to get it, I send an email to the CFONB
371+
# and I wait for the norme. For now I just process the line like that.
372+
373+
class ParserREF(Parser):
374+
_code = 'REF'
375+
_regex = [
376+
('ref', G_ALL, 70),
377+
]
378+
379+
class ParserBDB(Parser):
380+
_code = 'BDB'
381+
_regex = [
382+
('bdb', G_ALL, 70),
383+
]
384+
385+
class ParserLEM(Parser):
386+
_code = 'LEM'
387+
_regex = [
388+
('lem', G_ALL, 70),
389+
]
390+
391+
367392
#specific to withdrawal
368393
# TODO FIXME it's look like there is something wrong in
369394
# confb norme indeed 35+4 != 70 and 35 != 70 :S outch!

0 commit comments

Comments
 (0)