# v0.39.4-dev Consolidated — P0 Static Implementation Evidence

Project: `HRPAY-BMD-20260911-01`

This file records **source-level implementation evidence only**. It does not convert a Critical/P0 item to Final PASS. Formal closure requires the matching Local Django/PostgreSQL UAT scenario; QA-002 additionally requires physical ZKTeco FO-M1 proof.

| QA | Source-level remediation evidence | Static status | Runtime gate |
|---|---|---|---|
| QA-002 | `ingest_punch()` maps punch and calls `sync_attendance_from_punches()`; daily record + reconciliation follows. | PASS | FO-M1 + DB |
| QA-006 | Effective `SalaryStructureLine` components are evaluated and snapshotted as payroll line items. | PASS | DB payroll reconciliation |
| QA-009 | Import has Upload/Validate/stage row errors/Confirm transaction path. | PASS | DB import UAT |
| QA-018 | Service bounds start at joining date and partial segment factor prorates salary. | PASS | Join-midmonth UAT |
| QA-019 | Salary segments split by effective assignment across the month. | PASS | Revision-midmonth UAT |
| QA-020 | Reconciliation creates missing normal workdays as absence per effective policy. | PASS | Missing-day UAT |
| QA-021 | One `AttendanceDayLedger` row/date carries one deduction fraction; payroll consumes it once. | PASS | Unpaid-leave UAT |
| QA-028 | Payroll attendance deduction consumes the authoritative day ledger. | PASS | Ledger reconciliation |
| QA-029 | Exit salary is calculated through Final Working Day and subtracts salary already posted as paid. | PASS | Exit payroll UAT |
| QA-030 | Final Working Day is explicitly finalized and required for settlement. | PASS | Exit workflow UAT |
| QA-031 | Settlement payment posts idempotent exit-loan recovery and closes loan ledger. | PASS | Exit loan UAT |
| QA-036 | Payroll build/review requires finalized attendance; payroll snapshot is fingerprinted to the current attendance close. | PASS | Reopen/refinalize UAT |
| QA-037 | Explicit `UserCompanyAccess` and server-side queryset/object company guards are present. | PASS | Two-company security UAT |
| QA-050 | Shared company-scoped Django Admin mixin is applied to tenant HR/payroll models including FK scoping. | PASS | Two-company Admin UAT |
| QA-062 | Approved leave immediately re-runs daily attendance reconciliation. | PASS | Leave/attendance UAT |
| QA-064 | Attendance period has exception check, finalize, controlled reopen, edit lock and audit. | PASS | Close/reopen UAT |
| QA-079 | Report index/exports scope data to `accessible_company_ids()`. | PASS | Two-company export UAT |
| QA-082 | Effective-dated `CompanyPolicy` is persistent, UI-managed, audited and consumed by attendance/payroll. Current/effective versions are immutable in normal UI; change is via new version. | PASS | Policy-version UAT |

## Additional control retained from prior remediation
If attendance is reopened and later re-finalized, its finalization fingerprint changes. A Draft payroll calculated against the old close is blocked from moving to Review until it is rebuilt. Attendance cannot be reopened while the payroll period is already Reviewed, Approved or Locked.

Run `python tools/p0_static_verify.py` from the package root for the repeatable static check.
