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

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

fix(company): enforce active-company scope through js/phase4-contracting.js runtime paths

davoodmehraban89 committed Oct 14, 2026 at 11:39 UTC bcfdf48fa927f029c1856cc9a2f92edd192bc505
1 file changed +1 -1
js/phase4-contracting.js
+1 -1
@@ -1,5 +1,5 @@
1 /* Phase 4 — contracts, deductions, guarantees and contractor accounting */
2 -function p4Owned(k){const cid=afCompanyId();return(datastore[k]||[]).filter(x=>x.ownerUserId===currentUser?.id&&(!x.companyId||x.companyId===cid))}
2 +function p4Owned(k){return finoraScopedRows(k)}
3 function getMyContracts(){return p4Owned('contracts')} function getMyContractAmendments(){return p4Owned('contractAmendments')}
4 function getMyContractParties(){return p4Owned('contractParties')} function getMyContractDeductions(){return p4Owned('contractDeductions')}
5 function getMyGuarantees(){return p4Owned('guarantees')} function getMyGuaranteeEvents(){return p4Owned('guaranteeEvents')}