D108 · Every car has a rental company, and the operator is one of them
Proposed · 2026-11-25 · zuki, answering #741 (2026-11-24) and in the team session on #748; it binds when this page's pull request is merged · Applies to access (ACC), master data (MD), vehicles (VEH), money, migration (MIG) · Partly supersedes D99 and D100: the operator's own cars belong to a rental company
Decision: Every car belongs to a rental company of its organization, and the column can't be empty. The operator (TOP) is a rental company row, known by a mark that at most one row per organization has and that no app function sets. Its name can be changed; retiring it is refused. A member's list may include it like any other company, so the all-companies flag of D99 means every company of the organization, those added later included, and the flag's control and read-only line no longer name the operator's own cars. A member without the flag adds a car only for a rental company on their list, and create_vehicle takes only an active one; the limit to their list also holds on a direct insert or update of a car. The operator's company gets no payout. A rental company's name shows to a holder of vehicle:write at any pool of the organization, for the companies that holder may see; every other field keeps its readers. create_vehicle no longer takes company_daily_cost.
Why: An empty rental company stood for the operator's own cars, so a car added without one became the operator's by default, and create_vehicle didn't hold a limited member to their partners (#741). One row for the operator makes the owner a choice the form asks for, and lets one rule cover every company. A mark rather than the name survives a rename.
Consequences:
- R-ACC-170 is retired; R-ACC-42, 43, 44, 169 and 173 to 180 lose the operator's own cars. Turning the flag off starts a list with the operator's company ticked too.
- R-MD-57 and 59 gain one exception: retiring the marked row is refused. R-MD-08, R-MD-12 and R-MD-75 keep their readers; names come from a separate read.
- A payout for the marked company is refused by the database. Whether a rent charge on its cars has a company amount is left to M6.
- The v1 migration puts v1's partner TOP on the marked row. A blank partner has no mapping and stops the run, and a partner that maps to no rental company leaves its car unmatched, so no car becomes the operator's by accident.
- The migration and the seed create the marked row. Creating it for a new organization waits for the slice that adds organizations.