{
	"name": "query/manager/product/product_stock/project_material_in_stock.json",
	"table": [
		{
			"record_type": ["product"],
			"table": "stock"
		},
		{
			"record_type": ["sales"],
			"table": "order_row"
		},
		{
			"record_type": ["sales"],
			"table": "order"
		},
		{
			"record_type": [""],
			"table": "product"
		}
	],
	"parameter": {
		"aggregate": {
			"sum": ["st.stock_balance"]
		},
		"remove_empty_aggregate_row": true,
		"show_sql": false,
		"project": "",
		"project_type": ""
	},
	"query": [["st.project_id", "=", "project"], "and", ["st.type", "=", "project_type"], "and", ["st.stock_balance", ">", 0]],
	"field": [
		"st.product_id",
		"st.stock_balance",
		"pr.stock_unit",
		"pr.name",
		"pr.json_data.stock_balance",
		"pr.minimum_order_amount",
		"pr.default_supplier_id",
		"pr.product_type",
		"pr.stock_type",
		"pr.json_data.free_amount",
		"pr.json_data.coming_amount",
		"pr.json_data.going_amount"
	]
}
