Fix: cas where impayé raise error
This commit is contained in:
@@ -75,17 +75,30 @@ def fsm():
|
||||
line = yield
|
||||
elif current_state == "add_totaux":
|
||||
if line[0] == "Totaux":
|
||||
row.update(
|
||||
{
|
||||
"Loyers": line[2],
|
||||
"Taxes": line[3],
|
||||
"Provisions": line[4],
|
||||
"Divers": line[5],
|
||||
"Total": line[7],
|
||||
"Réglés": line[8],
|
||||
"Impayés": line[9],
|
||||
}
|
||||
)
|
||||
if line[6] is None:
|
||||
row.update(
|
||||
{
|
||||
"Loyers": line[2],
|
||||
"Taxes": line[3],
|
||||
"Provisions": line[4],
|
||||
"Divers": line[5],
|
||||
"Total": line[7],
|
||||
"Réglés": line[8],
|
||||
"Impayés": line[9],
|
||||
}
|
||||
)
|
||||
else:
|
||||
row.update(
|
||||
{
|
||||
"Loyers": line[2],
|
||||
"Taxes": line[3],
|
||||
"Provisions": line[4],
|
||||
"Divers": line[5],
|
||||
"Total": line[6],
|
||||
"Réglés": line[7],
|
||||
"Impayés": line[8],
|
||||
}
|
||||
)
|
||||
line = yield row
|
||||
row = {}
|
||||
current_state = "new_row"
|
||||
|
||||
Reference in New Issue
Block a user