{
  "name": "query/manager/product/product_stock/project_material_in_stock.json",
  "database": "4d",
  "parameter": {
    "show_sql": false,
    "project": "",
    "project_type": ""
  },
  "option":{
   "remove_empty_aggregate_row": true
  },
  "query": [
    ["prst_project_id", "=", "project"],
    "and",
    ["prst_type", "=", "project_type"],
    "and",
    ["prst_stock_balance", ">", 0]
  ],
  "aggregate": {
    "sum": [
      "prst_stock_balance"
    ]
  },
  "field": [
    "prst_product_id",
    "prst_stock_balance",
    "pr_stock_unit",
    "pr_name",
    "pr_stock_balance",
    "pr_minimum_order_amount",
    "pr_supplier_id",
    "pr_product_type",
    "pr_storable",
    "pr_json_data_free_amount",
    "pr_json_data_coming_amount",
    "pr_json_data_going_amount"
  ]
}
