Skip to content

Commit

Permalink
Merge pull request #241 from gisce/fix_consum_2
Browse files Browse the repository at this point in the history
Metode per obtenir el coeficientecortoplazo
  • Loading branch information
eberloso authored Dec 1, 2023
2 parents 115de84 + 67bdc6d commit cff3a96
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions gestionatr/input/messages/B70.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,15 @@ def listaconceptos(self):
data.append(Concepto(d))
return data

def get_coeficientecortoplazo(self):
obj = self.obj
if (hasattr(obj, 'listaconceptos') and
hasattr(obj.listaconceptos, 'concepto')):
for d in obj.listaconceptos.concepto:
if d.coeficientecortoplazo and float(d.coeficientecortoplazo):
return float(d.coeficientecortoplazo)
return 0.0

@property
def listamedidores(self):
data = []
Expand Down

0 comments on commit cff3a96

Please sign in to comment.