예제 #1
0
파일: pages.py 프로젝트: yang2lalang/weboob
 def iter_accounts(self):
     t = {
         'PEE': Account.TYPE_PEE,
         'PEG': Account.TYPE_PEE,
         'PERCO': Account.TYPE_PERCO
     }
     for acc in self.doc['positionTotaleDispositifDto']:
         ac = Account()
         ac.type = Account.TYPE_LIFE_INSURANCE
         ac.id = ac.number = acc['codeDispositif']
         ac.label = acc['libelleDispositif']
         ac._entreprise = acc['libelleEntreprise']
         ac.balance = Decimal(acc['mtBrut'])
         ac._ident = acc['idEnt']
         for k, v in t.items():
             if k in ac.label:
                 ac.type = v
                 break
         yield ac
예제 #2
0
 def iter_accounts(self):
     types = {
         'PEE': Account.TYPE_PEE,
         'PEG': Account.TYPE_PEE,
         'PERCO': Account.TYPE_PERCO,
         'RSP': Account.TYPE_RSP
     }
     for acc in self.doc['positionTotaleDispositifDto']:
         ac = Account()
         ac.type = types.get(acc['typeDispositif'],
                             Account.TYPE_LIFE_INSURANCE)
         ac.id = ac.number = acc['codeDispositif']
         try:
             ac.label = acc['libelleDispositif'].encode('latin1').decode(
                 'utf8')
         except UnicodeDecodeError:
             ac.label = acc['libelleDispositif']
         ac._entreprise = acc['libelleEntreprise']
         ac.balance = Decimal(acc['mtBrut'])
         ac._ident = acc['idEnt']
         yield ac