Tweak how empty hours are displayed in time sheet
This commit is contained in:
parent
77ce81dec0
commit
be7108bcda
|
@ -81,13 +81,13 @@ class TimeSheetView(View):
|
|||
else:
|
||||
break
|
||||
|
||||
empday['hours_display'] = ''
|
||||
empday['hours_display'] = '0'
|
||||
if empday['hours']:
|
||||
minutes = (empday['hours'].days * 1440) + (empday['hours'].seconds / 60)
|
||||
empday['hours_display'] = '{}:{:02d}'.format(minutes // 60, minutes % 60)
|
||||
employee.weekdays.append(empday)
|
||||
|
||||
employee.hours_display = ''
|
||||
employee.hours_display = '0'
|
||||
if employee.hours:
|
||||
minutes = (employee.hours.days * 1440) + (employee.hours.seconds / 60)
|
||||
employee.hours_display = '{}:{:02d}'.format(minutes // 60, minutes % 60)
|
||||
|
|
Loading…
Reference in a new issue