Sort periods in AEAT 303 report

Closes #13707
(grafted from 56008996f232df54746f90ce06a1f2ac3c0c865a)

--HG--
branch : 7.0
This commit is contained in:
Adrià Tarroja Caubet committed 2024-11-28 11:25:55 +01:00
1 parent 2b14c8c6f3
commit ed6257748d
1 file changed
+1 -1
+1 -1
View File
@@ -273,7 +273,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