(20260309) Added new 'mode' for formatting the muster roll'.
This commit is contained in:
+7
-5
@@ -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:
|
||||
|
||||
+1
-1
@@ -351,7 +351,7 @@ if __name__ == "__main__":
|
||||
import argparse
|
||||
ap = argparse.ArgumentParser()
|
||||
ap.add_argument(
|
||||
"--test",
|
||||
"--test", "--test-mode",
|
||||
action = "store_true",
|
||||
default = False,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user