[
  {
    "label": "Customer", 
    "type_id": 4, 
    "required": true, 
    "field_name": "customer_id", 
    "data_column": "customer_id", 
    "order_index": 1,
    "options": {
      "source": "/api/customers",
      "value_field": "id",
      "label_field": "name",
      "searchable": true
    }
  },
  {
    "label": "Invoice Number", 
    "type_id": 1, 
    "required": false, 
    "field_name": "invoice_number", 
    "data_column": "invoice_number", 
    "order_index": 2,
    "help_text": "Auto-generated if left blank"
  },
  {
    "label": "Invoice Date", 
    "type_id": 3, 
    "required": true, 
    "field_name": "invoice_date", 
    "data_column": "invoice_date", 
    "order_index": 3,
    "default_value": "today"
  },
  {
    "label": "Due Date", 
    "type_id": 3, 
    "required": true, 
    "field_name": "due_date", 
    "data_column": "due_date", 
    "order_index": 4
  },
  {
    "label": "Amount", 
    "type_id": 10, 
    "required": true, 
    "field_name": "amount", 
    "data_column": "amount", 
    "order_index": 5,
    "validation": {
      "min": 0.01
    }
  },
  {
    "label": "Revenue Account", 
    "type_id": 4, 
    "required": true, 
    "field_name": "revenue_account_id", 
    "data_column": "revenue_account_id", 
    "order_index": 6,
    "options": {
      "source": "/api/finance/accounts?type=revenue",
      "value_field": "id",
      "label_field": "name_with_code"
    }
  },
  {
    "label": "Description", 
    "type_id": 7, 
    "required": false, 
    "field_name": "description", 
    "data_column": "description", 
    "order_index": 7
  },
  {
    "label": "Terms", 
    "type_id": 4, 
    "required": false, 
    "field_name": "terms", 
    "data_column": "terms", 
    "order_index": 8,
    "options": [
      {"value": "net_15", "label": "Net 15"},
      {"value": "net_30", "label": "Net 30"},
      {"value": "net_60", "label": "Net 60"},
      {"value": "due_on_receipt", "label": "Due on Receipt"}
    ],
    "default_value": "net_30"
  }
]