Add real production sources as authoritative reference (supersedes
vfp_roaauto/Scripturi_instalare/packages.sql which is for a different
product — devize producție, not service auto):
- mariusm_ddl_export.sql: 5127 lines DDL from DBMS_METADATA (tables,
views, triggers) of MARIUSM_AUTO schema
- pack_auto.pck: main business package (17 procedures)
- PACK_FACTURARE.pck, PACK_SESIUNE.pck, PACK_CONTAFIN.pck,
PACK_COMENZI.pck: dependency packages
- export_ddl.sql: SQL export helper using DBMS_METADATA + DBMS_OUTPUT
with discovery via ALL_OBJECTS LIKE patterns
Rewrite tabele-service-auto.md v3 (~600 lines) fully grounded in
production sources. Map all flows end-to-end:
- Create (pack_auto.dev_adauga_lucrare) → NOM_LUCRARI + DEV_ORDL
- Normare (dev_adauga_operatie) → DEV_OPER + DEV_OPER_MECANICI
- Validate ops (dev_valideaza_operatii) → DEV_OPER.VALIDAT
- Validate order (dev_valideaza_comanda) → DEV_ORDL.VALIDAT + CALENDAR
- Archive (dev_arhiveaza_comanda) → DEV_ORDL.INCHIS_FORTAT
- Bonuri consum: generic ROA (ointroduceri.prg tip=3) → RUL.id_lucrare
- Facturare: pack_facturare.* + pack_auto.actualizeaza_deviz
Key business semantics confirmed by Marius 2026-04-11:
- DEV_TIP_DEVIZ.inch_validare = 1 means validation alone closes the
order (no closing note). inch_validare = 0 means additional closing
required (via invoice for billable types, or 711=332 journal entry
for internal types). View AUTO_LISTARE_MAN_TOT_COM has the exact
"closed" condition as (validat=1 AND inch_validare=1) OR
(facturat=1 AND inch_validare=0).
- Live DEV_TIP_DEVIZ values: 1=POST GARANTIE, 2=GARANTIE, 3=REGIE,
4=PREGATIRE, 5=REGIE 2, 6=PRODUCTIE, 7=CONSTATARE. REGIE/PRODUCTIE/
CONSTATARE have inch_validare=1 (internal, closed at validation).
- DEV_OPER for service auto contains only manopera (id_norme). The
id_articol/id_rul_aux columns exist in DDL for another product that
shares the table but are not populated by pack_auto.
- Real materials consumed on an order live in RUL tagged by id_lucrare,
not in DEV_OPER. DEV_ESTIMARI_REP is a separate pre-sale estimate
(both manopera and materiale lines) given to the client, independent
of the real manopera (DEV_OPER) and real materials (RUL).
Plan Correction 13 (claude-main-design-20260411-rethink.md):
- Invalidate Scripturi_instalare references
- Confirm NOM_LUCRARI ← DEV_ORDL inheritance pattern
- Confirm pack_sesiune.dev_idLucrare/dev_idOrdl populated by triggers
- Refine prototype SP (Option 3) template based on real schema
- Timeline unchanged, scope wall reconfirmed
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
plan-design-review pass: 6/10 → 9/10. Added interaction-states table
(6-state PrimeVue spec matching ReceiptCreateUnifiedView.vue toast
conventions), design-system inheritance clause (DESIGN.md/TOKENS/
CSS_PATTERNS), a11y one-liner, week-3 subtask for enum+labels
extraction from VFP source.
Cloned gitea.romfast.ro/romfast/vfp_roaauto and wrote a 300+ line
ground-truth audit (docs/service-auto/tabele-service-auto.md)
covering: DEV_ORDL parent/child inheritance with NOM_LUCRARI,
DEV_TIP_DEVIZ enum (1-7, including user-confirmed Productie/
Constatare for 6/7), dev_adauga_lucrare v1 (pack_devize, 12+1
params, body visible in packages.sql) vs v2 (pack_auto, 17+1,
body only in MARIUSM_AUTO), and the pack_sesiune.dev_idLucrare
trigger/session-state pattern (ROA ERP convention from pre-
RETURNING era, not a bug).
Plan Correction 12 added: the prototype needs a ~40-line SP doing
two INSERTs parent→child with RETURNING id_lucrare (bypassing
pack_sesiune), targeting dev_ordl via nom_lucrari. Original
assumption of a 4-param new SP was wrong. Week 3 subtask updated
to reference the audit draft. ACT/RUL untouched at creation time
— Correction 3 still valid.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>