clean up code

This commit is contained in:
Robert Einsle 2017-02-11 10:36:38 +01:00
parent 3a49658f21
commit 0f6805ea4e

View File

@ -15,9 +15,7 @@ def display_client(client, desk_no):
desk = desks[0]
if not desk.enabled:
return ''
alert = 'alert-success'
#acc = Accounting.objects.filter(client=client, desk_no=desk_no)[:3][::-1]
acc = desk.accounting_set.all()[:3][::-1]
if acc is not None and len(acc) > 0:
a = acc[-1]
@ -27,7 +25,6 @@ def display_client(client, desk_no):
prize = '{0:.2f}'.format(prize)
if prize != a.prize:
a.prize = prize
html = '<div class="col-md-6">\n'
html += ' <div class="col-md-12 table-info alert {}">\n'.format(alert)
html += ' <h4 style="text-align: center">({}) {}</h4>\n'.format(desk_no, desk.name)