Hide deprecated taxable toggle in payroll adjustments

Objective

  • Remove or hide the Taxable toggle from payroll adjustment request/submit flows so inspectors and staff are not asked to set a value that does not control payroll export behavior.
  • Reduce confusion during mobile and web adjustment entry: tax treatment is determined by the UKG pay code mapped to the adjustment category in payroll settings, not by the visible toggle.
  • Keep category selection (and UKG mapping configuration) as the operational source of truth.

Background

  • During the mobile payroll-adjustment demo, the team discussed whether Taxable should be preset by category. Chris clarified the toggle is effectively deprecated — UKG pay code drives tax treatment, not the UI control.
  • The current control is misleading for inspectors and payroll admins; the product direction is to hide/remove the toggle rather than ask users to manage a setting that no longer matters.
  • Today (code audit / product triage):
  • Mobilepayroll-adjustment.tsx shows a Taxable Switch (default true) and sends taxable on POST payroll/adjustment.
  • WebAddAdjustmentModal.tsx shows Payment Taxable for the Adjustment form; a useEffect auto-sets taxable from category name (e.g. category containing "reimbursement" → false, else true), but the switch remains visible and editable.
  • UKG exportbuildUKGEarnings.ts maps adjustment totals to UKG using settings.ukgPayrollMapping[category] only; the taxable field is not used in the export payload.
  • Still uses taxable today (in-app only): stored on the adjustment document (payrollSchema.ts), Taxable Yes/No column in PayrollAdjustmentList.tsx, and taxableAdjustmentTotal in payroll overview metrics (overviewRowMetrics.ts).
  • Related shipped work: adjustment categories → UKG pay-type mapping (ATT-1078); mobile job-linked adjustments (ATT-1124).

Scope

Mobile (attik-mobile)

  • app/(app)/inspection/[id]/payroll-adjustment.tsx — remove/hide the Taxable switch from the submit UI.
  • hooks/usePayrollAdjustmentSubmit.ts — continue sending taxable if the API requires it, using a server-side or derived default (see Decisions needed) rather than user input.
  • If non-job-linked mobile adjustment entry exists or ships separately (ATT-1825), apply the same rule there.

Frontend web (attik-frontend)

  • AddAdjustmentModal.tsx — hide/remove the Payment Taxable switch from adjustment create/edit UI; preserve or replace category-based preset logic if taxable remains on the model.
  • Confirm no other request/submit surfaces expose the toggle (adjustment-management admin views may still display historical values — product decision below).

Backend (attik-backend) — likely minimal

  • models/payrollSchema.tstaxable remains on the Adjustment schema unless product retires the field entirely.
  • routes/payrollData.ts — no UKG export change expected; export path already category-driven via frontend buildUKGEarnings.ts.

Out of scope (v1 unless product expands)

  • Changing UKG pay code mapping UI or category configuration.
  • Removing taxable from the database schema / migrations (unless product locks retirement in Decisions needed).
  • Miles / Hours / Sick forms (no Taxable toggle on those form types today).

Done when

  • Inspector mobile job-linked adjustment submit flow has no Taxable toggle.
  • Web Add Adjustment flow has no Payment Taxable toggle.
  • Submitted adjustments still save successfully; UKG export behavior unchanged (category → pay code).
  • No user-facing copy implies the toggle controls UKG tax treatment.

Decisions needed

  1. Surfaces — Hide toggle on request/submit flows only, or also remove Taxable Yes/No column / Non-taxable badges in payroll review and adjustment-management lists?
  2. Stored taxable field — Keep writing a derived value (e.g. category name contains "reimbursement" → false, else true, matching current web logic) for in-app totals, or stop using taxable entirely in v1?
  3. taxableAdjustmentTotal — Retain overview metric based on derived/stored taxable, or deprecate that total when the toggle is hidden?
  4. Admin edit flows — When payroll admins edit an existing adjustment, can they still change taxable, or is it hidden everywhere including edit?
  5. API default — If the client omits taxable, should backend default true, derive from category server-side, or require explicit value?
  6. Communication — Any in-app help text pointing admins to Payroll Settings → UKG mapping by category as the place tax treatment is configured?

References

  • Mobile submit UI: attik-mobile/app/(app)/inspection/[id]/payroll-adjustment.tsx
  • Mobile API hook: attik-mobile/hooks/usePayrollAdjustmentSubmit.ts
  • Web modal: attik-frontend/src/app/tools/hr/AddAdjustmentModal.tsx
  • UKG earnings build: attik-frontend/src/app/tools/hr/payroll/utils/buildUKGEarnings.ts
  • In-app taxable display: PayrollAdjustmentList.tsx, overviewRowMetrics.ts, adjustment-management/AdjustmentLineItem.tsx
  • Backend model: attik-backend/src/models/payrollSchema.ts
  • Related: ATT-1078, ATT-1124, ATT-1825

Please authenticate to join the conversation.

Upvoters
Status

Planned

Board
🏠

Main App

Date

3 days ago

Author

Linear

Subscribe to post

Get notified by email when there are changes.