feat: tip and payment splitting between staff roles #34
Reference in New Issue
Block a user
Delete Branch "feat/tip-splitting"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implements groombook/groombook#12 — track which staff worked on each pet and calculate tip distribution.
Database:
appointments.bather_staff_id— nullable FK to staff; tracks the bather/assistant who assisted the primary groomerinvoice_tip_splits— ledger of per-staff tip shares (staffName snapshotted for historical accuracy)0007_tip_splitting.sqlBackend:
appointmentsPOST/PATCH now acceptbatherStaffIdGET /api/invoices/:idincludestipSplits[]in responsePOST /api/invoices/:id/tip-splits— saves tip distribution (replaces existing splits, validates percentages sum to 100%)GET /api/reports/tip-splits?from=&to=— payroll summary aggregating tip earnings per staff memberFrontend:
Test plan
GET /api/reports/tip-splits→ returns per-staff tip earnings🤖 Generated with Claude Code