billing
Splitting one horse’s bill
TL;DR
One horse, two owners — set the % in Horses → Owners. Each owner sees only their share in /portal.
- billing
- split
- client_horses
Source of truth
client_horses links horse to clients with percentage. Drives every split.
| Horse | Owner A | Owner B | Result |
|---|---|---|---|
| Willow | 50% | 50% | $600 board → $300 + $300 |
| Storm | 100% | — | $600 board → $600 to client 42 |
Rule: Percentages per horse must sum to 100% (Zod validation).
How staff sets it up
/app/horses/[horse] → Owners → Add client → set % → Save. Or /app/clients/[client] → Horses.
▶Show details for AI/advancedexhaustive reference & AI context
Split Billing — Barnflow Billing
Source of truth
client_horses links horse to clients with percentage. Drives every split.
| Horse | Owner A | Owner B | Result |
|---|---|---|---|
| Willow | 50% | 50% | $600 board → $300 + $300 |
| Storm | 100% | — | $600 board → $600 to client 42 |
Rule: Percentages per horse must sum to 100% (Zod validation).
How staff sets it up
/app/horses/[horse] → Owners → Add client → set % → Save. Or /app/clients/[client] → Horses.
How it appears
- Staff draft: Lines show raw amount + split % + per-client share.
- Portal: Each owner sees only their share (RLS).
- CSV/QBO export: Includes split % column.
Changing splits
- Mid-cycle: Add new effective-dated
client_horsesrow. Do not edit history. - Correcting prior period: Keep original invoices; issue adjustment/credit or void+reissue if not yet sent.
Why owners cannot see a horse
Check: 1) clients.user_id = auth.uid()? 2) client_horses link? 3) Effective for period? Staff fix: Clients → Link User or Horses → Add owner.
Keywords: split billing, client_horses, ownership, percentage, 50/50, RLS, effective date, portal visibility
Barn staff: Open a support ticket
Horse owners: Message your barn