Skip to content

Commit

Permalink
Merge pull request #252 from gisce/fix_import_decimals_whit_ajust
Browse files Browse the repository at this point in the history
Mejorar el método "get_coeficient_repartiment" para que tenga en cuenta los periodos según la tarifa
  • Loading branch information
eberloso authored Aug 19, 2024
2 parents d644c0b + e13f896 commit 32fe4e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gestionatr/input/messages/F1.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,9 @@ def get_coeficient_repartiment(self):
for periode in terme.Periodo:
if periode and (float(periode.Beta.text) or float(periode.Beta.text) == 0.0):
beta_list.append(float(periode.Beta.text))
# If it's a 2.0TD and we have 6 periods, we pop the last 3 (P4, P5, P6)
if self.datos_factura.tarifa_atr_fact == '018' and len(beta_list) == 6:
beta_list = beta_list[:len(beta_list)-3]
return list(set(beta_list))
except AttributeError:
# We might not have any "Coeficient de repartiment" in EnergiaNetaGen
Expand Down

0 comments on commit 32fe4e4

Please sign in to comment.