Added the ledger summary in the accounting application.

This commit is contained in:
2020-07-17 00:12:30 +08:00
parent d9ccefa27c
commit 70c3f01368
4 changed files with 221 additions and 5 deletions

View File

@ -324,6 +324,7 @@ class RecordSummary(models.Model):
month = models.DateField(primary_key=True)
credit_amount = models.PositiveIntegerField()
debit_amount = models.PositiveIntegerField()
balance = models.IntegerField()
_label = None
@ -337,10 +338,6 @@ class RecordSummary(models.Model):
def label(self, value):
self._label = value
@property
def balance(self):
return self.credit_amount - self.debit_amount
_cumulative_balance = None
@property