سامانه صدور فاکتور و حسابداری
test: pinpoint expected and actual versions in failing browser sync fixture (#216)
davoodmehraban89 committed
Nov 18, 2026 at 15:20 UTC
6df4a7759fdeed071b34901c66576344c54cf9f2
1 file changed
+1
-1
scripts/accounting-document-workflow.spec.js
+1
-1
@@ -60,7 +60,7 @@ async function installHarness(page,server){
60
return {error:{message:'FINORA_POSTED_SOURCE_VOUCHER_IMMUTABLE',code:'23514'}};
61
if(row.collection==='journalLines'&&parentVoucher&&parentVoucher.data.status==='posted'&&['sale','purchase'].includes(parentVoucher.data.sourceType))
62
return {error:{message:'FINORA_POSTED_SOURCE_VOUCHER_IMMUTABLE',code:'23514'}};
63
- if(Number(row.expected_version||0)!==currentVersion)return {error:{message:'FINORA_VERSION_CONFLICT',code:'40001'}};
63
+ if(Number(row.expected_version||0)!==currentVersion){console.log('FINORA_F0_VERSION_CONFLICT',JSON.stringify({key,expected:row.expected_version,actual:currentVersion,rpcCount:server.rpcCount}));return {error:{message:'FINORA_VERSION_CONFLICT',code:'40001'}};}
64
const version=currentVersion+1;
65
server.records.set(key,{collection:row.collection,id:row.id,data:copy(row.data),version});
66
upserts.push({collection:row.collection,id:row.id,version});