Added the has_many_same_day property to the accounting transactions.
This commit is contained in:
parent
e6401e75ae
commit
bf20fc8a72
@ -102,7 +102,12 @@ class Transaction(models.Model):
|
||||
def is_balanced(self, value):
|
||||
self._is_balanced = value
|
||||
|
||||
_has_order_hole = None
|
||||
@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. """
|
||||
return Transaction.objects.filter(
|
||||
date=self.date).count() > 1
|
||||
|
||||
@property
|
||||
def has_order_hole(self):
|
||||
|
Loading…
Reference in New Issue
Block a user