{
	"name": "form/nc/erp-sync/lantek/save/part_to_xml_convert-.json",
	"line_break": "\n",
	"namespace": "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"",
	"convert": [
		{
			"field": "pr",
			"tag": "/DATAEX",
			"content": [
				{
					"tag": "COMMAND[Name=\"IMPORT\" TblRef=\"PRODUCTS\"]",
					"content": [
						{
							"field": "product_id",
							"tag": "FIELD[FldRef=\"PrdRef\" FldType=\"20\" FldValue=\"{{product_id}}\"]"
						},
						{
							"field": "product_name",
							"tag": "FIELD[FldRef=\"PrdName\" FldType=\"20\" FldValue=\"{{product_name}}\"]"
						},
						{
							"field": "thickness",
							"tag": "FIELD[FldRef=\"Thickness\" FldType=\"100\" FldValue=\"{{thickness}}\"]"
						},
						{
							"field": "json_data.material_id",
							"tag": "FIELD[FldRef=\"MatRef\" FldType=\"100\" FldValue=\"{{json_data.material_id}}\"]"
						},
						{
							"field": "json_data.load_group_list",
							"tag": "FIELD[FldRef=\"UData1\" FldType=\"20\" FldValue=\"{{json_data.load_group_list}}\"]"
						}
					]
				},
				{
					"field": "pro",
					"tag": "COMMAND[Name=\"IMPORT\" TblRef=\"MANUFACTURING\"]",
					"content": [
						{
							"field": "product_id",
							"tag": "FIELD[FldRef=\"Product\" FldType=\"20\" FldValue=\"{{product_id}}\"]"
						},
						{
							"field": "product_name",
							"tag": "FIELD[FldRef=\"Reference\" FldType=\"20\" FldValue=\"{{product_name}}\"]"
						},
						{
							"field": "company_id",
							"tag": "FIELD[FldRef=\"Customer\" FldType=\"20\" FldValue=\"{{company_id}}\"]",
							"from2": "co.company_name"
						},
						{
							"field": "sales_order_id",
							"tag": "FIELD[FldRef=\"SaleOrder\" FldType=\"20\" FldValue=\"{{sales_order_id}}\"]"
						},
						{
							"field": "amount_to_produce",
							"tag": "FIELD[FldRef=\"Quantity\" FldType=\"100\" FldValue=\"{{amount_to_produce}}\"]"
						},
						{
							"field": "json_data.critical_end_date",
							"tag": "FIELD[FldRef=\"DeliveryDate\" FldType=\"120\" FldValue=\"{{json_data.critical_end_date}}\"]"
						}
					]
				},
				{
					"tag": "COMMAND[Name=\"IMPORT\" TblRef=\"PRODUCT OPERATIONS\"]",
					"content": [
						{
							"field": "pr.product_id",
							"tag": "FIELD[FldRef=\"PrdRef\" FldType=\"20\" FldValue=\"{{pr.product_id}}\"]"
						},
						{
							"field": "res.json_data.transfer_id",
							"tag": "FIELD[FldRef=\"WorkCenter\" FldType=\"20\" FldValue=\"{{res.json_data.transfer_id}}\"]"
						},
						{
							"field": "2D Cut",
							"tag": "FIELD[FldRef=\"Operation\" FldType=\"20\" FldValue=\"2D Cut\"]"
						}
					],
					"field-": "prwo",
					"content-": [
						{
							"field": "1",
							"tag": "FIELD[FldRef=\"OOrder\" FldType=\"20\" FldValue=\"1\"]"
						},
						{
							"field": "0",
							"tag": "FIELD[FldRef=\"PrevOpr\" FldType=\"20\" FldValue=\"0\"]"
						}
					]
				},
				{
					"field": "att",
					"tag": "COMMAND[Name=\"IMPORT\" TblRef=\"IMPORTGEO\"]",
					"content": [
						{
							"field": "pr.product_id",
							"tag": "FIELD[FldRef=\"Product\" FldType=\"20\" FldValue=\"{{pr.product_id}}\"]"
						},
						{
							"result": "result",
							"tag": "FIELD[FldRef=\"GeometryType\" FldType=\"20\" FldValue=\"{{result}}\"]",
							"code": [
								{
									"result": "result",
									"function": "parseAfterLast",
									"parameter": ["document_path", "."]
								},
								{
									"result": "result",
									"function": "upperCase",
									"parameter": ["result"]
								}
							]
						},
						{
							"field": "document_path",
							"tag": "FIELD[FldRef=\"GeometryPath\" FldType=\"20\" FldValue=\"{{document_path}}\"]"
						}
					]
				}
			]
		}
	]
}
