mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-05-01 11:19:32 -05:00
Determine the start of the financial only for wrapping years.
If the financial year is from Jan to Dec there we do not need to determine the start to see which year it falls into.
This commit is contained in:
parent
82852cc01e
commit
a0c054a5f6
@ -63,9 +63,9 @@ class FinancialYearFilter(admin.SimpleListFilter):
|
||||
|
||||
def _determine_fy(self, date):
|
||||
"""Return a (query, display) financial year tuple of the given date."""
|
||||
fy_start = self._fy_start(date.year)
|
||||
|
||||
if self._fy_does_wrap():
|
||||
fy_start = self._fy_start(date.year)
|
||||
|
||||
if date.date() >= fy_start:
|
||||
query = "{}-{}".format(date.year, date.year + 1)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user