Functional contract
Clinic tips
Non-taxable tips for staff on issued clinic invoices. Enter a tip at issue, while collecting payment (card terminal), or any time later. Each tip is split into per-staff shares that managers mark paid out, void, or transfer.
Concepts
| Term | Meaning |
|---|---|
| Tip | One InvoiceTip: a split (pooled) tip shared between staff, or a direct tip for one staff member. Entered as a percent or an amount |
| Share | One InvoiceTipAllocation: the part of a tip owed to one staff member, with its own payout status |
| Providers | Distinct provider staff on the invoice lines (platform fee line excluded). Only they can receive a tip when it is entered |
| Pre-tax base | Sum of each line's net − order_discount_share (after line and order discounts, before tax), excluding the platform fee. Percent tips apply to this |
Tips live outside the frozen invoice totals in Invoice#tip_total (the only header field tips change). They are never taxed, never earn commissions, and credit notes never credit them.
Entering tips
| Where | Permission | What you can do |
|---|---|---|
| Checkout order → Issue invoice (and Preview invoice) | invoices.manage | Percent or amount, edit the split, add direct tips |
| Invoice → Tips button | payments.manage | Same full form after issue, including on a paid invoice; choose which payor share is charged |
| Invoice → Collect | payments.manage | Quick split tip saved with the payment; the balance and tender amount update as you type |
Tip rules
- Percent: 10% of a $200 pre-tax base is $20. Amount: a fixed value.
- Default split follows each provider's pre-tax line amounts: $150 / $50 of lines split a $20 tip $15 / $5. Rounding goes to the largest share; all-zero bases split equally.
- The split can be edited; amounts must add up to the tip. Reset split restores the default.
- Direct tips go to one provider on the invoice; several for the same person are summed.
- Editing a tip voids and recreates it, so the client ledger stays append-only (
tip_added/tip_voided). - A tip with any share paid out, voided, or transferred is locked and cannot be changed.
- Lowering tips below what was already paid is rejected (unallocate or refund first). Adding a tip to a paid invoice reopens it as partially paid.
- With payor shares, the tip change goes to the chosen share (default: bill-to); shares always sum to the amount due incl. tips.
Payout status
| From | To |
|---|---|
| Pending payout | Paid out, Voided, Transferred (by a transfer) |
| Paid out | Pending payout, Voided |
| Voided | Pending payout |
| Transferred | Never changes (history) |
Set in bulk on the Tips list with an optional reference or reason. Each change records who and when. Voided means the staff member does not receive the share; the client still owes it and the clinic keeps it, so the invoice does not change. A voided share must go back to pending before it can be paid out.
Transfers
A manager can move all or part of a pending share to another active staff member at the invoice's Location (they do not need to be on the invoice).
- Leave the amount blank to transfer the whole share.
- Rejected: paid-out or voided shares (restore to pending first), the same staff member, staff not active at the Location, 0, or more than the share.
- The invoice, tip total, ledger, and payor shares do not change. The tip becomes locked.
- The Transfer button only shows when someone else at the Location can receive the share.
Where tips show
| Screen | What you see |
|---|---|
| Invoice → Tips section | Current shares only (staff, type, added, status, amount) with a total row equal to the tip total. Shares from a transfer say “From …”. A collapsible Transfer history lists each transfer with date, who, and reason. The summary shows Tips and the amount due incl. tips |
Clinic → Tips (/app/tips) | Filters (status, staff, dates), pending / paid out / voided totals, per-staff summary, rows with status notes, bulk status update, and Transfer. Transferred history rows are listed but never counted |
| Settings → Staff → edit | Tips section: totals per Location and the 10 most recent shares, with a link to the filtered Tips list |
| Client ledger / invoice history | tip_added (+amount, Tip) and tip_voided (−amount, Tip removed) on the bill-to client. Voiding or transferring a share posts nothing |
The Added date is when that share was created: when the tip was entered, or when it was transferred. Lists sort and filter by it. The date under a status is when that status changed. The transfer page keeps your Tips list filters when you cancel or finish.
Permissions
| Role | tips.read | tips.manage (payout, transfer) |
|---|---|---|
| Organization administrator | Yes | Yes |
| Location administrator | Yes | Yes |
| Receptionist | Yes | No |
| Veterinarian | No | No |
Entering tips uses invoices.manage (at issue) or payments.manage (after issue). Plan feature tips is on wherever invoices are (Business + Elite). Requires a Location workspace.
For developers
| Concern | Where |
|---|---|
| Models | InvoiceTip, InvoiceTipAllocation, Invoice#tip_total / #amount_due_total / #tip_providers |
| Base and default split | Sales::TipPlan |
| Create / edit tips | Sales::TipSetter (called by Sales::InvoiceIssuer, the invoice tips form, and collect) |
| Payout status | Sales::TipPayout |
| Transfers | Sales::TipTransfer |
| Ledger | Sales::ClientLedger.post_tip! / .post_tip_void! |
| Controllers | App::TipsController, App::InvoicesController#tips / #update_tips / #create_payments, App::SalesOrdersController#invoice |
| Routes | POST /app/checkout/:id/invoice (tips[...]), GET/PATCH /app/invoices/:id/tips, POST /app/invoices/:id/payments (tips[pooled]), GET /app/tips, PATCH /app/tips/payout, GET/POST /app/tips/:id/transfer |
| Permission helpers | Staff#may_read_tips_at? / #may_manage_tips_at?; sidebar uses #may_read_tips? |
| JS | tip_form_controller.js, payment_collect_controller.js#tipChanged |
Full contract: docs/functional/clinic-tips.md.
Acceptance
- A 10% split tip on a $200 base adds $20 to the amount due, untaxed; $150 / $50 providers get $15 / $5.
- A custom split that does not add up, or a direct tip to staff not on the invoice, is rejected.
- A tip added to a paid invoice reopens it; collecting it marks it paid.
- Paid out, voided, or transferred shares lock the tip.
- Voiding keeps the invoice unchanged; restoring makes the share payable again.
- Transferring $10 of Ana's $15 to Ben shows Ben $10 (From Ana) and Ana $5 on the invoice, total unchanged, with the transfer in history.
- Receptionist can view but not pay out or transfer; veterinarian cannot open the Tips list.
Out of scope: processor-side tips (Stripe Terminal), payroll export, pooling across invoices or shifts, tips on deposits, mobile API.
Related: Clinic commissions, Billing and finance, Appointment to invoice, RBAC.