Fixed the documentation of the balance pseudo property of the JournalEntryLineItem data model.

This commit is contained in:
依瑪貓 2023-04-26 13:39:40 +08:00
parent 5956d2cd4c
commit 25bfcf4aa4

View File

@ -779,9 +779,9 @@ class JournalEntryLineItem(db.Model):
@property @property
def balance(self) -> Decimal: def balance(self) -> Decimal:
"""Returns the net balance. """Returns the balance.
:return: The net balance. :return: The balance.
""" """
if not hasattr(self, "__balance"): if not hasattr(self, "__balance"):
setattr(self, "__balance", Decimal("0")) setattr(self, "__balance", Decimal("0"))
@ -789,9 +789,9 @@ class JournalEntryLineItem(db.Model):
@balance.setter @balance.setter
def balance(self, value: Decimal) -> None: def balance(self, value: Decimal) -> None:
"""Sets the net balance. """Sets the balance.
:param value: The net balance. :param value: The balance.
:return: None. :return: None.
""" """
setattr(self, "__balance", value) setattr(self, "__balance", value)