Removed the account code from the journal entry form for mobile screens.
This commit is contained in:
@ -267,6 +267,19 @@ class LineItemForm(FlaskForm):
|
||||
self.journal_entry_form: JournalEntryForm | None = None
|
||||
"""The source journal entry form."""
|
||||
|
||||
@property
|
||||
def account_title(self) -> str:
|
||||
"""Returns the title of the account.
|
||||
|
||||
:return: The title of the account.
|
||||
"""
|
||||
if self.account_code.data is None:
|
||||
return ""
|
||||
account: Account | None = Account.find_by_code(self.account_code.data)
|
||||
if account is None:
|
||||
return ""
|
||||
return account.title
|
||||
|
||||
@property
|
||||
def account_text(self) -> str:
|
||||
"""Returns the text representation of the account.
|
||||
|
@ -32,6 +32,8 @@ class AccountOption:
|
||||
"""The account ID."""
|
||||
self.code: str = account.code
|
||||
"""The account code."""
|
||||
self.title: str = account.title
|
||||
"""The account title."""
|
||||
self.query_values: list[str] = account.query_values
|
||||
"""The values to be queried."""
|
||||
self.__str: str = str(account)
|
||||
|
@ -54,6 +54,14 @@ class DescriptionAccount:
|
||||
"""
|
||||
return str(self.__account)
|
||||
|
||||
@property
|
||||
def title(self) -> str:
|
||||
"""Returns the account title.
|
||||
|
||||
:return: The account title.
|
||||
"""
|
||||
return self.__account.title
|
||||
|
||||
def add_freq(self, freq: int) -> None:
|
||||
"""Adds the frequency of an account.
|
||||
|
||||
|
Reference in New Issue
Block a user