Skip to content

Commit

Permalink
Merge branch 'fix_canvi_de_preus' into developer
Browse files Browse the repository at this point in the history
  • Loading branch information
ecarreras committed Feb 6, 2012
2 parents 9e9faba + a983c7c commit 26fc254
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions switching/messages/F1.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,12 @@ def get_linies_factura(self):
def get_info_activa(self):
"""Retornat els periodes d'energia"""
periode = []
total = 0
ch = self.factura.EnergiaActiva.TerminoEnergiaActiva.getchildren()
p = 0
for i in ch:
if 'Periodo' in i.tag:
p += 1
periode.append(PeriodeActiva(i, 'P%d' % p))
for ea in self.factura.EnergiaActiva.getchildren():
p = 0
for i in ea.getchildren():
if 'Periodo' in i.tag:
p += 1
periode.append(PeriodeActiva(i, 'P%d' % p))
total = float(self.factura.EnergiaActiva.ImporteTotalEnergiaActiva.text)
return periode, total

Expand Down

0 comments on commit 26fc254

Please sign in to comment.