{
  "elements": [
    {
      "type": "Label",
      "caption": "🧾 Abrechnungseinstellungen"
    },

    {

          "type": "List",
          "name": "Users",
          "caption": "Benutzerliste",
          "add": true,
          "delete": true,
          "sortable": true,
          "columns": [
            { "caption": "ID", "name": "id", "width": "10%", "add": "", "edit": { "type": "ValidationTextBox" } },
            { "caption": "Name", "name": "name", "width": "20%", "add": "", "edit": { "type": "ValidationTextBox" } },
            { "caption": "Adresse", "name": "address", "width": "20%", "add": "", "edit": { "type": "ValidationTextBox" } },
            { "caption": "Ort", "name": "city", "width": "20%", "add": "", "edit": { "type": "ValidationTextBox" } }
          ]

    },

    {

          "type": "List",
          "name": "PowerMeters",
          "caption": "Stromzählerliste",
          "add": true,
          "delete": true,
          "sortable": true,
          "columns": [
            { "caption": "ID", "name": "id", "width": "10%", "add": "", "edit": { "type": "ValidationTextBox" } },
            { "caption": "Name", "name": "name", "width": "20%", "add": "", "edit": { "type": "ValidationTextBox" } },
            { "caption": "Var. Verbrauch", "name": "var_consumption", "width": "20%", "add": 0, "edit": { "type": "SelectVariable" } },
            { "caption": "Var. Rückspeisung", "name": "var_feed", "width": "20%", "add": 0, "edit": { "type": "SelectVariable" } },
            { "caption": "Benutzer-ID", "name": "user_id", "width": "20%", "add": "", "edit": { "type": "ValidationTextBox" } }
          ]
    },

    {

          "type": "List",
          "name": "WaterMeters",
          "caption": "Verbrauchszählerliste",
          "add": true,
          "delete": true,
          "sortable": true,
          "columns": [
            { "caption": "ID", "name": "id", "width": "10%", "add": "", "edit": { "type": "ValidationTextBox" } },
            { "caption": "Name", "name": "name", "width": "20%", "add": "", "edit": { "type": "ValidationTextBox" } },
            { "caption": "Var. Verbrauch", "name": "var_consumption", "width": "20%", "add": 0, "edit": { "type": "SelectVariable" } },
            { "caption": "Benutzer-ID", "name": "user_id", "width": "20%", "add": "", "edit": { "type": "ValidationTextBox" } },
            {
              "caption": "Zählertyp",
              "name": "meter_type",
              "width": "20%",
              "add": "Warmwasser",
              "edit": {
                "type": "Select",
                "options": [
                  { "caption": "Warmwasser", "value": "Warmwasser" },
                  { "caption": "Kaltwasser", "value": "Kaltwasser" },
                  { "caption": "Wärme", "value": "Wärme" }
                ]
              }
            }

      ]
    },

    {

          "type": "List",
          "name": "Tariffs",
          "caption": "Tarifübersicht",
          "add": true,
          "delete": true,
          "sortable": true,
          "columns": [
            {
              "caption": "Startdatum",
              "name": "start",
              "width": "20%",
              "add": "",
              "edit": { "type": "SelectDate" }
            },
            {
              "caption": "Enddatum",
              "name": "end",
              "width": "20%",
              "add": "",
              "edit": { "type": "SelectDate" }
            },
            {
              "caption": "Tarif (Rp/Einheit)",
              "name": "price",
              "width": "20%",
              "add": 0,
              "edit": { "type": "NumberSpinner", "digits": 3, "minimum": 0 }
            },
            {
              "caption": "Einheit",
              "name": "unit_type",
              "width": "20%",
              "add": "Netztarif",
              "edit": {
                "type": "Select",
                "options": [
                  { "caption": "Netztarif", "value": "Netztarif" },
                  { "caption": "Einspeisetarif", "value": "Einspeisetarif" },
                  { "caption": "Solartarif", "value": "Solartarif" },
                  { "caption": "Warmwasser", "value": "Warmwasser" },
                  { "caption": "Kaltwasser", "value": "Kaltwasser" },
                  { "caption": "Wärme", "value": "Wärme" }
                ]
              }
            }
          ]
        }

  ]
}
