Skip to content

v0.5.0 — Opportunities, Availability, Shortage Resolution & Quote Versioning

Latest

Choose a tag to compare

@benjaminbowles benjaminbowles released this 27 Jun 15:42

Phase 3 — Core Operational Workflow. The make-or-break release: rental jobs now flow end-to-end from quote through order to dispatch and return.

Highlights

  • Event-sourced Opportunities — a two-axis state (Draft → Quotation → Order) + per-state status model on a Verbs event stream with a fast projected read model. 14 lifecycle actions, FX/tax locks, auto-numbering, soft-delete + archive/restore.
  • Local-first line-item editor — a drag-sortable nested tree of product lines, group sub-sections, and free-text notes (one unified event-sourced model, no separate sections table). Two-tier product search, per-line pricing/discount/dates/notes, accessory sub-rows, deal price, and price lock.
  • Demand-based Availability Engineavailable = stock − demands per product/store/slot, backed by PostgreSQL range types, a GiST index, and an exclusion constraint. By-Product-Group grid, Calendar, and per-product Timeline (Gantt), with live Reverb updates.
  • Shortage detection & resolution — computed on every read; a Block/Warn/Allow confirmation gate per store policy; six resolvers (Reallocate, Substitute, Transfer, Date Shift, Partial, Waitlist) with a persisted resolution lifecycle.
  • Quote Versioning — revision + alternative trees, version diff, accepted-version → order on conversion.
  • Asset allocation, dispatch & return — serialised per-asset and bulk-by-quantity, with automatic order-status promotion.
  • Job Planner, dashboard pipeline/shortage widget, and real-time wiring (Laravel Echo / Reverb).
  • APIs — Opportunities, Availability, Shortages, and Containers under /api/v1 with Sanctum abilities, Ransack filtering, includes, and auto-generated OpenAPI (Scramble).

Deferred to Phase 4 (Billing)

Serialised Containers (seal/dissolve lifecycle) and the Discount & Surcharge Engine — both ship alongside invoice generation so they have the right context.

Testing & Quality

  • 6,654 passing tests / 19,529 assertions across three lanes (SQLite parallel 6,470 · env-writing 97 · PostgreSQL 87)
  • Coverage: 96.64% lines · 95.31% methods · 91.24% classes
  • PHPStan level 6 — zero errors across ~1,700 files; Laravel Pint clean
  • Shipped after a full pre-release review (correctness / simplification / maintainability) with all high- and medium-severity findings remediated

Full feature changelog: docs/changelog/0.5.0.md.