@davoodmehraban89 / Factor-easy-2 Mirror · read-only / commits / c904aa5
Fork 0

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

Mirrored from https://github.com/davoodmehraban89/Factor-easy.git

Synced Dec 4, 01:45 UTC

Guard account balance settlement against over-application

davoodmehraban89 committed Sep 28, 2026 at 15:03 UTC c904aa5e1596c663c2bed59fc4ffe5423ef7882f
1 file changed +1
scripts/quality-check.mjs
+1
@@ -39,4 +39,5 @@ const securityWorkflow=fs.readFileSync(path.join(root,'.github','workflows','sec
39 for(const needle of ['github/codeql-action/init@v3','github/codeql-action/analyze@v3','actions/dependency-review-action@v4'])if(!securityWorkflow.includes(needle))throw new Error('Security workflow missing '+needle);
40 if(!all['invoices.js']?.includes("q.status==='cleared'"))throw new Error('Dashboard must only settle cleared cheques');
41 if(!all['invoices.js']?.includes('Math.min(debtorsSum,inboundSettlements)'))throw new Error('Dashboard settlement must be clamped to outstanding receivables');
42 +if(!all['drilldown.js']?.includes('Math.min(receivable,received)')||!all['drilldown.js']?.includes('Math.min(payable,paid)'))throw new Error('Contact ledger settlement must be clamped to outstanding balances');
43 console.log('Static quality and security invariants passed for '+files.length+' JavaScript modules.');
\ No newline at end of file