Functional contract
Catalog and pricing
Shipped. The Organization owns one master catalog. Each Location inherits master values unless it has an explicit override. Do not copy the whole catalog per Location.
Master catalog
Organization-scoped list of catalog items. Staff open /app/catalog. Organization administrators create and edit master items (catalog.manage). Location administrators override unlocked price and enabled at granted Locations (catalog.override). Categories are managed in Admin.
| Attribute | Role |
|---|---|
| Name, SKU | Shared identity across the group (code column; labeled SKU in the UI) |
| Category | Platform category (Procedure, Service, Kit, Product). Bundle categories may include other items with quantities. The form shows each component's unit price, line total (price × quantity), and a reference items total; the bundle price is entered separately. |
| Default price | Inherited by Locations with no override |
| Enabled | Whether the item is offered by default (disabled_at) |
lock_local_overrides | When true, Locations cannot change overridable attributes |
stock_control | none, quantity, or batch. Organization-owned. New items inherit the category default. See Inventory |
Overridable attributes today: price and enabled. stock_control is not overridable.
Location exceptions
A Location stores only differences, not a second catalog.
| Case | Price shown at Location A |
|---|---|
| No exception row | Master price (inherited) |
| Exception row with a price | That price (overridden) |
| Master item locked | Master price; Location cannot save an exception |
Resolving the price: locked → master; else exception if present; else master. Disabled-at-Location is an override.
Who may change what
| Actor | Master catalog | Lock | Location override |
|---|---|---|---|
| Organization admin | Create, edit | Set or clear | May set or clear any Location’s exception |
| Location administrator | No (except exclusive items when the policy is on) | No | Only unlocked attributes, only at granted Locations |
| Staff | No | No | No |
Workspace scope decides what the catalog shows, including for Organization administrators:
- Location workspace: only items visible at the current Location. No other Location names, grants, or per-site override table. An Organization administrator may still edit, promote, or override the current Location.
- Organization workspace: the master list, every exclusive item, and all Location names (overrides and grants). Location-only staff pick a Location first, same as the schedule.
Location-exclusive items
Default: Location administrators cannot create new items. Organization policy allow_location_exclusive_items (off by default; Settings → Hierarchy):
- When off, new items are created only on the master catalog by an Organization admin.
- When on, a Location administrator may create an item that exists only at granted Locations. Other sites do not inherit it until an Organization admin promotes it (or grants extra Locations).
Acceptance
- An item at a Location with no exception uses the master price.
- Saving an override at A does not change B or the master price.
- Clearing an override returns that Location to the master price and enabled flag.
- A locked item rejects Location-administrator edits and uses the master price even if an old exception row exists.
- With exclusive-items policy off, a Location administrator has no “create item” action.
- With the policy on, an exclusive item created at A does not appear at B until promoted (or granted to B).
- In a Location workspace, even an Organization administrator sees only that Location’s catalog and no other Location names. The Organization workspace shows every item and every Location.
- Checkout must snapshot the effective price. Checkout is not built yet.
Out of scope: invoice legal header (Billing), membership plans.