{
	"name": "form/manager/project-material/query/project_material_in_stock.json",
	"table": [
		{
			"record_type": ["product"],
			"table": "stock"
		}
	],
	"database": "4d",
	"parameter": {
		"show_sql": false,
		"project": "",
		"project_type": ""
	},
	"field": [
		"st.product_id",
		"st.stock_balance",
		"pr.stock_unit",
		"pr.name",
		"pr.stock_balance",
		"pr.minimum_order_amount",
		"pr.default_supplier_id",
		"pr.product_type",
		"pr.storable",
		"pr.json_data.free_amount",
		"pr.json_data.coming_amount",
		"pr.json_data.going_amount"
	],
	"aggregate": {
		"sum": ["st.stock_balance"]
	},
	"option": {
		"remove_empty_aggregate_row": true
	},
	"query": [
		["st.project_id", "=", "project"],
		"and",
		["st.json_data.storage_type", "=", "project_type"],
		"and",
		["st.stock_balance", ">", 0]
	]
}
