سامانه صدور فاکتور و حسابداری
Align QA gates with first-class settlement accounting
davoodmehraban89 committed
Sep 28, 2026 at 15:12 UTC
1fbc99d094e9e8e2806b047107e5debc2329ed4f
1 file changed
+3
-4
scripts/quality-check.mjs
+3
-4
@@ -38,7 +38,6 @@ const purchaseGetterCount=(all['sync.js']?.match(/function getMyPurchases\s*\(/g
38
if(purchaseGetterCount!==1)throw new Error('Expected exactly one getMyPurchases definition, found '+purchaseGetterCount);
39
const securityWorkflow=fs.readFileSync(path.join(root,'.github','workflows','security.yml'),'utf8');
40
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);
41
-if(!all['invoices.js']?.includes("q.status==='cleared'"))throw new Error('Dashboard must only settle cleared cheques');
42
-if(!all['invoices.js']?.includes('Math.min(debtorsSum,inboundSettlements)'))throw new Error('Dashboard settlement must be clamped to outstanding receivables');
43
-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');
44
-console.log('Static quality and security invariants passed for '+files.length+' JavaScript modules.');
\ No newline at end of file
41
+console.log('Static quality and security invariants passed for '+files.length+' JavaScript modules.');
42
+if(all['invoices.js']?.includes('inboundSettlements'))throw new Error('Dashboard must not double count cheque settlements');
43
+if(!all['drilldown.js']?.includes('const net=receivable-payable'))throw new Error('Contact ledger must use allocated invoice balances');