From 67bdc6d07daa5074ef8e6994112bbf35a1e67d6c Mon Sep 17 00:00:00 2001 From: eberloso Date: Fri, 1 Dec 2023 15:43:15 +0100 Subject: [PATCH] Metode per obtenir el coeficientecortoplazo --- gestionatr/input/messages/B70.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gestionatr/input/messages/B70.py b/gestionatr/input/messages/B70.py index b657e5a1..97b793ca 100644 --- a/gestionatr/input/messages/B70.py +++ b/gestionatr/input/messages/B70.py @@ -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 = []