{
  "name": "output/wos/workpost/work_column.json",
  "columns": [
    {
      "field": "wos_work_load_group_id",
      "width": 40,
      "name": "Kuor.",
      "enterable": 1
    },
    {
      "field": "wo_company_id",
      "width": 50,
      "name": "Asiakas"
    },
    {
      "field": "co_name",
      "width": 80,
      "name": "Asiakkaan nimi"
    },
    {
      "field": "wo_sales_order_id",
      "width": 45,
      "name": "Myyntitil."
    },
    {
      "field": "wos_reclamation_count",
      "width": 25,
      "name": "Rekl."
    },
    {
      "field": "w_name",
      "fieldx": "ld_work_atName",
      "width": 180,
      "name": "Työn nimi"
    },
    {
      "field": "wo_work_order_id",
      "width": 45,
      "name": "Työmäär."
    },
    {
      "field": "wos_production_lot",
      "width": 50,
      "name": "Valm. erä"
    },
    {
      "field": "wos_work_phase",
      "width": 40,
      "name": "Työvaihe"
    },
    {
      "field": "wos_work_phase_state",
      "width": 25,
      "name": "Tila"
    },
    {
      "field": "wo_started_amount",
      "width": 30,
      "name": "Erä"
    },
    {
      "field": "wos_remaining_amount",
      "width": 34,
      "name": "Jäljellä",
      "cellGraphFormatter": {"html": "<svg width='100%' height='100%'><rect x='{{x}}%' y='5%' height='90%' width='{{size}}%' fill='{{color}}'></rect><text dy='75%'>{{value}}</text></svg>", "negative_from_end": true, "percent_max": 30, "percent_color": [{"color": "red", "end": 0}, {"color": "orange", "start": 0, "end": 7}, {"color": "lightgreen", "start": 7, "end": 30}, {"color": "MediumSeaGreen", "start": 30}]},
      "cssClass": "gridGraph"
    },
    {
      "field": "wos_produced_amount",
      "width": 55,
      "name": "Valmistunut"
    },
     {
      "field": "wo_info",
      "fieldx": "ld_work_atInfo",
      "width": 200,
      "name": "Lisätietoja"
    },
     {
      "field": "wos_phase_critical_start_date",
      "width": 53,
      "name": "Vaiheen alkupäivä"
    },
    {
      "field": "wos_phase_critical_date",
      "width": 58,
      "name": "Vaiheen eräp. norm"
    },
    {
      "field": "wos_phase_critical_date_delayed",
      "width": 80,
      "name": "Vaiheen eräp. aik."
    },
    {
      "field": "pr_product_id",
      "width": 70,
      "name": "Tuote"
    }
  ],
  "columns_fix": [
    {
      "field": "wos_production_lot__work_ph",
      "width": 30,
      "name": "Vaihe"
    },
    {
      "field": "wos_subcontract",
      "width": 40,
      "name": "On AH"
    },
    {
      "field": "wos_work_time",
      "width": 46,
      "name": "Vaiheaika"
    },
    {
      "field": "wos_delivery_to_customer",
      "width": 60,
      "name": "Toim. asiakkaalle"
    },
    {
      "field": "wos_target_time",
      "width": 60,
      "name": "Standardiaika [t/erä]:"
    },
    {
      "field": "wos_subtype",
      "width": 26,
      "name": "Alatila"
    },
    {
      "field": "wo_drawing_number",
      "width": 63,
      "name": "Piirustus"
    },
    {
      "field": "wos_track_time_status",
      "width": 40,
      "name": "Ohj. aika",
      "cellGraphFormatter": {"html": "<svg width='100%' height='100%'><circle cx='50%' cy='50%' r='0.5em' fill='{{color}}'></circle><text dy='75%'>{{value}}</text></svg>", "value_color": [{"color": "none", "end": 0}, {"color": "none", "start": 0, "end": 1}, {"color": "orange", "start": 1, "end": 2}, {"color": "lightgreen", "start": 2, "end": 3}, {"color": "DarkGrey", "start": 3, "end": 4}, {"color": "red", "start": 4}]},
      "cssClass": "gridGraph"
    },
    {
      "field": "wos_reclamation_count",
      "width": 46,
      "name": "Rekl. mrä"
    },
    {
      "field": "xx",
      "width": 28,
      "name": "Järj."
    },
    {
      "field": "wos_extra_hours",
      "width": 65,
      "name": "Lisäaika"
    },
    {
      "field": "wo_critical_date_delayed",
      "fieldx": "ld_work_adCriticalDateDelayed",
      "width": 53,
      "name": "Kriittinen pv"
    },
    {
      "field": "wo_critical_date_real",
      "fieldx": "ld_work_adCriticalDateReal",
      "width": 53,
      "name": "Kr. pv AITO"
    },
    {
      "field": "pr_document_count",
      "fieldx": "ld_work_alDocumentCount",
      "width": 25,
      "name": "Dok"
    },
    {
      "field": "pr_production_control_type",
      "fieldx": "ld_work_alProductionControlType",
      "width": 22,
      "name": "T/V"
    },
    {
      "field": "xx",
      "fieldx": "ld_work_alOtherPhaseLockedState",
      "width": 25,
      "name": "Luk."
    },
    {
      "field": "wos_planned_work_time",
      "fieldx": "ld_work_arPlannedWorkTime",
      "width": 35,
      "name": "Vaiheaika s"
    },
    {
      "field": "wos_start_date",
      "fieldx": "ld_work_adStart_Date",
      "width": 53,
      "name": "Jonoalku"
    },
    {
      "field": "wos_start_time",
      "fieldx": "ld_work_ahStart_Time",
      "width": 53,
      "name": "Jonoalku"
    },
    {
      "field": "wos_end_date",
      "fieldx": "ld_work_adEnd_Date",
      "width": 53,
      "name": "Jonoloppu"
    },
    {
      "field": "wos_end_time",
      "fieldx": "ld_work_adEnd_Time",
      "width": 53,
      "name": "Jonoloppu"
    },
    {
      "field": "wos_delay",
      "fieldx": "ld_work_arDelay",
      "width": 53,
      "name": "Viiväst."
    },
    {
      "field": "wos_advance",
      "fieldx": "ld_work_arAdvance",
      "width": 38,
      "name": "Aikaist."
    }
  ],
  "calculated_colums":[

    {
      "field": "",
      "fieldx": "ld_work_agTrackTimeGraph",
      "width": 27,
      "name": "Ohj.\raika"
    },
    {
      "field": "",
      "fieldx": "ld_work_alRawMaterialState",
      "width": 20,
      "name": "RA"
    },
    {
      "field": "",
      "fieldx": "ld_work_agGraph",
      "width": 70,
      "name": "Kiireellisyys"
    },
    {
      "field": "",
      "fieldx": "ld_work_alPhasesBefore",
      "width": 41,
      "name": "Vaiheita\rennen"
    },
    {
      "field": "",
      "fieldx": "ld_work_arCumulativeFree",
      "width": 40,
      "name": "Kumul"
    },
    {
      "field": "",
      "fieldx": "ld_work_arAmountToStart",
      "width": 39,
      "name": "Voi aloittaa",
      "info": "material phase: PrevPhaseProducedAmount-wos_produced_amount, own phase: PrevPhaseProducedAmount-wos_produced_amount-wosfailed_amount, subcontract phase: PrevPhaseProducedAmount-wos_produced_amount-wosfailed_amount-porComingAmount"
    },
    {
      "field": "",
      "fieldx": "ld_work_arWorkTimeProgress",
      "width": 50,
      "name": "Valm. %",
      "info": "(wpaWorkTimeSum/wos_target_time)*100"
    },
    {
      "field": "",
      "fieldx": "ld_work_alDaysToFinish",
      "width": 24,
      "name": "Ero",
      "info": "EndDate (many optional dates) - CurrentDate"
    }
]
}
