Revised to capitalize the account titles when initializing the base accounts instead of when displaying the account titles, so that the titles of the user-added accounts are not capitalized incorrectly.

This commit is contained in:
2023-07-26 20:49:06 +08:00
parent 9ae8c1bce9
commit 5ffd37c859
29 changed files with 134 additions and 56 deletions

View File

@ -54,7 +54,7 @@ class BaseAccount(db.Model):
:return: The string representation of the base account.
"""
return f"{self.code} {self.title.title()}"
return f"{self.code} {self.title}"
@property
def title(self) -> str:
@ -151,7 +151,7 @@ class Account(db.Model):
:return: The string representation of this account.
"""
return f"{self.base_code}-{self.no:03d} {self.title.title()}"
return f"{self.base_code}-{self.no:03d} {self.title}"
@property
def code(self) -> str: