Skip to content

Commit

Permalink
Check minimum fields methods (R1)
Browse files Browse the repository at this point in the history
  • Loading branch information
a-orellana committed Nov 29, 2024
1 parent f6be9f9 commit 795669c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions gestionatr/input/messages/R1.py
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,24 @@ def check(self):
errors.append(field)
return errors

def check_tipo_disconforme_autoconsumo(self):
for var in self.r1.variables_detalle_reclamacion:
if not var.disconformidad_autoconsumo:
return False
return len(self.r1.variables_detalle_reclamacion) > 0

def check_CAU(self):
for var in self.r1.variables_detalle_reclamacion:
if not var.CAU:
return False
return len(self.r1.variables_detalle_reclamacion) > 0

def check_motivo_consulta(self):
for var in self.r1.variables_detalle_reclamacion:
if not var.motivo_consulta:
return False
return len(self.r1.variables_detalle_reclamacion) > 0

def check_nif_cliente(self):
return get_rec_attr(self.r1, "cliente.identificador", False)

Expand Down

0 comments on commit 795669c

Please sign in to comment.