سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 20:45 UTC
Keep Phase 2 VM compatible with browser floating-code export
davoodmehraban89 committed
Oct 1, 2026 at 20:38 UTC
904803899764bc814a15c7468e52d25ac79e66e0
1 file changed
+1
-1
scripts/phase2-check.mjs
+1
-1
@@ -30,7 +30,7 @@ for(const coll of ['fiscalYears','accounts','dimensionTypes','dimensionValues','
30
if(!af.includes("(v.depth||1)===Number(t.maxDepth||1)"))throw new Error('Only configured terminal depth may post');
31
if(!af.includes("if(afDimensionHasValues(id))return alert"))throw new Error('Hierarchy depth must lock after values exist');
32
if(!af.includes("afDimensionValueReferenced(id)"))throw new Error('Referenced analytic values must be protected');
33
-const ctx={console};vm.createContext(ctx);vm.runInContext(af,ctx);
33
+const ctx={console,window:{}};vm.createContext(ctx);vm.runInContext(af,ctx);
34
const imported=vm.runInContext(`afNormalizeAccountImportRows([
35
{'کد':'1','عنوان':'داراییها','سطح':'کل','ماهیت':'بدهکار'},
36
{'کد':'11','عنوان':'دارایی جاری','سطح':'معین','کد والد':'1','ماهیت':'بدهکار'},