Revised the journal, the ledger, the income and expenses log, and the search result to show the last page first as the default upon pagination.
This commit is contained in:
parent
34f63c1cdf
commit
61c111db69
@ -435,7 +435,7 @@ class IncomeExpenses(BaseReport):
|
||||
if self.__total is not None:
|
||||
all_entries.append(self.__total)
|
||||
pagination: Pagination[ReportEntry] \
|
||||
= Pagination[ReportEntry](all_entries)
|
||||
= Pagination[ReportEntry](all_entries, is_reversed=True)
|
||||
page_entries: list[ReportEntry] = pagination.list
|
||||
has_data: bool = len(page_entries) > 0
|
||||
brought_forward: ReportEntry | None = None
|
||||
|
@ -209,7 +209,7 @@ class Journal(BaseReport):
|
||||
:return: The report as HTML.
|
||||
"""
|
||||
pagination: Pagination[JournalEntry] \
|
||||
= Pagination[JournalEntry](self.__entries)
|
||||
= Pagination[JournalEntry](self.__entries, is_reversed=True)
|
||||
params: PageParams = PageParams(period=self.__period,
|
||||
pagination=pagination,
|
||||
entries=pagination.list)
|
||||
|
@ -384,7 +384,7 @@ class Ledger(BaseReport):
|
||||
if self.__total is not None:
|
||||
all_entries.append(self.__total)
|
||||
pagination: Pagination[ReportEntry] \
|
||||
= Pagination[ReportEntry](all_entries)
|
||||
= Pagination[ReportEntry](all_entries, is_reversed=True)
|
||||
page_entries: list[ReportEntry] = pagination.list
|
||||
has_data: bool = len(page_entries) > 0
|
||||
brought_forward: ReportEntry | None = None
|
||||
|
@ -199,7 +199,7 @@ class Search(BaseReport):
|
||||
:return: The report as HTML.
|
||||
"""
|
||||
pagination: Pagination[JournalEntry] \
|
||||
= Pagination[JournalEntry](self.__entries)
|
||||
= Pagination[JournalEntry](self.__entries, is_reversed=True)
|
||||
params: PageParams = PageParams(pagination=pagination,
|
||||
entries=pagination.list)
|
||||
return render_template("accounting/report/search.html",
|
||||
|
Loading…
Reference in New Issue
Block a user