Untitled

 avatar
unknown
plain_text
9 months ago
500 B
6
Indexable
if attendance.late_checkout_hrs is not None:
                late_checkout_hrs = attendance.late_checkout_hrs
                total_minutes = int(round(late_checkout_hrs * 60))
                hours = abs(total_minutes) // 60
                minutes = abs(total_minutes) % 60
                sign = '-' if late_checkout_hrs < 0 else ''
                attendance.late_checkout_display = f'{sign}{hours:02d}:{minutes:02d}'
            else:
                attendance.late_checkout_display = '00:00'  
Editor is loading...
Leave a Comment