Skip to content

Commit

Permalink
Beter periods
Browse files Browse the repository at this point in the history
  • Loading branch information
eberloso committed Jul 15, 2020
1 parent 10ba9b6 commit aa5331c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions gestionatr/input/messages/F1.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,13 +522,18 @@ def periodos(self):
)
if period.es_facturable():
data.append(period)
period_number += 1
else:
periodes_no_facturables.append(period)
periodes_no_facturables.append((period, period_number))
period_number += 1
# Per les 6.1 en juny que el P5 no es factura i ens l'envien en preu i quantitat 0 pero igualment sha de
# tenir en compte
if len(periodes_no_facturables) == 1 and period_number == 6:
data.extend(periodes_no_facturables)
for d, period_number in periodes_no_facturables:
period_name = 'P{0}'.format(period_number)
period = self.PERIODO_TYPE(
d, period_name, self.fecha_desde, self.fecha_hasta
)
data.append(period)

return data

Expand Down

0 comments on commit aa5331c

Please sign in to comment.