Skip to content

Workshop Management: architecture and release

The shared workshop area is intended for Pro and Enterprise. Basic retains the same schema; licensing hides the area. Business rules have no edition branches. Pro uses SQLite and the in-process worker; Enterprise uses PostgreSQL and FleetMiraWorker. The separate Windows service FleetMiraArchive provides only storage, integrity and key operations.

Shared data and services

Empty linked detail lists return without reading unrelated master-data lookup tables. Populated lists retain their labels, order and exact numeric fields; a new load resolves current labels again. This shared read behavior is covered with real disposable SQLite and PostgreSQL repositories. It adds no cache, write or edition-specific path.

workshop_management.py contains the repository and master-data, work-order, quotation, purchasing and inventory services. workshop_billing.py implements outgoing invoices, immutable snapshots, corrections and accounting transfers. workshop_runtime.py composes the services; database access and serialization use database_runtime.

Vehicles, personnel, suppliers, cost categories and record documents reuse the existing areas. Commercial customers are independent of device tenants. Referenced master data is archived. UUIDs and expected versions prevent lost changes. Repeatable commands have persistent idempotency keys.

Quantities use integer units of 0.0001; prices and inventory values use 0.000001 EUR. Invoice amounts are integer cents. Decimal and explicit commercial rounding replace binary floating-point calculations. Price provenance, rules, tax definitions and document language are frozen into each document. Purchase and sale prices have inclusive validity boundaries; overlapping periods for the same price source are prevented. Work-order lines use their service date and purchase lines their order date. Price-list rules and explicit manual overrides retain their provenance. AW/hour conversion preserves the original quantity, unit and factor; invoice representation does not change material quantities.

flowchart LR
  QT[Quotation / revision] --> WO[Work order]
  TM[Templates / labour texts] --> WO
  PO[Purchase order] --> GR[Goods receipt]
  GR --> SJ[Immutable stock journal]
  WO --> SJ
  WO --> ID[Invoice draft]
  MI[Manual article invoice] --> ID
  ID --> SS[Frozen snapshot / number]
  SS --> VL[XML / PDF-A validation]
  VL --> AR[Protected archive / receipt]
  AR --> II[Issued invoice]
  II --> EX[DATEV / CSV-ZIP / REST]

Inventory and cost protection

Earmarked work-order articles are nonbinding demand. Explicit partial consumption links the actual line to its plan and retains outstanding demand; replay does not post twice. Actual consumption posts material. Quantity changes post the difference; price and text changes do not issue stock. Returns and corrections preserve every original movement.

Direct invoices for stocked articles reserve the actual quantity during finalization. This protects the resumable process from competing withdrawals and consumes the reservation exactly once when issuing. Work-order rebilling creates no second withdrawal. Invoice corrections do not return material.

Valuation supports warehouse moving average, article-wide valuation and fixed valuation prices. Changes after the first posting require a reason and produce traceable value entries. Own vehicles can allocate approved actual workshop costs to an existing cost category. The projection uses the existing vehicle-cost repository and posts only changes on renewed approval. Purchasing and outgoing invoicing create no additional vehicle costs.

Finalization, archive and audit

Finalization persists the snapshot, number and durable job before external file effects. Invoices and corrections have independent transactionally protected annual number ranges. Changed vehicle/customer mappings require user confirmation bound to current versions before rebilling. Free services need explicit approval and a reason. Generators and validators run offline with verified resources: Mustang 2.25.0, XRechnung 3.0.2 with KoSIT 1.6.3 / configuration 2026-08-31, ZUGFeRD 2.5.2 EN16931, Stimulsoft 2025.1.3 through Node 24.21.0 and veraPDF 1.30.2. Resources, fonts and generators are hashed. Stimulsoft requires the existing valid licence.

XML and PDF derive from one snapshot. Validation covers schema/Schematron, PDF/A-3, actual embedded XML bytes and semantic snapshot comparison. The archive service validates independently and signs the attested hashes. Failed validation cannot create an issued invoice.

Leases protect concurrent finalization and exports. After a crash, uploaded bytes and signed receipts are reused. An explicitly abandoned finalization retains its number and signed abandonment proof. An already sealed finalization resumes. Uncertain REST outcomes require audited reconciliation; automatic retries require confirmed recipient idempotency protection.

Append-only tables and frozen invoices have database guards. PostgreSQL additionally restricts application privileges. The shared worker independently seals workshop audit, stock movement, number and cost-projection evidence. Missing or changed previously sealed rows block further financial processing. Initial adoption marks existing evidence as a baseline. Subsequent packages hold bounded deltas and signed predecessor references; recovery and exports verify the full chain. A standalone auditor export requires no invoice and includes actual field definitions, foreign keys, business relationships, originals and evidence. DATEV uses versioned v700 field contracts including debtor master data and the configured finalization flag. Ordinary users cannot write archive files or keys; pipe access verifies the service identity and installed client executable.

The audit regression identifies human and technical events by their business action. On SQLite and PostgreSQL it checks actor, reason, shared correlation and object references, including the fleet_audit_log mirror; an additional case deliberately uses equal timestamps. Sorted UUID order does not establish business-event chronology. Production timestamps, audit data and append-only guards remain unchanged.

Retention and individual review

workshop_retention.py registers versioned rules for booking documents (eight years), books/records/inventories (ten years) and relevant business correspondence (six years). The period begins from the actual creation event; backdated service or invoice dates do not shorten it. Linked documents share the longest deadline. Reasoned extensions and legal holds remain traceable as immutable events; releasing a hold never shortens a minimum deadline. Database guards and event-journal comparison detect unlogged projection changes.

The Retention workspace shows document classes, deadlines, holds and review reports. Individual review covers every linked document and records permission, time, reason and decision. Even an eligible review does not physically remove data. Removal of sealed packages remains technically locked; introducing such an operational action requires joint approval of all dependent data, evidence chains and statutory periods.

UI and acceptance

The primary area uses a horizontal splitter, IconNavbarController, six groups and 30 workspaces. Sessions start empty. Static workspaces are reused and record details are focused by identity. Details contain business data, documents and history. Language changes update navigation and open tabs; region controls number entry and display independently.

The product matrix, database parity catalogue and Enterprise acceptance catalogue register the area. Source tests cover both databases, workflows, concurrency, failures and all 25 UI languages. Semantic Enterprise acceptance covers navigation, a customer roundtrip and actual inventory, purchasing, pricing, planning and billing processes in an explicitly marked disposable PostgreSQL system.

A production release also requires installed Pro/Enterprise service tests under the intended user permissions, backup/restore on a fresh host, tax-specialist review of the configured examples, a complete auditor export and documented operating procedures. Passing source or build tests does not replace these acceptance steps. Authenticode is required for stable publication.

Later Fleet import

workshop_import_contract.py prepares typed source identities, reviewed mappings and separate comparison/opening values. The wizard itself belongs to the later implementation package. Names and registrations are not automatic merge keys. Historical invoices are not reissued; continued auditability of the legacy system remains part of the migration procedure. Legacy credentials are absent from source code.

See user workflows and accounting and archive operations.