Add cash register summary view

This commit is contained in:
Skia committed 2016-09-13 02:04:49 +02:00
1 parent b0ce448ec7
commit 6cf253365b
8 files changed
+171 -48

No files matched your search

+8
View File
@@ -346,6 +346,14 @@ class CashRegisterSummary(models.Model):
def __str__(self):
return "At %s by %s - Total: %s €" % (self.counter, self.user, self.get_total())
def is_owned_by(self, user):
"""
Method to see if that object can be edited by the given user
"""
if user.is_in_group(settings.SITH_GROUPS['counter-admin']['name']):
return True
return False
def get_total(self):
t = 0
for it in self.items.all():