{
	"info": "",
	"field": {
		"rcl_kReclamation_ID": [],
		"rcl_kType": [
			["rcl_scType"]
		],
		"rcl_kState": [
			"if", ["rcl_State", "=", "g.rcl_lFinishedState"],
			[
				["rcl_Finished_Date", "=" ]
			]
		],
		"rcl_kCreation_Date": [],
		"rcl_kFinished_Date": [],
		"rcl_kHandler_id":[

		],
		"rcl_kCreated_From": [],
		"rcl_kCustomer_id": [
			["rcl_RELATED_GET"]
		],
		"rcl_kCustomer_Reclamation": [],
		"rcl_kCustomer_Reclamation_Date": [],
		"rcl_kCustomer_Handler": [],
		"rcl_kCustomer_Order_Number": [
			["rcl_scCUSTOMER_ORDER_NUMBER"]
		],
		"rcl_kSales_Order_id": [
			["rcl_scSALES_ORDER"]
		],
		"rcl_kDispatch_Note_id": [
			["rcl_RELATED_GET"]
		],
		"rcl_kProduction_Lot": [
			["rcl_scPRODUCTION_LOT"]
		],
		"rcl_kProduct_id": [
			["rcl_scPRODUCT"],
			["RELATED_GET"]
		],
		"rcl_kFailed_Amount": [
			["rcl_scFAILED_AMOUNT"]
		],
		"rcl_kFault_Found_In_End_Check": [],
		"rcl_kFault_Found_Work_Phase": [
			["rcl_scFAULT_FOUND_WORK_PHASE"]
		],
		"rcl_kFault_Found_Load_Group_id": [
			["rcl_RELATED_GET"]
		],
		"rcl_kFault_Caused_By": [
			["rcl_scFAULT_CAUSED_BY"]
		],
		"rcl_kFault_Made_Work_Phase": [
			["rcl_scFAULT_MADE_WORK_PHASE"]
		],
		"rcl_kFault_Made_Load_Group_id": [
			["rcl_RELATED_GET"]
		],
		"rcl_kFault_Made_Date": [],
		"rcl_kEmployee_Description": [],
		"rcl_kCustomer_Description": [],
		"rcl_kHandler_Description": [
			["rcl_scHANDLER_DESCRIPTION"]
		],
		"rcl_kFault_Type": [],
		"rcl_kFault_Reason": [],
		"rcl_kMeasures": [],
		"rcl_kSpecial_Permission_Giver": [],
		"rcl_kSpecial_Permission_Date": [],
		"rcl_kReturn": [],
		"rcl_kCustomer_Pays_Freights": [],
		"rcl_kWay_Of_Delivery": [],
		"rcl_kOrder_Measures": [],
		"rcl_kMeasures_To_Avoid_Faults": [],
		"rcl_kMaterial_Self_Cost": [
			["rcl_TOTAL_CHARGES_SET"]
		],
		"rcl_kNo_Found_Phase_Self_Cost": [
			["rcl_TOTAL_CHARGES_SET"]
		],
		"rcl_kWork_Cumul_Self_Cost": [
			["rcl_TOTAL_CHARGES_SET"]
		],
		"rcl_kSales_Price": [
			["rcl_TOTAL_CHARGES_SET"]
		],
		"rcl_kRepair_Hours": [
			["rcl_Repair_Price_Total", "="],
			["rcl_TOTAL_CHARGES_SET"]
		],
		"rcl_kRepair_Price_Unit": [
			["rcl_Repair_Price_Total", "="],
			["rcl_TOTAL_CHARGES_SET"]
		],
		"rcl_kRepair_Price_Total": [
			["rcl_TOTAL_CHARGES_SET"]
		],
		"rcl_kRepair_Purchase_Charges": [
			["rcl_TOTAL_CHARGES_SET"]
		],
		"rcl_kRepair_Purchase_Order_id": [
			["rcl_RELATED_GET"]
		],
		"rcl_kFreight_Charges": [
			["rcl_TOTAL_CHARGES_SET"]
		],
		"rcl_kOther_Charges": [
			["rcl_TOTAL_CHARGES_SET"]
		],
		"rcl_kTotal_Charges": [],
		"rcl_kPaid_Compensation": [],
		"rcl_kCredit_Note_Due_Date": [],
		"rcl_kSupplier_id": [
			["rcl_scSUPPLIER"],
			["rcl_RELATED_GET"]
		],
		"rcl_kSupplier_Text_Address": [],
		"rcl_kPurchase_Order_id": [
			["rcl_scPURCHASE_ORDER"],
			["rcl_RELATED_GET"]
		],
		"rcl_kPurchase_Row_Number": [
			["rcl_scPURCHASE_ROW_NUMBER"],
			["rcl_RELATED_GET"]
		],
		"rcl_kPurchase_Our_Reference": [],
		"rcl_kPurchase_Product_id": [
			["rcl_RELATED_GET"]
		],
		"rcl_kPurchase_Order_Amount": [],
		"rcl_kPurchase_Description": [],
		"rcl_kPurchase_Repair_Action": [],
		"rcl_kCompensation_Due_Date": [],
		"rcl_kPurchase_Delivery_Action": [],
		"rcl_kCompensate_Delivery": [
			["rcl_COMPENSATION_SET"]
		],
		"rcl_kCompensate_Material": [
			["rcl_COMPENSATION_SET"]
		],
		"rcl_kCompensate_Subcontract": [
			["rcl_COMPENSATION_SET"]
		],
		"rcl_kCompensate_Work_Self_Cost": [
			["rcl_COMPENSATION_SET"]
		],
		"rcl_kCompensate_Other_Charges": [
			["rcl_COMPENSATION_SET"]
		],
		"rcl_kCompensate_Repair_Charges": [
			["rcl_COMPENSATION_SET"]
		],
		"rcl_kSupplier_Total_Sum": [],
		"rcl_kFirm_id": [],
		"rcl_kSubcontract_Self_Cost": [],
		"rcl_kPurchase_Return": [],
		"rcl_kSupplier_Pays_Freights": [],
		"rcl_kPurchase_Way_Of_Delivery": [],
		"rcl_kIncorrect_Material_Used": [],
		"rcl_kinfo": [],
		"rcl_kRejected_Amount": [],
		"rcl_kRepair_Amount": [
			["rcl_REJECTED_AMOUNT_SET"]
		],
		"rcl_kShow_Type": [],
		"rcl_kCalculation_Type": [],
		"rcl_kPrint_To_Report": [],
		"rcl_kTransfer_id": []
	},
	"function": {
		"rcl_scTYPE": [
			["rcl_INPUT_DISABLE"],
			["rcl_TOTAL_CHARGES_CALCULATE", ["kFalse"]],
			"if", ["rcl_Type", "=", "g.rcl_lInternalType"],
			[
				["rcl_Sales_Order_id", "=", ""],
				["rcl_Dispatch_Note_id", "=", ""]
			],
			[
				["rcl_Fault_Found_In_End_Check", "=", "True"],
				["rcl_ff_Fault_Found_In_End_Check", "=", "True"]
			]
		],
		"rcl_RELATED_GET": [
			["rcl_tProductName", "=", ""],
			["rcl_tProductionControlType", "=", ""],
			"if", ["_fld_ValueStr", ["rcl_kProduct_id"], "<>", ""],
			[
				["_sel_RELATE_ONE", ["pr_kProduct_ID", "rcl_kProduct_id"]],
				"if", ["_sel_RecsInSel", ["pr_kTbl", ">", 0]],
				[
					["rcl_tProductName", "=", "_fld_ValueStr", ["pr_kName"]],
					["_rcl_lProductionControlType", "=", "_fld_ValueLong", ["pr_kProduction_Control_Type"]]

				]
			],
			["rcl_tWorkOrder_id", "=", ""],
			["rcl_tDrawingNum", "=", ""],
			["rcl_rStartedAmount", "=", 0],
			"if", ["_fld_ValueStr", ["rcl_kProduction_Lot"], "<>", ""],
			[
				["_sel_RELATE_ONE", ["wo_kProduction_Lot", "rcl_kProduction_Lot"]],
				"if", ["_sel_RecsInSel", ["wo_kTbl"], ">", 0],
				[
					["rcl_tWorkOrder_id", "=", "_fld_ValueStr", ["wo_kWork_Order_ID"]],
					["rcl_tDrawingNum", "=", "_fld_ValueStr", ["wo_kDrawing_Number"]],
					["rcl_rStartedAmount", "=", "_fld_ValueReal", ["wo_kStarted_Amount"]]
				]
			],
			["rcl_tPurchaseProductName", "=", ""],
			["rcl_tPurchaseProductName", "=", ""],
			"if", ["_fld_ValueStr", ["rcl_kPurchase_Product_id"], "<>", ""],
			[
				["_sel_RELATE_ONE", ["pr_kProduct_ID", "rcl_kPurchase_Product_id"]],
				"if", ["_sel_RecsInSel", ["pr_kTbl"], ">", 0],
				[
					["rcl_tPurchaseProductName", "=", "_fld_ValueStr", ["pr_kName"]],
					["rcl_tPurchaseProductUnit", "=", "_fld_ValueStr", ["pr_kUnit"]]
				]
			],
			["rcl_tAccountablePerson", "=", ""],


			"if", ["_sel_RecsInSel", ["co_kTbl"], ">", 0],
			[
				["rcl_tAccountablePerson", "_fld_ValueStr", ["co_kAccountable_Person_id"]]
			],
			["rcl_DELIVERED_GET"]
		],
		"rcl_scFAILED_AMOUNT": [
			["rcl_REJECTED_AMOUNT_SET"]
		],
		"rcl_scFAULT_FOUND_WORK_PHASE": [
			["_sel_RELATE_ONE", ["wo_kProduction_Lot", "rcl_kProduction_Lot"]],
			["_str", "=", "_fld_ValueStr", ["wo_kWork_Position_Num_id"]],
			["_rcl_lSelSize", "=", "_qry_Fld", [0, "wpe_kWork_Position_Num_id", "=", "_str", "*", "kFalse"]],
			["_long", "=", "rcl_Fault_Found_Work_Phase"],
			["_rcl_lSelSize", "=", "_qry_Fld", [0, "wpe_kPhase_Number", "=", "_long", "and", "kFalse"]],
			"if", ["_rcl_lSelSize", ">", 0],
			[
				["rcl_Fault_Found_Load_Group_id", "=", "_fld_ValueStr", ["wpe_kWork_Load_Group_id"]]
			]
		],
		"rcl_scFAULT_CAUSED_BY": [
			["rcl_Fault_Made_Date", "=", "00.00.0000."],
			"if", ["rcl_Fault_Caused_By", "=", "_lang_Current", ["Material"]],
			[
				["rcl_Fault_Made_Work_Phase", "=", 0],
				"if", ["g.w_tRawMaterialLoadGroupId", "<>", ""],
				[
					["_rcl_lSelSize", "=", "_qry_Fld", [0, "wlg_kWork_Load_Group_ID", "=", "g.w_RawMaterialLoadGroupId", "", "kFalse"]]
				],
				["rcl_FAULT_MADE_DATE_SET"]
			],
			["rcl_PURCHASE_VALUES_SET"]
		],
		"rcl_scHANDLER_DESCRIPTION": [
			"if", ["rcl_Purchase_Description", "=", ""],
			[
				["rcl_Purchase_Description", "=", "rcl_Handler_Description"]
			]


		],
		"rcl_TOTAL_CHARGES_SET": [
			"if", [["rcl_Type", "=", "g.rcl_lInternalType"], "and", ["g.rcl_lCalcAllCostsToAllTypes", "=", "kFalse"]],
			[
				["rcl_Total_Charges", "=", "rclMaterial_Self_Cost", "+", "rcl_Work_Cumul_Self_Cost", "+", "rcl_Subcontract_Self_Cost", "+", "rcl_Repair_Price_Total", "+", "rcl_Repair_Purchase_Charges"],
				["rcl_Total_Charges", "=", "rcl_Total_Charges", "+", "rcl_Freight_Charges", "+", "rcl_Other_Charges"]
			],
			[
				["rcl_Total_Charges", "=", "rcl_Sales_Price", "+", "rcl_Repair_Price_Total", "+", "rcl_Repair_Purchase_Charges"],
				["rcl_Total_Charges", "=", "rcl_Total_Charges", "+", "rcl_Freight_Charges", "+", "rcl_Other_Charges"]
			],
			["rcl_Total_Charges", "=", "Round", ["rcl_Total_Charges", 2]]
		],
		"rcl_scSUPPLIER": [
			["_sel_RELATE_ONE", ["su_kSupplier_ID", "rcl_kSupplier_id"]],
			"if", ["_sel_RecsInSel", ["su_kTbl"], ">", 0],
			[
				["rcl_Supplier_Text_Address", "=", "_fld_ValueStr", ["su_kText_Address"]]
			],
			["rcl_COMPENSATION_SET"]
		],
		"rcl_scPURCHASE_ORDER": [
			["_txt", "=", "rcl_Purchase_Order_id"],
			["_rcl_lSelSize", "=", "_qry_Fld", ["po_kTbl", "po_kPurchase_Order_ID", "=", "_txt", "", "kFalse"]],
			"if", ["_rcl_lSelSize", ">", 0],
			[
				["rcl_Supplier_id", "=", "_fld_ValueStr", ["po_kSupplier_id"]],
				["rcl_scSUPPLIER"],
				["rcl_Purchase_Our_Reference", "=", "_fld_ValueStr", ["po_kOur_Reference"]],
				["rcl_scPURCHASE_ROW_NUMBER"]
			]
		],
		"rcl_scPURCHASE_ROW_NUMBER": [
			"if", ["rcl_Purchase_Order_id", "<>", ""],
			[
				["_text", "=", "rcl_Purchase_Order_id"],
				["_rcl_lSelSize", "=", "_qry_Fld", ["por_kTbl", "por_kPurchase_Order_id", "=", "_txt", "*", "kFalse"]],
				["_long", "=", "rcl_Purchase_Row_Number"],
				["_rcl_lSelSize", "=", "_qry_Fld", ["por_kTbl", "por_kRow_Number", "=", "_long", "and", "kFalse"]],
				"if", ["_rcl_lSelSize", ">", 0],
				[
					["rcl_Purchase_Product_id", "=", "_fld_ValueStr", ["por_kProduct_id"]],
					["rcl_Purchase_Order_Amount", "=", "_fld_ValueReal", ["por_kOrder_Amount"]]
				]
			]
		],
		"rcl_COMPENSATION_SET": [
			["rcl_rCompensate_Material", "=", "rcl_Material_Self_Cost"],
			["rcl_SUBCONTRACT_SELF_COST_SET", ["rcl_rCompensate_Subcontract", "rcl_Supplier_id"]],
			["rcl_Compensate_Work_Self_Cost", "=", "rcl_Work_Cumul_Self_Cost", "+", ["rcl_Subcontract_Self_Cost", "-", "rcl_rCompensate_Subcontract"]],
			["rcl_rCompensate_Repair_Charges", "=", "rcl_Repair_Price_Total", "+", "rcl_Repair_Purchase_Charges"],
			["rcl_rCompensate_Delivery", "=", "rcl_Freight_Charges"],
			["rcl_rCompensate_Other_Charges", "=", "rcl_Other_Charges"],
			["rcl_TOTAL_COMPENSATION_SET"]
		],
		"rcl_REJECTED_AMOUNT_SET": [
			["rcl_Rejected_Amount", "=", "rcl_Failed_Amount", "-", "rcl_Repair_Amount"],
			"if", ["rcl_Rejected_Amount", ">", 0],
			[
				["rcl_Rejected_Amount", "=", 0]
			]
		]
	}
}
