Ajout affichage heure en centième dans le décompte annuelle

This commit is contained in:
Ambulance Clerc
2022-05-06 11:54:59 +02:00
parent d9df4f418d
commit b417d81dc6

View File

@@ -66,8 +66,10 @@ class Collabs_hour(models.Model):
if total > 0.0:
hours = int(total)
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 = time.strftime("%H:%M", time.gmtime(total))
else: