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()