سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 14:30 UTC
Add receivable settlement regression invariant
davoodmehraban89 committed
Sep 28, 2026 at 15:00 UTC
75d55830a3d9362a8dbc42af2ff09f8ef3c3be0f
1 file changed
+1
scripts/quality-check.mjs
+1
@@ -38,4 +38,5 @@ if(purchaseGetterCount!==1)throw new Error('Expected exactly one getMyPurchases
38
const securityWorkflow=fs.readFileSync(path.join(root,'.github','workflows','security.yml'),'utf8');
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
console.log('Static quality and security invariants passed for '+files.length+' JavaScript modules.');
\ No newline at end of file