{
	"name": "form/nc/erp-sync/finvoice/query-local/order-invoice.json",
	"table": [
		{
			"record_type": ["invoice"],
			"table": "order"
		},
		{
			"record_type": ["customer"],
			"table": "company"
		},
		{
			"record_type": ["employee"],
			"table": "person"
		},
		{
			"record_type": [""],
			"table": "terms_of_payment"
		}
	],
	"parameter": {
		"order_state_paid": 1,
		"start_date": "2023-01-01",
		"end_date": "2023-12-31",
		"firm_id": "1",
		"show_sql": false
	},
	"query": [["ord.order_date", ">=", "start_date"], "and", ["ord.order_date", "<=", "end_date"], "and", ["ord.json_data.firm_id", "=", "firm_id"]],
	"order": ["ord.order_id", "<"]
}
