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

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

Phase 5: add static acceptance gates [skip ci]

davoodmehraban89 committed Sep 29, 2026 at 20:50 UTC d54f6ea79cceff3a25e14d90642d281ad52a3023
1 file changed +5
scripts/quality-check.mjs
+5
@@ -86,3 +86,8 @@ 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');
89 +
90 +const p5=all['phase5-enterprise.js']||'';for(const x of ['getMyWarehouses','p5PostMovement','p5SaveCount','p5RunDepreciation','p5SaveCurrency','p5SaveRate','p5SaveCostCenter','p5PreviewRestore','p5SaveIntegration','p5QueueEvent'])if(!p5.includes(x))throw new Error('Phase5 invariant missing '+x);
91 +for(const coll of ['warehouses','stockMovements','inventoryCounts','fixedAssets','assetDepreciations','currencies','exchangeRates','costCenters','importBatches','integrationConnections','integrationOutbox','phase5Audit'])if(!all['core.js'].includes("'"+coll+"'")||!all['sync.js'].includes(coll))throw new Error('Phase5 persistence missing '+coll);
92 +for(const v of ['view-inventory','view-assets','view-currency','view-data-center','view-integrations'])if(!index.includes('id="'+v+'"')||!all['ui.js'].includes("'"+v+"':'erp'"))throw new Error('Phase5 workspace missing '+v);
93 +if(!index.includes('phase5-domain.js')||!index.includes('phase5-enterprise.js')||!index.includes('data-module="erp"'))throw new Error('Phase5 shell/scripts missing');