LCL: site specific fix

Reported-by: Ch. Perret <ch.perret@gmail.com>
Signed-off-by: Pierre Mazière <pierre.maziere@gmail.com>
Tested-by:  Ch. Perret <ch.perret@gmail.com>
This commit is contained in:
Pierre Mazière 2012-03-29 15:53:21 +02:00 committed by Romain Bignon
commit 32b87b47f5

View file

@ -198,8 +198,9 @@ class AccountHistoryPage(BasePage):
operation.raw=u''.join([txt.strip() for txt in td.itertext()])
elif value.startswith("solde") or value.startswith("mnt"):
mntColumn+=1
if td.text.strip() != "":
amount = float(td.text.strip().replace('.','').replace(',','.').replace(u"\u00A0",'').replace(' ',''))
amount=u''.join([txt.strip() for txt in td.itertext()])
if amount != "":
amount = float(amount.replace('.','').replace(',','.').replace(u"\u00A0",'').replace(' ',''))
if value.startswith("soldeDeb") or mntColumn==1:
amount=-amount
operation.amount=amount