Pauschale 8,60 nur bei Ist-Stunden >= geplanter Anwesenheit (6h)
This commit is contained in:
1 parent
a1f229a502
commit
ebd67c7be1
2 files changed
+14
-1
No files matched your search
+6
-1
@@ -45,6 +45,7 @@ def build_field_dict(
|
||||
creation_date = date.today()
|
||||
|
||||
plan_value: str = config["plan_hours_value"]
|
||||
plan_threshold: float = float(plan_value)
|
||||
pauschale_prefix: str = config["pdf_pauschale_prefix"]
|
||||
pauschale_present_value: str = config["pauschale_present_value"]
|
||||
ort_field: str = config["pdf_field_ort"]
|
||||
@@ -65,7 +66,11 @@ def build_field_dict(
|
||||
if entry.is_present:
|
||||
fields[f"ist.{idx}"] = entry.hours_german()
|
||||
fields[f"plan.{idx}"] = plan_value
|
||||
fields[f"{pauschale_prefix}.{idx}"] = pauschale_present_value
|
||||
# Pauschale only if actual hours >= planned threshold
|
||||
if entry.hours is not None and entry.hours >= plan_threshold:
|
||||
fields[f"{pauschale_prefix}.{idx}"] = pauschale_present_value
|
||||
else:
|
||||
fields[f"{pauschale_prefix}.{idx}"] = "0"
|
||||
else:
|
||||
fields[f"ist.{idx}"] = ""
|
||||
fields[f"plan.{idx}"] = ""
|
||||
|
||||
Reference in new issue
Block a user