Sort periods in AEAT 303 report
Closes #13707 (grafted from 56008996f232df54746f90ce06a1f2ac3c0c865a) --HG-- branch : 6.0
This commit is contained in:
1 parent
129ffe0d17
commit
bbaf46ecf2
1 file changed
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user