| name | project-mtp-hr-payroll-study | ||
|---|---|---|---|
| description | HR-Payroll module study complete (2026-05-21). 13 clusters + 4 cross-cuts. Non-obvious legacy gaps and 5-prefix HRP+HRA+HRL+HRT+HRC split documented. | ||
| metadata |
|
HR-Payroll module study complete on 2026-05-21. Source-of-truth: gnums/hr-payroll/scope.html + 17 cluster docs under gnums/hr-payroll/clusters/.
Why: User mandated total custom-procedure coverage (no skipping) across all 5 sibling prefixes before the MTP rebuild begins. Cluster 10 (salary generation) is the load-bearing algorithm.
How to apply: Read this memory first when any future work touches HR, Payroll, Attendance, Leave, Compensation, or Training. Reach for the cluster docs for the detail; reach for scope.html for the consolidated map.
- 5 sibling prefixes: HRP / HRA / HRL / HRT / HRC.
- 112 tables observed in 2019 dump (101 HRP + 11 HRT). HRA / HRL / HRC are procedure-only in live DB — they have BAL/DAL/ENT classes in
App_Code/BAL/HRPayRoll_Pro/and UI inAdminPanel/HRPayRoll_Pro/but no tables/SPs in the file dump. - 1,308 procedures observed (1,170 PR_ + 138 PP_).
- 314 custom SPs post-CRUD filter (all studied; no skipping per user mandate).
- 205 RDLC reports (159 legacy + 46 next-gen).
- 7 heavyweight coordinator classes: ProcessSalary, PayDaysCalculation(+_New), ProcessTimer, EPF, StaffWiseCollegeTiming, HRP_StaffWiseSalaryStructureLogic.
- 108 distinct user-facing THROW messages (249 call sites + 1,298 re-raisers). 0 RAISERROR — all modern
;THROW.
- HRP_Staff is a shared-PK 1:1 sidecar of STF_Staff. No autonomous identity. Lazy row creation. Fractional-month ProbationPeriod encoding.
- EPF.cs is broken. Employer share always Null; EPS opt-out commented out. Real PF math runs inline in ProcessSalary.cs.
- Davda is an OEM vendor, not a tenant. Separate biometric punch table family.
- The 57 KB SelectForReturnIncome SP is the income-tax return calc. Biggest SP in the entire dump.
- 15+ tenant-variant forks of MonthlySalaryRegister. Tenant codes: GU, PU, KPGU, PPSU, DU, IU, KKSPTC, SMVIT, BMSITM, ITMBU, MEU, SPU, DSI.
- Developer-name forks of LeaveApplication_Insert:
_Parth,_JaySagpariya. Legacy debt. - Sandwich-leave SQL Agent job runs nightly to bracket weekends/holidays around adjacent leave days. Named
_InsertSandwitchLeave_SQLAgent(note typo). - Mobile-app SP silently overrides client time for missed-punch + leave-status updates.
- 30+ legacy typos in domain names baked into table/SP names: Sandwitch, Withdrawl, Calender, Frist, Traning, Traninig, Utilitation, Allottment, Condolonce, Referal/Referral, hench, IsResistrationRequired, ScheduleWiseDepartment exists with TWO typos AND a correctly-spelled twin.
- Formula expression stored as
nvarchar(300)text; evaluated viaDataTable.Compute+ Shunting-Yard validator. No AST. - Geetanjali tenant fork embedded inside InOutPunch CASE statement (not in SP name).
- No statutory e-filing wires. Legacy generates printable EPF/ESI/PT/TDS challans + registers but NO machine-readable ECR / FVU / ESIC / state-PT file. Each tenant manually transcribes printable to portal.
- 111 LOG_/LOJ_ audit shadow tables for HR-Payroll alone — violates hard rule #8 (single event-sourced audit stream).
- HRC_ApprovalFlow + ApprovalFlowTran + ApprovalType is the next-gen generic approval engine — concept exists in live DB only, not in 2019 dump tables.
- 141 columns on legacy CFG_HRPayRollConfiguration, 133 fields across the four next-gen HRC_ config tables (HRConfig 50 + PayRollConfig 60 + LeaveCycle 11 + ApprovalFlow 12).
- HRT triple-spelling pathology:
TraninigScheduleWiseDepartment(two typos) +TraningScheduleTutor(one typo) +TrainingScheduleWiseDepartment(correct) all coexist.
- Preserve HRP+HRA+HRL+HRC concept boundaries as aggregates inside one MTP module (not three modules — per repo topology ADR).
- Recompose 51 KB UPSERTSalary SP as a .NET saga with explicit steps + Quartz.NET scheduling.
- Formula as AST (JSON), not text.
- HRC_ApprovalFlow becomes the single approval engine for leave / missed-punch / structure change / loan / F&F / manpower.
- Statutory e-filing build-out priority: ECR (EPFO) > FVU 24Q (NSDL) > ESIC > state PT.
- Drop: all developer-name forks, all datestamped snapshots, EPF.cs, the two typo'd HRT mappings.
See [[project-mtp-staff-study]] and [[project-mtp-accounting-study]] for the sibling module syntheses.