Sort periods in AEAT 303 report

Closes #13707
(grafted from 56008996f232df54746f90ce06a1f2ac3c0c865a)

--HG--
branch : 6.0
This commit is contained in:
Adrià Tarroja Caubet committed 2024-11-28 11:25:55 +01:00
1 parent 129ffe0d17
commit bbaf46ecf2
1 file changed
+1 -1
+1 -1
View File
@@ -261,7 +261,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