{
  "database": "4d",
  "info_fi": "Toteutuneiden työvaiheiden koneajan uudelleenlaskenta",
  "parameter": {
		"show_sql": true,
    "previous_change_id": "",
    "start_date": "2099-01-01"
  },
  "query": [
    [
      "wpa_change_id",
      ">",
      "previous_change_id"
    ],
    "and",
    [
      "wpa_date_",
      ">=",
      "start_date"
    ],
		"and",
		[
			"wpa_start_date",
			">=",
			"start_date"
		],
    "and",
    "query_finished",
    "and",
    [
      "wlg_follow_machine_data",
      "=",
      1
    ],
    "and",
    [
      "wlg_follow_work_progression",
      "=",
      1
    ],
    "and",
    [
      "wlg_use_automatic_receipt",
      "=",
      0
    ]
  ],
  "set": {
    "query_finished": [
      [
        "wpa_type_",
        "=",
        "LO"
      ],
      "or",
      "query_unproductive_finished"
    ],
    "query_unproductive_finished": [
      [
        "wpa_type_",
        "=",
        "ET"
      ],
      "and",
      [
        "wpa_subtype",
        "=",
        "LT"
      ]
    ]
  },
  "field": [
    "wpa_start_date",
    "wpa_start_time",
    "wpa_date_",
    "wpa_end_time",
    "wpa_work_load_group_id",
    "wpa_additional_data",
    "wpa_work_time__amount",
    "wpa_machine_hours",
    "wpa_setup_time__amount",
    "wpa_change_id",
		"wpa_record_id",
		"wpa_night_work_hours",
		"wpa_production_lot",
		"wpa_work__position_num_id"
  ],
  "field_not_in_use": [
    "wpa_start_date",
    "wpa_start_time",
    "wpa_date_",
    "wpa_end_time",
    "wpa_work_load_group_id",
    "wpa_production_lot",
    "wpa_work_phase_est_id",
    "wpa_employee_id",
    "wpa_additional_data",
    "wpa_work_time__amount",
    "wpa_social_cost_multiplier",
    "wpa_profit_multiplier",
    "wpa_setup_salary__hour",
    "wpa_salary__hour",
    "wpa_machine_setup_cost__hour",
    "wpa_machine_work_cost__hour",
    "wpa_salary_bonus",
    "wpa_work__position_num_id",
    "wpa_machine_hours",
    "wpa_setup_time__amount",
    "wpa_change_id",
    "wpa_record_id"
  ],
  "field_to save_not_in_use": [
      "wpa_machine_hours",
      "wpa_work_cost_price__amount",
      "wpa_work_sales_price__amount"
    ]
}
