Renamed the "is_pay_off_needed" column of the Account data model to "is_offset_needed", and the "pay_off_target_id" column of the JournalEntry data model to "original_id".

This commit is contained in:
2023-03-09 17:16:05 +08:00
parent e37f6792c9
commit 5132141c68
8 changed files with 29 additions and 29 deletions

View File

@ -66,8 +66,8 @@ class AccountForm(FlaskForm):
filters=[strip_text],
validators=[DataRequired(lazy_gettext("Please fill in the title"))])
"""The title."""
is_pay_off_needed = BooleanField()
"""Whether the the entries of this account need pay-off."""
is_offset_needed = BooleanField()
"""Whether the the entries of this account need offset."""
def populate_obj(self, obj: Account) -> None:
"""Populates the form data into an account object.
@ -87,7 +87,7 @@ class AccountForm(FlaskForm):
obj.base_code = self.base_code.data
obj.no = count + 1
obj.title = self.title.data
obj.is_pay_off_needed = self.is_pay_off_needed.data
obj.is_offset_needed = self.is_offset_needed.data
if is_new:
current_user_pk: int = get_current_user_pk()
obj.created_by_id = current_user_pk