billing
Your invoice, explained
TL;DR
Draft → Sent → Paid. Once sent, your invoice can’t be silently edited — fixes show as adjustments. Find it in /portal/invoices.
- billing
- invoice
- draft
- sent
Invoice lifecycle
draft → sent → partial → paid (also overdue, void)
- Draft: Staff-only, editable. Not visible to horse owners in
/portal. Add/edit/delete line items. - Sent: Visible in portal. Emailed via Resend if sending email. Uses
security_invoker = trueviews + RLS:TO authenticatedplusclients.user_id = auth.uid()ororganization_membersfor staff. - Partial/Paid: Updated as payments recorded.
- Overdue: Past due date, unpaid balance > 0.
- Void: Cancelled invoice. Requires
owneroradmin. Always logged inaudit_events.
> Invoices are immutable once sent — do not silently edit a sent line. Create adjustment or void+reissue.
Line item anatomy
Each line has: description, horse (horses.id), property (properties.id), service dates, quantity, rate, amount, split % from client_horses, and audit actor/timestamp.
▶Show details for AI/advancedexhaustive reference
Barn staff: Open a support ticket
Horse owners: Message your barn