Changed the decorated @property balance to a real property in the Record data model in the accounting application, for simplicity.
This commit is contained in:
parent
f3e2280041
commit
377b25f669
@ -276,7 +276,7 @@ class Record(DirtyFieldsMixin, models.Model):
|
|||||||
super(Record, self).__init__(*args, **kwargs)
|
super(Record, self).__init__(*args, **kwargs)
|
||||||
self._debit_amount = None
|
self._debit_amount = None
|
||||||
self._credit_amount = None
|
self._credit_amount = None
|
||||||
self._balance = None
|
self.balance = None
|
||||||
self._is_balanced = None
|
self._is_balanced = None
|
||||||
self._has_order_hole = None
|
self._has_order_hole = None
|
||||||
self._is_credit_card_paid = None
|
self._is_credit_card_paid = None
|
||||||
@ -316,14 +316,6 @@ class Record(DirtyFieldsMixin, models.Model):
|
|||||||
def credit_amount(self, value):
|
def credit_amount(self, value):
|
||||||
self._credit_amount = value
|
self._credit_amount = value
|
||||||
|
|
||||||
@property
|
|
||||||
def balance(self):
|
|
||||||
return self._balance
|
|
||||||
|
|
||||||
@balance.setter
|
|
||||||
def balance(self, value):
|
|
||||||
self._balance = value
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_balanced(self):
|
def is_balanced(self):
|
||||||
"""Whether the transaction of this record is balanced. """
|
"""Whether the transaction of this record is balanced. """
|
||||||
|
Loading…
Reference in New Issue
Block a user