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

Gate finalized cheque server guard preparation

davoodmehraban89 committed Sep 29, 2026 at 22:38 UTC cdfb7188679cb24238ae2f570443b7cb9389d1c0
1 file changed +1 -1
scripts/phase3-check.mjs
+1 -1
@@ -10,7 +10,7 @@ need(s,["sb.rpc('finora_sync_records'",'p_upserts','p_deletes'],'atomic sync');
10 need(pay,["date:old?.date||getJalaliNumeric()"],'payment fiscal date');
11 need(inv,['invoiceCreatesAccountingEntry',"kind==='formal'||kind==='non_formal'"],'invoice posting semantics');
12 need(exp,['jePostSourceRecord(kind,record)','contactId','projectId','accountingVersion:1'],'expense/income posting semantics');
13 -need(sourceGuard,['finora_guard_posted_source_records',"'invoices','purchases','payments','expenses','contractStatements'",'posted/reversed accounting history is immutable'],'prepared source immutability migration');
13 +need(sourceGuard,['finora_guard_posted_source_records',"'invoices','purchases','payments','expenses','cheques','contractStatements'",'posted/reversed accounting history is immutable',"old.collection='cheques'"],'prepared source immutability migration');
14 need(e,["['posted','reversed'].includes(v.status)","['posted','reversed'].includes(x.status)"],'reversal history');
15 if(e.includes('datastore.journalVouchers=datastore.journalVouchers.filter')&&!e.includes("v.status!=='draft'"))throw new Error('posted voucher destructive delete guard missing');
16 console.log('Phase 3 double-entry invariants passed.');