StabisoDocs

Purchasing and stock

Capacity: rooms, seats and people's time

Not everything a company sells comes out of a warehouse. A hotel sells rooms by the night, a training centre its rooms by the day, a consultancy its people's hours. Capacity is what such a company sells by the time slot: what is free on each day, and bookings that never take more than is free (ADR-0103). Goods stay with stock; nothing here is valued or posted.

What is sold by the slot

  • A capacity item is a product sold per unit that is not goods (a service; see products), made bookable with its slot and its units in each slot (POST /v1/capacity-items, or Capacity and bookings → Sell by the slot):

    Slot For Units, for example
    night hotel rooms, holiday flats 12 double rooms a night
    day meeting rooms, seats, equipment, a person's day 1 training room a day
    hour people's time 24 hours a day of three consultants
  • The slot never changes. The units change (PATCH /v1/capacity-items/{product_id}), but never to fewer than are booked on a day from today on: the refusal (capacity_booked) names the first such day. Cancel bookings first, or keep more units.

  • A product that is goods is kept in stock instead (capacity_item_not_service); a product is either kept in stock or sold by the slot, never both.

What is free

  • On each day, an item's free units are its units less the units of its bookings that cover the day. For a night, the day is the night that starts on it.
  • GET /v1/capacity-items/{product_id}/availability gives the units, the booked units and the free units of each day of a span (default: today and the next 13 days; at most a year). The screen shows the next two weeks of every item, with fully booked days in red.

Bookings

  • A booking (POST /v1/capacity-bookings) takes a quantity of an item in every slot from its first day to its last day, both included: two rooms for the nights of 3 and 4 November, the training room on 16 and 17 November, eight hours a day of the consultants for a week. A stay that leaves on the 5th books the nights up to the 4th; the screen asks a room's booking for arrival and departure and works this out.
  • It may name a customer of the company, and carries a reference (an order number, a guest's name) and a note. It gets a gap-free number per company and year (BK-2026-000001).
  • It is refused when any of its days has fewer units free than it asks for (capacity_full, with the first such day, what is free and what was asked for). The item is locked while its days are checked, so two bookings at the same moment never both take the last room.
  • A booking never changes and is never deleted: it is cancelled once (POST /v1/capacity-bookings/{booking_id}/cancel), which frees its units. To change a booking, cancel it and book again.
  • Nothing posts. A booking is invoiced like any other sale, on an invoice with the item's product.
  • A booking another module made is held by it (held_by): a hotel stay's rooms (hospitality) are cancelled with the stay, never on their own (booking_held); the screen shows them without Cancel booking.

Assistants

An assistant (over MCP) lists what is sold by the slot (list_capacity_items), reads what is free (capacity_availability), books (book_capacity), cancels (cancel_capacity_booking), lists bookings (list_capacity_bookings), makes a product bookable (create_capacity_item) and changes its units (update_capacity_item), under the same rules: it never books more than is free.

Industry packs

Capacity is the base the industry packs build on, each a separate module on top of it: hospitality (room types, seasonal rates, stays from reservation to invoice) and, next, professional services (time sheets, utilisation and billing from time). A pack builds on capacity: it names it in its manifest's requires and uses only its public face (erp.features.capacity.public), so it is installed with capacity and loaded after it.

Stabiso, the Enterprise System of Record · generated from the code and its guides · release 6f03a5e846b3