billing
Find your statements
TL;DR
Owners: see only your horses in /portal/invoices. Staff: see all properties in /app/billing. Filter by horse or date.
- billing
- portal
- statements
For horse owners
Access: /portal or /owner (aliased). Email/password (Google OAuth post-MVP).
Requirements: clients.user_id = auth.uid() and client_horses link. 50% owner sees 50% invoice only.
What you see: /portal/invoices list (status sent/partial/paid/overdue), grouped property → horse → period; detail with line items, split %, payments, balance; /portal/horses/[id] per-horse history; filters date/property/horse/status.
For staff
/app/billing (org ledger), /app/billing/invoices, /app/clients/[id], /app/horses/[id]. Scoped by organization_members. Views security_invoker = true.
▶Show details for AI/advancedexhaustive reference & AI context
Portal Statements & History — Barnflow Billing
For horse owners
Access: /portal or /owner (aliased). Email/password (Google OAuth post-MVP).
Requirements: clients.user_id = auth.uid() and client_horses link. 50% owner sees 50% invoice only.
What you see: /portal/invoices list (status sent/partial/paid/overdue), grouped property → horse → period; detail with line items, split %, payments, balance; /portal/horses/[id] per-horse history; filters date/property/horse/status.
For staff
/app/billing (org ledger), /app/billing/invoices, /app/clients/[id], /app/horses/[id]. Scoped by organization_members. Views security_invoker = true.
Exports
- Owner: own history CSV.
- Staff: org-wide filtered view for accounting (see QBO export).
Keywords: portal, owner portal, /portal, /owner, statements, history, invoices, RLS, auth.uid, organization_members, security_invoker
Barn staff: Open a support ticket
Horse owners: Message your barn