{
        "description": "Enhanced inventory management with multi-unit tracking",
        "version": "2.0.0",
        "tabs": [
            {
                "id": "stocks",
                "label": "Stock Levels",
                "icon": "fa-boxes",
                "dataSources": {
                    "inventory": {
                        "endpoint": "/api/inventory",
                        "primaryKey": "inventory_id",
                        "cache": true,
                        "refreshInterval": 10000
                    }
                },
                "columns": [
                    {"field": "product_name", "label": "Product", "sortable": true, "searchable": true},
                    {"field": "branch_name", "label": "Location", "sortable": true},
                    {"field": "quantity", "label": "Quantity", "sortable": true, "type": "number"},
                    {"field": "unit_type", "label": "Unit", "sortable": true},
                    {"field": "batch", "label": "Batch #"},
                    {"field": "expiry", "label": "Expiry", "type": "date"},
                    {"field": "reorder_level", "label": "Reorder Level", "type": "number"},
                    {"field": "last_updated", "label": "Last Updated", "type": "datetime"}
                ],
                "headerActions": [
                    {
                        "label": "Break Bulk",
                        "icon": "fa-cut",
                        "action": "inventory:break",
                        "class": "btn-secondary"
                    },
                    {
                        "label": "Dispatch",
                        "icon": "fa-truck",
                        "action": "inventory:dispatch",
                        "class": "btn-secondary"
                    },
                    {
                        "label": "Process Transactions",
                        "icon": "fa-sync",
                        "action": "inventory:process",
                        "class": "btn-secondary"
                    }
                ],
                "filters": [
                    {
                        "name": "branch_id",
                        "label": "Location",
                        "type": "select",
                        "dataSource": "branches"
                    },
                    {
                        "name": "low_stock",
                        "label": "Show Low Stock Only",
                        "type": "checkbox"
                    }
                ]
            },
            {
                "id": "receive",
                "label": "Receive Goods",
                "icon": "fa-inbox",
                "component": "custom",
                "customHandler": "InventoryManagement.openReceivingForm"
            },
            {
                "id": "movement",
                "label": "Movement History",
                "icon": "fa-history",
                "dataSources": {
                    "movement_history": {
                        "endpoint": "/api/inventory/movement_history",
                        "cache": false
                    }
                },
                "columns": [
                    {"field": "transaction_date", "label": "Date", "type": "datetime", "sortable": true},
                    {"field": "product_name", "label": "Product", "searchable": true},
                    {"field": "from_location", "label": "From"},
                    {"field": "to_location", "label": "To"},
                    {"field": "quantity", "label": "Qty", "type": "number"},
                    {"field": "unit_type", "label": "Unit"},
                    {"field": "movement_type", "label": "Type", "type": "badge"},
                    {"field": "po_number", "label": "PO #", "searchable": true},
                    {"field": "delivery_note_number", "label": "Delivery #", "searchable": true},
                    {"field": "invoice_number", "label": "Invoice #", "searchable": true},
                    {"field": "batch", "label": "Batch #"}
                ],
                "headerActions": [
                    {
                        "label": "Refresh View",
                        "icon": "fa-sync",
                        "action": "inventory:history:refresh",
                        "class": "btn-secondary"
                    },
                    {
                        "label": "Export",
                        "icon": "fa-download",
                        "action": "inventory:history:export",
                        "class": "btn-secondary"
                    }
                ],
                "filters": [
                    {
                        "name": "start_date",
                        "label": "From Date",
                        "type": "date"
                    },
                    {
                        "name": "end_date",
                        "label": "To Date",
                        "type": "date"
                    },
                    {
                        "name": "product_id",
                        "label": "Product",
                        "type": "product-search"
                    },
                    {
                        "name": "branch_id",
                        "label": "Location",
                        "type": "select",
                        "dataSource": "branches"
                    },
                    {
                        "name": "movement_type",
                        "label": "Type",
                        "type": "select",
                        "options": [
                            {"value": "", "label": "All Types"},
                            {"value": "RECEIVE", "label": "Receive"},
                            {"value": "TRANSFER", "label": "Transfer"},
                            {"value": "BREAK", "label": "Break"},
                            {"value": "SALE", "label": "Sale"},
                            {"value": "ADJUSTMENT", "label": "Adjustment"}
                        ]
                    }
                ],
                "pageSize": 50
            }
        ]
    }