docs(service-auto): ground truth audit v3 from MARIUSM_AUTO production
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>
This commit is contained in:
16946
docs/service-auto/PACK_FACTURARE.pck
Normal file
16946
docs/service-auto/PACK_FACTURARE.pck
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user