Removed the account code from the journal entry form for mobile screens.

This commit is contained in:
2023-04-18 07:55:00 +08:00
parent a9acc18a6f
commit b6ae946f32
12 changed files with 70 additions and 19 deletions

View File

@ -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.