[
        {
            "name": "product_id",
            "label": "Product",
            "type": "select-search",
            "required": true,
            "dataSource": "/api/products/search",
            "onChange": "populateProductDetails"
        },
        {
            "name": "quantity",
            "label": "Quantity",
            "type": "number",
            "required": true,
            "min": 0.01
        },
        {
            "name": "unit_cost",
            "label": "Unit Cost",
            "type": "number",
            "required": true,
            "step": 0.01
        },
        {
            "name": "batch_number",
            "label": "Batch Number",
            "type": "text",
            "required": false
        },
        {
            "name": "expiry_date",
            "label": "Expiry Date",
            "type": "date",
            "required": false
        },
        {
            "name": "warehouse_id",
            "label": "Warehouse",
            "type": "select",
            "required": true,
            "dataSource": "/api/inventory/warehouses"
        },
        {
            "name": "supplier_id",
            "label": "Supplier",
            "type": "select-search",
            "required": false,
            "dataSource": "/api/vendors/search"
        },
        {
            "name": "reference_number",
            "label": "PO/Reference Number",
            "type": "text",
            "required": false
        },
        {
            "name": "notes",
            "label": "Notes",
            "type": "textarea",
            "required": false,
            "colspan": 2
        }
    ]