سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 4, 01:45 UTC
test: align phase3 invariants with versioned ledger RPC
davoodmehraban89 committed
Nov 17, 2026 at 17:23 UTC
3fe8d0d9c07077c3a253390a5294d526543a2fe5
1 file changed
+2
-2
scripts/phase3-check.mjs
+2
-2
@@ -5,9 +5,9 @@ const need=(src,x,label)=>{for(const n of x)if(!src.includes(n))throw new Error(
5
need(e,['jeSourceVoucher','jeActiveSourceVoucher','jeSourceLocked','jeGuardSourceMutation','jePostSourceRecord','jeValidateLines','jeValidateDimensions','sourceVersion','jeReverse','reversalVoucherId','jeDeleteDraft','jeTrialBalance','journalLineDimensions','paymentMethod===\'credit\'','jeVatPayableAccount',"jeAccountByCode('1108')",'jeTemplateType',"trading:'4107'","service:'4106'","jeTemplateType()==='trading'?'5102'"],'engine');
6
need(u,['view-journal','jeSaveManual','jePostUi','jeReverseUi','je-trial'],'ui');
7
for(const x of ['postingProfiles','journalVouchers','journalLines','journalLineDimensions']){if(!c.includes("'"+x+"'")||!s.includes(x)||!b.includes(x))throw new Error('persistence missing '+x)}
8
-need(i,['journal-engine.js?v=20261007-p0-r1','journal-rpc.js?v=20261116-manual-rpc-v2','journal-ui.js?v=20261116-manual-rpc-v2','document-management.js?v=20261011-doc-manager-v1'],'index');
8
+need(i,['journal-engine.js?v=20261117-source-autopost-v1','journal-rpc.js?v=20261117-source-autopost-v1','journal-ui.js?v=20261116-manual-rpc-v2','document-management.js?v=20261011-doc-manager-v1'],'index');
9
need(inv,['function invoiceDocumentStatus','function finalizeInvoiceDocument','accountingStatus:\'draft\'','documentStatus:\'draft\''],'invoice draft and explicit posting');
10
-need(s,["sb.rpc('finora_sync_records'",'p_upserts','p_deletes'],'atomic sync');
10
+need(s,["sb.rpc('finora_sync_records_v2'",'p_upserts','p_deletes','expected_version','p_organization_id'],'versioned atomic sync');
11
need(pay,["date:old?.date||getJalaliNumeric()"],'payment fiscal date');
12
need(inv,['invoiceCreatesAccountingEntry',"kind==='formal'||kind==='non_formal'"],'invoice posting semantics');
13
need(exp,['jePostSourceRecord(kind,record)','contactId','projectId','accountingVersion:1'],'expense/income posting semantics');