Untitled

mail@pastecode.io avatar
unknown
plain_text
16 days ago
500 B
3
Indexable
Never
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'  
Leave a Comment