Added the account list as the default page for the unapplied original line items.

This commit is contained in:
2023-04-08 10:01:03 +08:00
parent e5cc2b5a2f
commit 6eee17d44f
8 changed files with 250 additions and 12 deletions

View File

@ -118,10 +118,14 @@ class PageParams(BasePageParams):
:return: The account options.
"""
return [OptionLink(str(x),
unapplied_url(x),
x.id == self.account.id)
for x in get_accounts_with_unapplied()]
options: list[OptionLink] = [OptionLink(gettext("Accounts"),
unapplied_url(None),
False)]
options.extend([OptionLink(str(x),
unapplied_url(x),
x.id == self.account.id)
for x in get_accounts_with_unapplied()])
return options
def get_csv_rows(line_items: list[JournalEntryLineItem]) -> list[CSVRow]: