{
  "name": "query/manager/order/order_row/sales/open_bw_daewoo_tab.json",
  "database": "4d",
  "parameter": {
    "record_id": [],
    "record_type": "sales",
    "days_to_future": 30,
    "sales_order_state":["AV", "EV", "VA", "AL"],
    "last_date": ""
  },
  "map_parameter":[
    ["last_date", "=", ["daysToCurrentDateStringAdd",["days_to_future"]]]
  ],
  "query": [
    [
      "sor_record_id",
      "in",
      "record_id"
    ],
    "and",
    [
      "so_state",
      "in",
      "sales_order_state"
    ],
    "and",
    [
     "sor_confirmed_delivery_date",
     "<=",
     "last_date"
   ],
    "and",
    [
      "sor_confirmed_delivery_date",
      ">",
      "2000-01-01"
    ]
  ],
  "order": ["sor_confirmed_delivery_date", ">"],
  "field": [
    "sor_record_id"
  ]
}
