From 25808f4c5a996b90682204e4b7e22ec94cf1bc19 Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Thu, 9 Feb 2017 20:51:09 +0100 Subject: [PATCH] fix select accountings --- billard/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/billard/tasks.py b/billard/tasks.py index 092686d..6bcd39f 100644 --- a/billard/tasks.py +++ b/billard/tasks.py @@ -17,7 +17,7 @@ def process_location_data(): # TODO Send error eMail to Admin else: cli = cli[0] - ac = models.Accounting.objects.filter(client=cli).order_by('time_from').reverse() + ac = models.Accounting.objects.filter(client=cli, desk_no=ld.table_no).order_by('time_from').reverse() if ld.on_off: if ac.count() > 0 and ac[0].time_to is None: ac[0].time_to = datetime.now()