Feature #671
closedReal payroll-deduction subsidy recovery (reverses ADR-0003 for payroll-mode categories)
0%
Description
Spec: clinq-docs/modules/canteen-management/specs/2026-10-29-payroll-deduction-design.md
Replaces the decorative PayrollDeductionDialog (CSV-only, explicitly not a deduction per its own doc comment) with the real thing, for staff categories HR puts on payroll-deduction recovery mode instead of at-counter:
- HR: SubsidyRule.RecoveryMode becomes genuinely settable per staff category; a new internal endpoint upserts an EmployeeDeduction (component CANTEEN, already seeded) for a given employee+period.
- shared-kernel: IHrServiceContract gains its first cross-module WRITE method, CreateCanteenDeductionAsync (default-bodied for additivity).
- Canteen: new SalePaymentMode.PayrollDeduction (nothing collected at the till, mirrors ToIpBill); SaleService.CreateAsync reordered so the resolved subsidy rule is known before payment-mode validation runs; a new export ledger (PayrollDeductionExport/Line) computed from completed sales (not EmployeeMealAccount, to stay correct across mid-month category changes), written only at send time, one per hospital per period.
- Frontend: one real PayrollDeductionDialog shared by a new Finance > Payroll deduction page and the existing Employee-meals button; POS hardcodes PayrollDeduction as the payment mode for payroll-mode employees, same way it already hardcodes ToIpBill for attendants.
Disputes/ESS workflow explicitly out of scope -- the prototype panel has no real data behind it.
NP Updated by Navya P. 14 days ago
- Status changed from New to Rejected
Stopped by the team before merge -- decided not to pursue payroll-deduction subsidy recovery for now.
What shipped (pushed, inert until something uses it):
- nuvita-hr (feat/canteen-employee-read): Subsidy rules page gained a Recovery mode picker + dynamic badge. Does not change canteen behavior on its own.
- nuvita-shared-kernel (feat/canteen-dietary-order-http-client): IHrServiceContract.CreateCanteenDeductionAsync, dormant (nothing calls it).
What was built but discarded (local only, never pushed, reset back out):
- nuvita-canteen-management: SalePaymentMode.PayrollDeduction, the SaleService payment-mode enforcement, the export ledger tables/migration (applied only to the local dev sandbox), PayrollDeductionService, PayrollDeductionController. 10 tasks, fully implemented and reviewed via subagent-driven-development, then reset out of integration/canteen-v1 at the teams request.
- nuvita-admin: the matching canteen.payroll_deductions.{read,write} permission-key registration -- still sitting locally on feat/canteen-diet-type-master, not yet reset.
No frontend/POS UI work was ever started (the plans Tasks 12-14).
Separately, removed the pre-existing (unrelated, built earlier) decorative "Payroll deduction file" button from the canteen Employee-meals page per a follow-up request -- pushed as 746fde2.