{"type": "list", "title": "Aging Report", "charts": [{"type": "pie", "xKey": "aging_bucket", "yKey": "total_outstanding", "title": "Aging Distribution", "colors": {"90+": "#991b1b", "0-30": "#f59e0b", "30-60": "#f59e0b", "60-90": "#ef4444", "current": "#10b981"}, "height": "300px", "dataSource": "summary.buckets"}, {"type": "bar", "xKey": "customer_name", "yKey": "total_outstanding", "color": "#ef4444", "title": "Top 10 Overdue Customers", "height": "400px", "dataSource": "/api/finance/aging-by-customer/{org_id}?limit=10&sort_by=total_outstanding&sort_order=DESC"}], "export": {"enabled": true, "formats": ["csv", "pdf"], "filename": "aging_report"}, "columns": [{"key": "invoice_number", "link": "/invoices/view/{invoice_id}", "label": "Invoice #", "width": "120px", "sortable": true}, {"key": "customer_name", "link": "/customers/view/{customer_id}", "label": "Customer", "width": "200px", "sortable": true}, {"key": "invoice_date", "type": "date", "label": "Invoice Date", "width": "120px", "sortable": true}, {"key": "due_date", "type": "date", "label": "Due Date", "width": "120px", "sortable": true}, {"key": "total_amount", "type": "currency", "align": "right", "label": "Total", "width": "120px", "sortable": true}, {"key": "paid_amount", "type": "currency", "align": "right", "label": "Paid", "width": "120px", "sortable": true}, {"key": "outstanding_amount", "type": "currency", "align": "right", "label": "Outstanding", "width": "130px", "sortable": true, "highlight": true}, {"key": "days_overdue", "type": "number", "align": "center", "label": "Days Overdue", "width": "120px", "sortable": true}, {"key": "aging_bucket", "type": "badge", "align": "center", "label": "Aging", "width": "100px", "badges": {"90+": {"class": "badge-error", "label": "90+ Days"}, "0-30": {"class": "badge-warning", "label": "0-30 Days"}, "30-60": {"class": "badge-warning", "label": "30-60 Days"}, "60-90": {"class": "badge-error", "label": "60-90 Days"}, "current": {"class": "badge-success", "label": "Current"}}}, {"key": "payment_status", "type": "badge", "align": "center", "label": "Status", "width": "100px", "badges": {"paid": {"class": "badge-success", "label": "Paid"}, "current": {"class": "badge-success", "label": "Current"}, "overdue": {"class": "badge-error", "label": "Overdue"}, "partial": {"class": "badge-warning", "label": "Partial"}}}], "filters": [{"key": "aging_bucket", "type": "select", "label": "Aging Bucket", "default": null, "options": [{"label": "Current", "value": "current"}, {"label": "0-30 Days", "value": "0-30"}, {"label": "30-60 Days", "value": "30-60"}, {"label": "60-90 Days", "value": "60-90"}, {"label": "90+ Days", "value": "90+"}]}, {"key": "payment_status", "type": "select", "label": "Payment Status", "default": null, "options": [{"label": "Current", "value": "current"}, {"label": "Overdue", "value": "overdue"}, {"label": "Partially Paid", "value": "partial"}, {"label": "Paid", "value": "paid"}]}, {"key": "customer_id", "type": "select", "label": "Customer", "default": null, "labelKey": "name", "valueKey": "customer_id", "dataSource": "/api/customers/list/{org_id}", "searchable": true}, {"key": "from_date", "type": "date", "label": "From Date", "default": null}, {"key": "to_date", "type": "date", "label": "To Date", "default": null}], "summary": {"widgets": [{"key": "total_outstanding", "icon": "fa-dollar-sign", "type": "stat", "color": "primary", "title": "Total Outstanding", "format": "currency"}, {"key": "current_amount", "icon": "fa-check-circle", "type": "stat", "color": "success", "title": "Current", "format": "currency"}, {"key": "overdue_0_30", "icon": "fa-clock", "type": "stat", "color": "warning", "title": "0-30 Days", "format": "currency"}, {"key": "overdue_30_60", "icon": "fa-exclamation-triangle", "type": "stat", "color": "warning", "title": "30-60 Days", "format": "currency"}, {"key": "overdue_60_90", "icon": "fa-exclamation-circle", "type": "stat", "color": "error", "title": "60-90 Days", "format": "currency"}, {"key": "overdue_90_plus", "icon": "fa-ban", "type": "stat", "color": "error", "title": "90+ Days", "format": "currency"}], "dataSource": "/api/finance/aging-summary/{org_id}"}, "dataSource": "/api/finance/aging-report/{org_id}", "pagination": {"enabled": true, "pageSize": 50, "pageSizes": [25, 50, 100, 200]}, "rowActions": [{"icon": "fa-eye", "label": "View Invoice", "action": "invoice:view", "primary": true}, {"icon": "fa-dollar-sign", "label": "Record Payment", "action": "payment:record", "confirm": false, "condition": "payment_status != \"paid\""}, {"icon": "fa-envelope", "label": "Send Reminder", "action": "reminder:send", "confirm": "Send payment reminder to customer?", "condition": "payment_status == \"overdue\""}, {"icon": "fa-user", "label": "View Customer", "action": "customer:view"}], "bulkActions": [{"icon": "fa-file-csv", "label": "Export CSV", "action": "export:csv", "method": "POST", "params": {"format": "csv"}, "endpoint": "/api/finance/aging-report/export"}, {"icon": "fa-file-pdf", "label": "Export PDF", "action": "export:pdf", "method": "POST", "params": {"format": "pdf"}, "endpoint": "/api/finance/aging-report/export"}, {"icon": "fa-paper-plane", "label": "Email Report", "action": "email:report", "inputFields": [{"key": "recipients", "type": "text", "label": "Email Recipients", "required": true, "placeholder": "email1@example.com, email2@example.com"}], "requiresInput": true}, {"icon": "fa-bell", "label": "Send Reminders", "action": "reminder:sendBulk", "confirm": "Send payment reminders to selected customers?", "condition": "aging_bucket != \"current\""}], "defaultSort": {"key": "days_overdue", "order": "DESC"}, "permissions": {"view": ["admin", "accountant", "finance_manager"], "email": ["admin", "finance_manager"], "export": ["admin", "accountant", "finance_manager"]}, "refreshInterval": 60000}