Anzeige des PReises pro Tisch
This commit is contained in:
Robert Einsle 2017-02-26 10:32:38 +01:00
parent 2e6cc938aa
commit 9ed10884e2

View File

@ -13,6 +13,7 @@ def display_client(client, desk_no):
if len(desks) == 0:
return ''
desk = desks[0]
loc = desk.client.location
if not desk.enabled:
return ''
alert = 'alert-success'
@ -25,8 +26,8 @@ def display_client(client, desk_no):
start=a.time_from,
end=datetime.now(),
pph=desk.prize,
hh_start=desk.client.location.happy_hour_start,
hh_end=desk.client.location.happy_hour_end,
hh_start=loc.happy_hour_start,
hh_end=loc.happy_hour_end,
pphh=desk.prize_hh,
)
prize = '{0:.2f}'.format(prize)
@ -35,6 +36,16 @@ def display_client(client, desk_no):
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)
if loc.happy_hour_start is not None and desk.prize_hh is not None:
html += ' <h5 style="text-align: center">Preis: {:.2f} € / Stunde | {} - {}: {:.2f} / € Stunde</h5a>\n'\
.format(
desk.prize,
loc.happy_hour_start,
loc.happy_hour_end,
desk.prize_hh,)
else:
html += ' <h5 style="text-align: center">Preis: {0:.2f} / Stunde</h5a>\n'.format(
desk.prize,)
if len(acc) > 0:
html += ' <table class="table">\n'
for a in acc: