{
    "name": "finance",
    "label_en": "Finance & Billing",
    "label_ar": "المالية والفواتير",
    "version": "1.0.0",
    "description": "Core financial operations: invoicing, payments, receipts, cash register, fiscal management",
    "sort_order": 30,
    "icon": "fas fa-money-bill-wave",
    "routes_file": "routes.php",
    "css_files": ["css/finance.css"],
    "js_files": ["js/finance.js"],
    "menu": [
        {
            "label_en": "Finance",
            "label_ar": "المالية",
            "icon": "fas fa-money-bill-wave",
            "permission": "invoices.view",
            "sort_order": 30,
            "children": [
                {
                    "label_en": "Invoices",
                    "label_ar": "الفواتير",
                    "route": "/finance/invoices",
                    "permission": "invoices.view",
                    "sort_order": 1
                },
                {
                    "label_en": "Create Invoice",
                    "label_ar": "إنشاء فاتورة",
                    "route": "/finance/invoices/create",
                    "permission": "invoices.create",
                    "sort_order": 2
                },
                {
                    "label_en": "Payments",
                    "label_ar": "المدفوعات",
                    "route": "/finance/payments",
                    "permission": "payments.view",
                    "sort_order": 3
                },
                {
                    "label_en": "Record Payment",
                    "label_ar": "تسجيل دفعة",
                    "route": "/finance/payments/create",
                    "permission": "payments.create",
                    "sort_order": 4
                },
                {
                    "label_en": "Receipts",
                    "label_ar": "الإيصالات",
                    "route": "/finance/receipts",
                    "permission": "receipts.view",
                    "sort_order": 5
                },
                {
                    "label_en": "Cash Register",
                    "label_ar": "الصندوق",
                    "route": "/finance/cashier",
                    "permission": "cash_register.open",
                    "sort_order": 6
                },
                {
                    "label_en": "Fee Types",
                    "label_ar": "أنواع الرسوم",
                    "route": "/finance/fee-types",
                    "permission": "invoices.view",
                    "sort_order": 7
                },
                {
                    "label_en": "Payment Methods",
                    "label_ar": "طرق الدفع",
                    "route": "/finance/payment-methods",
                    "permission": "payments.view",
                    "sort_order": 8
                },
                {
                    "label_en": "Fiscal Years",
                    "label_ar": "السنوات المالية",
                    "route": "/finance/fiscal-years",
                    "permission": "invoices.view",
                    "sort_order": 9
                },
                {
                    "label_en": "Daily Revenue",
                    "label_ar": "الإيرادات اليومية",
                    "route": "/finance/reports/daily-revenue",
                    "permission": "payments.view",
                    "sort_order": 10
                },
                {
                    "label_en": "Overdue Invoices",
                    "label_ar": "فواتير متأخرة",
                    "route": "/finance/reports/overdue",
                    "permission": "invoices.view",
                    "sort_order": 11
                }
            ]
        }
    ],
    "dashboard_widgets": [
        {
            "widget_id": "finance_revenue_today",
            "label_en": "Revenue Today",
            "label_ar": "إيرادات اليوم",
            "permission": "payments.view",
            "partial": "views/widgets/revenue_today.php",
            "size": "col-md-3",
            "sort_order": 10
        },
        {
            "widget_id": "finance_outstanding",
            "label_en": "Outstanding Balance",
            "label_ar": "الرصيد المستحق",
            "permission": "invoices.view",
            "partial": "views/widgets/outstanding_balance.php",
            "size": "col-md-3",
            "sort_order": 11
        },
        {
            "widget_id": "finance_overdue",
            "label_en": "Overdue Invoices",
            "label_ar": "الفواتير المتأخرة",
            "permission": "invoices.view",
            "partial": "views/widgets/overdue_invoices.php",
            "size": "col-md-3",
            "sort_order": 12
        }
    ]
}