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

Gate bounded Excel import resources

davoodmehraban89 committed Sep 29, 2026 at 22:35 UTC a6ca42d55252f93cd08f15d4a698d7ed5a7956cc
1 file changed +2 -2
scripts/phase2-check.mjs
+2 -2
@@ -3,7 +3,7 @@ import vm from 'node:vm';
3 const af=fs.readFileSync('js/accounting-foundation.js','utf8');
4 const render=fs.readFileSync('js/accounting-foundation-render.js','utf8');
5 const companies=fs.readFileSync('js/companies.js','utf8');
6 -const contacts=fs.readFileSync('js/contacts.js','utf8'),products=fs.readFileSync('js/products.js','utf8');
6 +const contacts=fs.readFileSync('js/contacts.js','utf8'),products=fs.readFileSync('js/products.js','utf8'),invoiceExcel=fs.readFileSync('js/invoice-excel-import.js','utf8'),purchases=fs.readFileSync('js/purchases.js','utf8');
7 const index=fs.readFileSync('index.html','utf8');
8 const core=fs.readFileSync('js/core.js','utf8');
9 const backup=fs.readFileSync('js/backup.js','utf8');
@@ -22,7 +22,7 @@ must(phase4,['contractId:c.id'],'contracting analytic source context');
22 must(companies,['afEnsureFloatingSlotCompatibility','Object.entries(datastore)','دارای کدینگ، سال مالی، تفصیلی، اسناد یا سایر سوابق وابسته است'],'company master integrity');
23 must(companies,['comp.accountingTemplate&&comp.activityType&&comp.activityType!==activityType','مهاجرت کنترل‌شده کدینگ'],'company activity/chart semantic guard');
24 if(af.includes('!d&&company.accountingTemplate'))throw new Error('four contractual floating slots must not depend on accepting a starter chart');
25 -must(contacts,['Object.entries(datastore)',"key!=='contacts'",'برای حفظ تاریخچه قابل حذف نیست'],'counterparty deletion integrity');must(products,['Object.entries(datastore)',"key!=='products'",'برای حفظ تاریخچه قابل حذف نیست'],'product deletion integrity');
25 +must(contacts,['Object.entries(datastore)',"key!=='contacts'",'برای حفظ تاریخچه قابل حذف نیست'],'counterparty deletion integrity');must(products,['Object.entries(datastore)',"key!=='products'",'برای حفظ تاریخچه قابل حذف نیست','5*1024*1024','rows.length>10000'],'product deletion/import integrity');must(invoiceExcel,['5*1024*1024','rows.length>10000'],'sales Excel resource bounds');must(purchases,['5*1024*1024','rows.length>10000'],'purchase Excel resource bounds');must(af,['5*1024*1024','rows.length>10000'],'chart Excel resource bounds');
26 for(const coll of ['fiscalYears','accounts','dimensionTypes','dimensionValues','accountDimensionRules','branches','projects','projectLinks']){
27 if(!core.includes("'"+coll+"'")||!sync.includes(coll)||!backup.includes(coll))throw new Error('Phase 2 persistence missing '+coll);
28 }