سامانه صدور فاکتور و حسابداری
Sync Phase 2 accounting foundation data
davoodmehraban89 committed
Sep 28, 2026 at 17:50 UTC
e719df1eb01b640f14c55264c6e9e1ce845d40bd
1 file changed
+2
-2
js/sync.js
+2
-2
@@ -1,4 +1,4 @@
1
-let datastore={companies:[],contacts:[],products:[],invoices:[],purchases:[],cheques:[],expenses:[],payments:[],settings:[]};
1
+let datastore={companies:[],contacts:[],products:[],invoices:[],purchases:[],cheques:[],expenses:[],payments:[],settings:[],fiscalYears:[],accounts:[],dimensionTypes:[],dimensionValues:[],accountDimensionRules:[],branches:[],projects:[],projectLinks:[]};
2
function getMyProducts(){return !currentUser?[]:datastore.products.filter(p=>p.ownerUserId===currentUser.id);}
3
function getMyContacts(){return !currentUser?[]:datastore.contacts.filter(c=>c.ownerUserId===currentUser.id);}
4
function getMyCompanies(){return !currentUser?[]:datastore.companies.filter(c=>c.ownerUserId===currentUser.id);}
@@ -145,7 +145,7 @@ function safeId(raw,prefix){
145
}
146
function absorbRecords(imported){
147
const uid=currentUser.id;let count=0;
148
- ['companies','contacts','products','invoices','purchases','cheques','expenses','payments'].forEach(key=>{
148
+ ['companies','contacts','products','invoices','purchases','cheques','expenses','payments','fiscalYears','accounts','dimensionTypes','dimensionValues','accountDimensionRules','branches','projects','projectLinks'].forEach(key=>{
149
if(!Array.isArray(imported[key]))return;
150
imported[key].forEach(raw=>{
151
if(!raw||typeof raw!=='object')return;