@davoodmehraban89 / Factor-easy-2 Mirror · read-only / commits / 794d4ae
Fork 0

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

Mirrored from https://github.com/davoodmehraban89/Factor-easy.git

Synced Dec 4, 09:15 UTC

fix(company): fail closed on stale selected company instead of silently selecting another company

davoodmehraban89 committed Oct 14, 2026 at 11:47 UTC 794d4ae2e92bde5ba8d823309a796fc5016d3b17
1 file changed +1 -1
js/accounting-foundation.js
+1 -1
@@ -75,7 +75,7 @@ function afCompanyId(){
75 if(typeof finoraActiveCompanyId==='function')return finoraActiveCompanyId();
76 // Isolated chart verification harness uses accounting-foundation without sync.js.
77 const companies=getMyCompanies(),selected=getMySettings().default_company_id;
78 - return companies.find(c=>c.id===selected)?.id||companies[0]?.id||'';
78 + return selected||companies[0]?.id||'';
79 }
80 function afOwned(k){
81 if(typeof finoraScopedRows==='function')return finoraScopedRows(k,{allowSingleCompanyLegacy:true});