Skip to content

Commit

Permalink
Merge pull request #636 from gisce/a1-autoconsum
Browse files Browse the repository at this point in the history
A1: Informar si autoconsumo colectivo
  • Loading branch information
ecarreras authored Mar 21, 2024
2 parents 91fad4a + 2410a6d commit f3a099e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions libcnmc/cir_8_2021/FA1.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,10 +457,12 @@ def consumer(self):

if autoconsum_id_data:
# AUTOCONSUMO
o_autoconsumo = 1
autoconsum_id = autoconsum_id_data[0]
autoconsum_data = O.GiscedataAutoconsum.read(autoconsum_id, ['cau', 'tipus_autoconsum',
'generador_id', 'codi_cnmc'])
autoconsum_data = O.GiscedataAutoconsum.read(autoconsum_id, [
'cau', 'tipus_autoconsum', 'generador_id', 'codi_cnmc',
'collectiu',
])
o_autoconsumo = autoconsum_data['collectiu'] and 2 or 1
# COD_AUTO
if autoconsum_data.get('codi_cnmc', False):
o_cod_auto = autoconsum_data['codi_cnmc']
Expand Down

0 comments on commit f3a099e

Please sign in to comment.