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

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

Gate company activity chart consistency

davoodmehraban89 committed Sep 29, 2026 at 22:26 UTC 0dddd62c69465b90ac8d4699e37216a4a5eb6912
1 file changed +1
scripts/phase2-check.mjs
+1
@@ -19,6 +19,7 @@ must(fs.readFileSync('js/accounting-foundation-ui.js','utf8'),['ورود کدی
19 must(journal,["t.sourceEntity==='contract'","contractId:source.contractId||''"],'contract analytic posting context');
20 must(phase4,['contractId:c.id'],'contracting analytic source context');
21 must(companies,['afEnsureFloatingSlotCompatibility','Object.entries(datastore)','دارای کدینگ، سال مالی، تفصیلی، اسناد یا سایر سوابق وابسته است'],'company master integrity');
22 +must(companies,['comp.accountingTemplate&&comp.activityType&&comp.activityType!==activityType','مهاجرت کنترل‌شده کدینگ'],'company activity/chart semantic guard');
23 if(af.includes('!d&&company.accountingTemplate'))throw new Error('four contractual floating slots must not depend on accepting a starter chart');
24 for(const coll of ['fiscalYears','accounts','dimensionTypes','dimensionValues','accountDimensionRules','branches','projects','projectLinks']){
25 if(!core.includes("'"+coll+"'")||!sync.includes(coll)||!backup.includes(coll))throw new Error('Phase 2 persistence missing '+coll);