(20260309) Added new 'mode' for formatting the muster roll'.

This commit is contained in:
2026-03-09 17:25:35 +05:30
parent c3ab2e4d9a
commit 4350435a01
8 changed files with 94 additions and 16 deletions
+7 -5
View File
@@ -620,14 +620,16 @@ def compute_work_done(
work_ot_seconds = max(0.0, work_seconds - min_work_seconds)
# Finally, compute the work status.
# 'A' --> Absent
# 'H' --> Half Day
# 'P' --> Present (Full Day)
# 'OT' -> Overtime
# 'A' ----> Absent
# 'H' ----> Holiday
# 'HD1' --> Half Day (1st Half)
# 'HD2' --> Half Day (2nd Half)
# 'P' ----> Present (Full Day)
# 'OT' ---> Overtime
work_hours = work_seconds / (60 * 60)
if work_hours > 10.0: work_status = "OT"
elif 7.5 < work_hours <= 10.0: work_status = "P"
elif 4.5 < work_hours <= 7.5: work_status = "H"
elif 4.5 < work_hours <= 7.5: work_status = "HD1"
else: work_status = "A"
# Save the data: