Skip to content
Docs

Command palette

Jump to a page or search the docs.

Changelog

History

How the History of a car and of the collection (M-Historico) is derived from purchases, sales, services, upgrades, documents, valuations and flagged odometer readings, sold cars included.

Markdown

What it does

The History (RF21, US25) is the story of one car, or of every car the Organization has owned: sold cars are included, archived cars are left out of the collection's. Nothing is stored for it. One procedure reads the records as they stand and returns History Events newest first, a page at a time:

KindFrom
boughteach Ownership Period: the date of its latest Acquisition header, or the period's start before one
soldeach Disposal
serviceeach Service, with its title and reading
expenseeach upgrade Expense, through the ledger entry holding its current values (running costs stay on M-Gastos)
documenteach Vehicle Document but receipts, on the day it was filed
valuationthe latest Valuation of each car per calendar year, with its source and confidence (RN03)
odometereach flagged (lower) Odometer Reading, with its reason (RN07)

Procedures

ProcedureWhoFailures
vehicleHistory.list { vehicleId?, kinds?, years?, cursor?, limit? }Members of the OrganizationINPUT_VALIDATION, NOT_FOUND (car)

limit is at most 100 (50 by default). The cursor is the last event's date and id. The first page also answers years, every year with an event in scope, for the filter.

Data and isolation

Every branch filters by the Active Organization and runs as app_tenant, so row-level security isolates it too. Amounts are integer minor units with their currency; distances are km.

App

M-Historico (screen-M-Historico, route /history) opens from a car's profile (that car) and, with no vehicleId, for the whole collection. The segmented control narrows to Costs (upgrades), Service or Documents; the filter button (historico-filtro) opens a sheet with the car (or every car), the kinds of event and the years. Each card shows the year, the car, what happened, and the car's photo for a purchase or sale, else a grey icon chip. A service or document opens its record, anything else the car's profile.

autofolio://dev/M-Historico opens the seeded collection.

Key files

Edit on GitHubDocumentation is in English.

We use essential cookies to make our app work. With your consent, we also use optional cookies to improve your experience. Read our Cookie Policy and Privacy Policy.