سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 22:00 UTC
Seed four floating analytic slots for custom charts
davoodmehraban89 committed
Sep 29, 2026 at 22:25 UTC
b2e0bbc19e49b35bc5c3072f43b8e9e08612e44c
1 file changed
+1
-1
js/accounting-foundation.js
+1
-1
@@ -61,7 +61,7 @@ function afCreateDimension(cid,code,title,sourceEntity,maxDepth=1,slot=0){
61
function afEnsureFloatingSlotCompatibility(){
62
if(!currentUser||!afCompanyId())return false;const cid=afCompanyId(),company=getMyCompanies().find(x=>x.id===cid);if(!company)return false;let changed=false;
63
const defs=[['BRANCH','شعبه','branch',1],['COUNTERPARTY','طرف حساب','contact',2],['PROJECT','پروژه','project',3],['CONTRACT','قرارداد / پیمان','contract',4]];
64
- defs.forEach(([code,title,source,slot])=>{let d=getMyDimensionTypes().find(x=>x.code===code);if(!d&&company.accountingTemplate){d=afCreateDimension(cid,code,title,source,1,slot);changed=true}else if(d&&Number(d.slot||0)!==slot){d.slot=slot;changed=true}});
64
+ defs.forEach(([code,title,source,slot])=>{let d=getMyDimensionTypes().find(x=>x.code===code);if(!d){d=afCreateDimension(cid,code,title,source,1,slot);changed=true}else if(Number(d.slot||0)!==slot){d.slot=slot;changed=true}});
65
if(changed)saveDatastore();return changed;
66
}
67
function afApplyTemplate(companyId,type){