Skip to content

Commit

Permalink
Add parameter productes_exclosos in get_periode_factura
Browse files Browse the repository at this point in the history
  • Loading branch information
a-orellana committed Jun 14, 2024
1 parent 3883fbb commit 62c3334
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions gestionatr/input/messages/B70.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,14 +604,16 @@ def codtbai(self):
else:
return False

def get_periode_factura(self):
def get_periode_factura(self, productes_exclosos=None):
"""Retorna tupla amb (data inici, data fi) de la factura:
- data inici: la mes antiga de les fecdesde dels conceptes
- data fi: la mes nova de les fechasta dels conceptes
"""
if productes_exclosos is None:
productes_exclosos = []
return (
min([x.fecdesde for x in self.listaconceptos]),
max([x.fechasta for x in self.listaconceptos])
min([x.fecdesde for x in self.listaconceptos if x.codconcepto not in productes_exclosos]),
max([x.fechasta for x in self.listaconceptos if x.codconcepto not in productes_exclosos])
)

def get_periode_factura_peatges(self):
Expand Down

0 comments on commit 62c3334

Please sign in to comment.