@davoodmehraban89 / Factor-easy / commits / a302062
Fork 0

سامانه صدور فاکتور و حسابداری

Add Phase 4 release invariants

davoodmehraban89 committed Sep 29, 2026 at 12:50 UTC a30206297882e3c7054bac834af0c1e48710fde5
1 file changed +5
scripts/quality-check.mjs
+5
@@ -81,3 +81,8 @@ if(!all['ui.js'].includes("commerce:{title:'بازرگانی'"))throw new Error(
81 for(const v of ["'view-invoices':'commerce'","'view-purchases':'commerce'","'view-contacts':'commerce'"])if(!all['ui.js'].includes(v))throw new Error('Commerce view mapping missing '+v);
82 for(const legacy of ['data-module="sales"','data-module="purchases"','data-module="people"'])if(index.includes(legacy))throw new Error('Legacy top-level commerce rail remains '+legacy);
83 if(!index.includes('data-module="commerce"')||!index.includes('<b>بازرگانی</b>'))throw new Error('Commerce rail button missing');
84 +
85 +const p4=fs.readFileSync('js/phase4-contracting.js','utf8');
86 +for(const x of ['p4SaveContract','p4AddAmendment','p4AddDeduction','p4AddGuarantee','p4CreateStatement','p4PostStatement','p4ReverseStatement','p4ContractProfit','p4Audit'])if(!p4.includes(x))throw new Error('Phase4 invariant missing '+x);
87 +for(const x of ['contracts','contractAmendments','contractParties','contractDeductions','guarantees','guaranteeEvents','contractStatements','phase4Audit']){if(!all['core.js'].includes(x)||!all['sync.js'].includes(x))throw new Error('Phase4 persistence missing '+x);}
88 +if(!index.includes('data-module="projects"')||!index.includes('id="view-contracting"')||!index.includes('phase4-contracting.js'))throw new Error('Phase4 workspace/navigation missing');