{
	"name": "preferee/form/nc/project-material/old/query/sales-project-material.json",
	"table": [
		{
			"record_type": ["sales"],
			"table": "order_row"
		},
		{
			"record_type": ["sales"],
			"table": "order"
		},
		{
			"record_type": [""],
			"table": "product"
		}
	],
	"parameter": {
		"aggregate": {
			"sum": ["ordr.waiting_for_delivery", "ordr.order_amount"]
		},
		"remove_empty_aggregate_row": true,
		"show_sql": false,
		"empty": "xyzö",
		"project": "",
		"finished_state": ["LO", "PE", "CL"],
		"open_delivery_state": "",
		"order_type": "TI"
	},
	"query": [["ordr.delivery_state", "=", "open_delivery_state"], "and", ["ord.json_data.project_id", "<>", "empty"], "and", ["ord.json_data.project_id", "=", "project"], "and", ["ord.order_state", "not in", "finished_state"], "and", ["ord.order_type", "=", "order_type"]],
	"field": ["ordr.product_id", "ordr.waiting_for_delivery", "ordr.order_amount", "pr.product_id", "pr.product_type", "pr.stock_unit", "pr.name", "pr.json_data.stock_balance", "pr.minimum_order_amount", "pr.default_supplier_id", "pr.stock_type", "pr.json_data.free_amount", "pr.json_data.coming_amount", "pr.json_data.going_amount"]
}
