Ajout affichage heure en centième dans le décompte annuelle
This commit is contained in:
@@ -66,8 +66,10 @@ class Collabs_hour(models.Model):
|
|||||||
if total > 0.0:
|
if total > 0.0:
|
||||||
hours = int(total)
|
hours = int(total)
|
||||||
minutes = (total*60) % 60
|
minutes = (total*60) % 60
|
||||||
|
cent_min = float(minutes/60) + hours
|
||||||
|
print(f"{minutes}/60= {float(minutes/60)} {hours}+{float(minutes/60)}={cent_min}")
|
||||||
|
|
||||||
ret_string = ("%d:%02d" % (hours, minutes))
|
ret_string = ("%d:%02d (%.2f)" % (hours, minutes, cent_min))
|
||||||
#ret_string = str(int(math.floor(total))) + ':' + str(int((total%(math.floor(total)))*60)) + f" ({total})"
|
#ret_string = str(int(math.floor(total))) + ':' + str(int((total%(math.floor(total)))*60)) + f" ({total})"
|
||||||
#ret_string = time.strftime("%H:%M", time.gmtime(total))
|
#ret_string = time.strftime("%H:%M", time.gmtime(total))
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user