{
	"name": "form/nc/erp-sync/aj-mes/save/order_row-sales.json",
	"organization_id": "aj-mes",
	"parameter": { "show_sql": false },
	"save": [
		{
			"record_type": [""],
			"table": "production_order"
		}
	],
	"default_value": {
		"production_order": {
			"static": {
				"json_data.erp_status": "(SELECT COALESCE(MAX(\"ErpStatus\"), 0)+1 FROM \"WorkOrdersTransfer\")",
				"json_data.mes_status": 0,
				"json_data.state": ""
			},
			"copy_value": {
				"json_data.customer_name": "ord.company_id",
				"product_id": "pr.product_id",
				"json_data.product_name": "pr.name",
				"production_order_number": "pr.name",
				"json_data.project_number": "ord.json_data.project_id"
			},
			"code": [
				{
					"function": "currentUtcString",
					"result": "create_time"
				},
				{
					"function": "currentUser",
					"result": "create_user"
				}
			]
		}
	}
}
