Sort periods in AEAT 303 report

Closes #13707
This commit is contained in:
Adrià Tarroja Caubet
2024-11-28 11:25:55 +01:00
parent 58b10f68df
commit cd060fc20c
+1 -1
View File
@@ -271,7 +271,7 @@ class AEAT303(AEATReport):
context = super().get_context(records, header, data)
amounts = context['amounts']
periods = records
periods = sorted(records, key=attrgetter('start_date'))
start_date = periods[0].start_date
end_date = periods[-1].end_date