clean labels
This commit is contained in:
parent
8c11788dc1
commit
1824a7242a
1 changed files with 3 additions and 0 deletions
|
|
@ -114,11 +114,13 @@ class OperationsPage(BasePage):
|
||||||
|
|
||||||
date = self.parser.tocleanstring(cols[0])
|
date = self.parser.tocleanstring(cols[0])
|
||||||
raw = self.parser.tocleanstring(cols[1])
|
raw = self.parser.tocleanstring(cols[1])
|
||||||
|
label = re.sub(u' - traité le \d+/\d+', '', raw)
|
||||||
|
|
||||||
debit = self.parser.tocleanstring(cols[3])
|
debit = self.parser.tocleanstring(cols[3])
|
||||||
if len(debit) > 0:
|
if len(debit) > 0:
|
||||||
t = FrenchTransaction(0)
|
t = FrenchTransaction(0)
|
||||||
t.parse(date, raw)
|
t.parse(date, raw)
|
||||||
|
t.label = label
|
||||||
t.set_amount(debit)
|
t.set_amount(debit)
|
||||||
yield t
|
yield t
|
||||||
|
|
||||||
|
|
@ -126,5 +128,6 @@ class OperationsPage(BasePage):
|
||||||
if len(amount) > 0:
|
if len(amount) > 0:
|
||||||
t = FrenchTransaction(0)
|
t = FrenchTransaction(0)
|
||||||
t.parse(date, raw)
|
t.parse(date, raw)
|
||||||
|
t.label = label
|
||||||
t.set_amount('-' + amount)
|
t.set_amount('-' + amount)
|
||||||
yield t
|
yield t
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue