{
	"name": "query/manager/product/product_work/sales_lead_time_work_phase.json",
	"table": [
		{
			"record_type": ["actual"],
			"table": "product_work"
		}
	],
	"database": "4d",
	"parameter": {
		"finished_state": ["LT"],
		"sales_order": [
				
			],
		"sales_order_row": [
				
			],
		"show_sql": false
	},
	"fieldX": [
		"prwo.work_phase_number",
		"prwo.resource_id",
		"prwo.work_phase_state",
		"prwo.production_lot",
		"pro.sales_order_id",
		"pro.sales_order_row",
		"pr.product_id"
	],
	"query": [
		["prwo.work_phase_number", "<>", 0],
		"and",
		["prwo.work_phase_state", "in", "finished_state"],
		"and",
		["pro.sales_order_id", "in", "order"],
		"and",
		["pro.sales_order_row", "in", "order_row"]
	],
	"queryX": [
		["prwo.work_phase_state", "not in", "mg.work_phase.finished_state"]
	]
}