{
	"databaseZ": "4d",
	"name": "form/manager/work_phase_failed/run_save.json",
	"info": "work_phase_failed web page save",
	"parameter": {
		"query_param": {}
	},
	"run": [
		[
			"newRcl",
			"=",
			[
				"convertAndSave",
				[{"string": "rec"}, {"string": "rcl"}, "rec", "form/manager/work_phase_failed/convert_new_rcl.json"]
			]
		],
		["errRcl", "=", ["saveToDatabase", ["conn", "newRcl"]]],
		[
			"newWpa",
			"=",
			[
				"convertAndSave",
				[{"string": "rec"}, {"string": "wpa"}, "rec", "form/manager/work_phase_failed/convert_new_wpa.json"]
			]
		],
		["errWpa", "=", ["saveToDatabase", ["conn", "newWpa"]]],
		[
			"db.update",
			[
				{
					"conn": "conn",
					"table": "wos",
					"rec": "rec",
					"selection": "",
					"field": [],
					"run": [
						["prwo.failed_amount", "=", ["prwo.failed_amount", "+", "rcl.failed_amount"]],
						["prwo.remaining_amount", "=", ["prwo.remaining_amount", "-", "rcl.failed_amount"]]
					],
					"on_error": "continue"
				}
			]
		],
		[
			"db.update",
			[
				{
					"conn": "conn",
					"table": "wo",
					"rec": "rec",
					"selection": "",
					"field": [],
					"run": [["pro.failed_amount", "=", ["pro.failed_amount", "+", "rcl.failed_amount"]]],
					"on_error": "continue"
				}
			]
		],
		[
			"return",
			"=",
			["queryAll", [{"name": {"string": "form/manager/work_phase_failed/query_init.json"}, "parameter": "query_param"}]]
		]
	]
}
