{
	"name": "query/manager/order/order/sales/laskuttamatta.json",
	"info": "---- ?? tarkoittaa epäselvää",
	"table": [
		{
			"record_type": ["sales"],
			"table": "order"
		}
	],
	"query": [
		["_txt", "=", "TI"],
		["_qry_Fld", ["0", ["so_type", "=", "_txt"], "*", "false"]],
		["_txt", "=", "MT"],
		["_qry_Fld", ["0", ["so_type", "=", "_txt"], "|", "false"]],
		["_txt", "=", "PE"],
		["_qry_Fld", ["0", ["ord.order_state", "<>", "_txt"], "", "true"]],
		["if", [["_sel_RecsInSel", ["so_tbl"]], ">", "0"], [["_sel_RELATE_MANY_SELECTION", ["ordr.order_id"]], ["_txt", "=", ""], ["_qry_Fld", ["0", ["ordr.invoice_id", "=", "_txt"], "", "true"]], ["_sel_RELATE_ONE_SELECTION", ["ordr.order_id", "ord.order_id"]]]]
	]
}