{
  "name": "output/manager/order/order_row/lead_time.json",
  "options": {
    "grid_option": {
      "header_height2": 46
    }
  },
  "columns": [
		{
			"field": "sor_sales_order_id",
			"width": 70,
			"name": "Myyntitilaus",
			"hide": true
		},
		{
			"field": "sor_row_number",
			"width": 30,
			"name": "Rivi",
			"hide": true
		},
		{
      "variable": "order_with_row",
      "width": 70,
			"name": "Tilaus.rivi",
			"rowGroupZ": true,
			"headerNameZ": "Tilaus",
			"cellClassRulesFunction": {
        "blue": "param.node.data.level > 0"
      }
		},
		{
      "variable": "level",
      "width": 30,
			"name": "Taso",
			"cellClassRules": {
        "blue": "x > 0",
        "black": "x <= 0"
      }
		},
		{
      "field": "so_company_id",
      "width": 60,
      "name": "Asiakas"
    },
    {
      "field": "pr_product_id",
      "width": 80,
      "name": "Tuote"
		},
		{
      "field": "wo_production_lot",
      "width": 70,
      "name": "Valmistuserä"
		},
		{
      "field": "wo_work_order_id",
      "width": 70,
      "name": "Työmääräin"
    },
    {
      "field": "sor_explanation",
      "width": 170,
      "name": "Selitys"
		},
		{
      "field": "wo_produced_amount",
      "width": 60,
      "name": "Valmistunut"
		},
		{
      "field": "so_order_date",
      "width": 80,
      "name": "Tilauspäivä"
		},
		{
      "field": "wo_print_date",
      "width": 80,
      "name": "Työm. tulostettu"
		},
		{
      "variable": "work_start_date",
      "width": 80,
      "name": "Työn aloituspäivä"
    },
		{
      "variable": "work_end_date",
      "width": 80,
      "name": "Työn lopetuspäivä"
    },
		{
      "field": "sor_delivery_date",
      "width": 80,
      "name": "Lähetyspäivä"
		},
		{
      "variable": "work_time",
      "width": 80,
			"name": "Työaika (h)",
			"format": "%'.2f"
		},
		{
      "variable": "order_days",
      "width": 110,
      "name": "Tilausten käsittely (d)",
      "format": "%'.0f"
		},
		{
      "variable": "work_start_days",
      "width": 110,
      "name": "Työn aloitus (d)",
      "format": "%'.0f"
		},
		{
      "variable": "production_days",
      "width": 110,
      "name": "Tuotantoaika (d)",
      "format": "%'.0f"
		},
		{
      "variable": "delivery_days",
      "width":110,
      "name": "Lähetysaika (d)",
      "format": "%'.0f"
		},
		{
      "variable": "order_lead_time",
      "width": 110,
      "name": "Tilauksen läpimenoaika (d)",
      "format": "%'.0f"
		},
		{
      "variable": "production_lead_time",
      "width": 110,
      "name": "Tuotannon läpimenoaika (d)",
      "format": "%'.0f"
		},
		{
      "variable": "productive_time",
      "width": 110,
      "name": "Lisäarvoa tuottava aika (d)",
      "format": "%'.0f"
		},
		{
      "variable": "unproductive_time",
      "width": 120,
      "name": "Lisäarvoa tuottamaton aika (d)",
      "format": "%'.0f"
		},
		{
      "variable": "productive_percent",
      "width": 110,
      "name": "Lisäarvoa tuottava %",
      "format": "%'.0f"
		},   
		{
      "field": "pr_product_group",
      "width": 70,
      "name": "Tuoteryhmä"
		}
  ]
}
