سامانه صدور فاکتور و حسابداری
Add settlement ledger to quality gates
davoodmehraban89 committed
Sep 28, 2026 at 15:07 UTC
b888536d46f6d5733a16c94840f07fefa8a3fc2b
1 file changed
+4
-3
scripts/quality-check.mjs
+4
-3
@@ -10,7 +10,7 @@ if(dup.length)throw new Error('Duplicate static HTML ids: '+dup.join(', '));
10
const requiredIds=['view-dashboard','view-invoices','view-products','view-contacts','view-cheques','view-expenses','invoice-payment-method','contacts-ledger-table-body','printable-invoice'];
11
for(const id of requiredIds)if(!ids.includes(id))throw new Error('Missing required element #'+id);
12
13
-const requiredScripts=['js/core.js','js/sync.js','js/invoices.js','js/print.js','js/contacts.js','js/companies.js','js/projects.js','js/purchases.js','js/operations.js','js/drilldown.js','js/selfcheck.js'];
13
+const requiredScripts=['js/core.js','js/sync.js','js/invoices.js','js/print.js','js/contacts.js','js/companies.js','js/projects.js','js/purchases.js','js/operations.js','js/payments.js','js/drilldown.js','js/selfcheck.js'];
14
if(index.includes('</script>\\n<script'))throw new Error('Literal \\n found between script tags');
15
for(const s of requiredScripts)if(!index.includes(s))throw new Error('Missing script load: '+s);
16
@@ -26,9 +26,10 @@ const must={
26
'purchases.js':['window.purSave=function','window.purEdit=function','window.purPrint=function','window.purRefreshProjects=function','pur-payment-method'],
27
'projects.js':['editContactProject','deleteContactProject','addSubproject','editSubproject','deleteSubproject'],
28
'operations.js':['editContact','editProduct','editCheque','editExpense','deleteInvoice'],
29
- 'drilldown.js':['openContactLedger','openDashboardDetail','openReportDetail',"status==='cleared'"],
29
+ 'payments.js':['commitSavePayment','invoiceOutstanding','purchaseOutstanding','amount>outstanding'],
30
+'drilldown.js':['openContactLedger','openDashboardDetail','openReportDetail',"status==='cleared'"],
31
'sync.js':['getMyPurchases'],
31
- 'backup.js':['purchases:getMyPurchases()']
32
+ 'backup.js':['purchases:getMyPurchases()','payments:getMyPayments()']
33
};
34
for(const [file,needles] of Object.entries(must)){
35
for(const needle of needles)if(!all[file]?.includes(needle))throw new Error(file+' missing '+needle);