{
	"name": "form/nc/erp-sync/4d/rec.json",
	"tab": "order-purchase-sales",
	"import_save_preference": "form/nc/erp-sync/4d/save/order-purchase-sales.json",
	"external_table": "order-purchase",
	"table": {
		"order-sales": true
	},
	"compare_field": {
		"order-purchase-sales": "company_reference_number",
		"company": "company_id",
		"product": "product_id",
		"order-sales": "order_id",
		"order-purchase": "order_id",
		"order-invoice": "order_id",
		"order_row-sales": ["order_id", "row_number"],
		"order_row-purchase": ["order_id", "row_number"],
		"order_row-invoice": ["invoice_id", "row_number"],
		"production_order": "production_order_id",
		"product_work-estimated": ["product_id", "work_phase_number"],
		"product_material-estimated": ["product_id", "row_number"]
	},
	"query_parameter": {
		"external_organization_id": "demo-fi_demo4d-0",
		"external_organization_id-": "demo-4d2-0",
		"external_organization_id--": "va_varuste-fi_va_varuste4d-0",
		"company_id": ["0001"],
		"external_company_id": ["T1080"],
		"order_date": "2025-01-01"
	},
	"export_allowed": { "order-purchase-sales": false, "company": false, "product": false },
	"import_allowed": { "order-purchase-sales": true, "company": false, "product": false },
	"save_row_table": {
		"order-sales": "order_row-sales",
		"order-purchase": "order_row-purchase",
		"order-invoice": "order_row-invoice"
	},
	"one_row_select": {
		"order-purchase-sales": true
	},
	"update_allowed": {
		"order-purchase-sales": false
	},
	"load_external_table-": {
		"order-purchase-sales": {
			"table": "order",
			"parameter": "order_id",
			"field": "order_id",
			"set_field": [
				{
					"from": "json_data.customer_project",
					"to": "compare_id"
				}
			]
		}
	}
}
