Removed unnecessary @property decorations from the transaction data model in the accounting application.

This commit is contained in:
依瑪貓 2020-08-02 10:39:07 +08:00
parent c4ffe5da34
commit 478d0ca035

View File

@ -158,7 +158,6 @@ class Transaction(DirtyFieldsMixin, models.Model):
"""
return [x for x in self.records if not x.is_credit]
@property
def debit_total(self):
"""The total amount of the debit records."""
return sum([x.amount for x in self.debit_records
@ -173,7 +172,6 @@ class Transaction(DirtyFieldsMixin, models.Model):
"""
return [x for x in self.records if x.is_credit]
@property
def credit_total(self):
"""The total amount of the credit records."""
return sum([x.amount for x in self.credit_records
@ -193,7 +191,6 @@ class Transaction(DirtyFieldsMixin, models.Model):
def is_balanced(self, value):
self._is_balanced = value
@property
def has_many_same_day(self):
"""whether there are more than one transactions at this day,
so that the user can sort their orders. """