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

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

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

Synced Dec 3, 17:00 UTC

feat(finance): wire draft-only accounting management and exclude unposted receivables from KPI

davoodmehraban89 committed Oct 11, 2026 at 20:45 UTC f147a83ba60377c1f666f86fa48bceab81cc72ac
1 file changed +1 -1
js/drilldown.js
+1 -1
@@ -90,7 +90,7 @@ window.openDashboardFinanceKpi=function(kind){
90 '</tbody></table></div>'+(kind==='cash'?'<p class="af-hint">نکته: کارت مانده نقد و بانک فعلاً براساس حساب مرجع نقد محاسبه می‌شود؛ این فهرست همه حساب‌های مرتبط با بانک، صندوق و تنخواه را برای بررسی تفکیکی نمایش می‌دهد.</p>':'');
91 show(titles[kind],html);return;
92 }
93 - const inv=(typeof getMyInvoices==='function'?getMyInvoices():[]).filter(x=>dashboardCompanyAllowed(x));
93 + const inv=(typeof getMyInvoices==='function'?getMyInvoices():[]).filter(x=>dashboardCompanyAllowed(x)&&typeof invoiceDocumentStatus==='function'&&invoiceDocumentStatus(x)==='posted');
94 const pur=(typeof getMyPurchases==='function'?getMyPurchases():[]).filter(x=>dashboardCompanyAllowed(x));
95 const rows=kind==='receivable'?inv.filter(i=>i.paymentMethod==='credit').map(i=>({date:i.date,type:'فروش نسیه',ref:i.number,name:i.contactName||'',amount:typeof invoiceOutstanding==='function'?invoiceOutstanding(i):i.grandTotal,action:invAction(i)}))
96 :pur.filter(p=>p.paymentMethod==='credit').map(p=>({date:p.date,type:'خرید نسیه',ref:p.number,name:p.supplierName||'',amount:typeof purchaseOutstanding==='function'?purchaseOutstanding(p):p.grandTotal,action:purAction(p)}));