Skip to content

Behaviour

Nesting

Invoice Audit: Office › Vendor branch › Invoice › Line

N-01 N-02 N-04 N-09 F-02 N-05 N-06

Search for a line and every branch holding a hit opens. Pick an office and the other offices hide. The two-or-fewer rule opens the remaining tree. Money rolls up from the line to the office.

Scope
Dallas$4,644 at risk7 lines
ABC Supply · Branch 412 Garland$4,416 at risk2 invoices
INV 88412-0931Oct 28$1,946 at risk3 lines
LineQtyVarianceAt riskStatus
GAF Timberline HDZ, Charcoal64+3.2%$1,946Over agreement
ProStart starter strip12+0.0%$0Matches
Ice & water shield 2 sq8-1.1%$0Under agreement
INV 88412-0977Oct 30$2,470 at risk2 lines
LineQtyVarianceAt riskStatus
Drip edge 10′ white40+6.5%$2,470Over agreement
Ridge vent 4′18+0.0%$0Matches
SRS · Richardson TX$228 at risk1 invoice
INV S-551870Oct 29$228 at risk2 lines
LineQtyVarianceAt riskStatus
Owens Corning Duration, Onyx72+0.0%$0Matches
Synthetic underlayment10+2.4%$228Over agreement
Wichita$0 at risk2 lines
QXO · Wichita North$0 at risk1 invoice
INV Q-20761Oct 27$0 at risk2 lines
LineQtyVarianceAt riskStatus
CertainTeed Landmark, Weathered Wood55+0.0%$0Matches
Pipe boot 3″14+0.0%$0Matches

Example data for the specimen. Apps show live records from Supabase only, and never sample rows (E-01).

The canonical trees

N-01
DomainTreeSurfaces
Accounting (CC)PE Office › Vendor branch › Invoice › LineInvoice Audit, Credit Memos, Order Audit (Order in place of Invoice), Agreement Builder (› Category › Item › Variation)
Collections (CC/CRM)Office › Sales rep › Job › Collection lineFriday WIP/AR, weekly collection plan
Sales (CRM)Office › Sales rep › Trade › Estimate / JobJobs, My jobs, Customers, Properties
People (HR, Admin)Office › Department or role group › PersonPeople, Staff, Org chart
Field (PM)Office › Crew › JobSchedule, Crews

Behaviour rules

N-03 N-07 N-08 N-11 N-13
  • Two or fewer top-level nodes open automatically.
  • Links and inputs inside a bar never toggle it.
  • The default sort is money first, by amount at risk descending.
  • Re-rendering keeps open state. State persists per surface, and a deep link wins.
  • One read per surface: no per-row fetches.