{
	"info": "",
	"field": {
		"po_purchase_order_id": [
			["po_VIITTEEMME"]
		],
		"po_supplier_id": [
			["po_scTOIMITTAJA"]
		],
		"po_term_of_delivery": [],
		"po_way_of_delivery": [],
		"po_first_delivery_date": [],
		"po_terms_of_payment_id": [],
		"po_state": [],
		"po_order_text": [],
		"po_info": [],
		"po_order_address": [],
		"po_order_date": [],
		"po_order_id": [
			["po_scTILAAJA"]
		],
		"po_receiver_id": [],
		"po_our_reference": [],
		"po_your_reference": [],
		"po_currency_id": [
			["po_scVALUUTTA"]
		],
		"po_exchange_rate": [
			["po_scVALUUTTA"]
		],
		"po_puchase_price": [],
		"po_company_id": [
			["po_scASIAKAS"]
		],
		"po_invoice_address": [],
		"po_delivery_address": [],
		"po_type_": [],
		"po_firm_id": [
			["po_VIITTEEMME"]
		],
		"po_shipping_date": [],
		"po_freight_charges": [],
		"po_mark": [],
		"po_customer_project": [],
		"po_cost_center": [],
		"po_transfer_id": [],
		"po_waybill_id": [],
		"po_delivery_to_customer": [
			["po_scDELIVERY_TO_CUSTOMER ----<>"]
		]
	},
	"function": {
		"po_VIITTEEMME": [
			["po_our_reference", "=", ["concat", ["po_purchase_order_id", "/", "po_order_id"]]]
		],
    "po_scTOIMITTAJA": [
			["xmessages_off"],
			["po_stopuheli", "=", ["concat", ["su_telephone_area_code", " ", "su_telephone_number"]]],
			["po_your_reference", "=", ["su_your_reference"]],
			["po_terms_of_payment_id", "=", ["su_terms_of_payment_id"]],
			["po_term_of_delivery", "=", ["su_term_of_delivery"]],
			["po_way_of_delivery", "=", ["su_way_of_delivery"]],
			["po_cost_center", "=", ["su_cost_center"]],
			["po_currency_id", "=", ["su_currency_id"]],
			["query", ["currency", ["cur_currency_id", "=", ["po_currency_id"]]]],
			["po_exchange_rate", "=", ["cur_buying_rate"]],
			[
				"if", ["su_payment_receiver_id", "<>", ""],
				[
					["po_receiver_id", "=", ["su_payment_receiver_id"]]
				],
				"else",
				[
					["po_receiver_id", "=", ["po_supplier_id"]]
				]
			],
			[
				"if", [["Records_in_selection", ["por"]], ">", "0"],
				[
					[
						"if", ["po_currency_id", "<>", ["su_currency_id"]],
						[
							["_Str", "=", ["concat", ["Valuutta_on_vaihtunut.", "\n"]]],
							["_Str", "=", ["concat", ["_Str", "Hae_kaikkien_ostorivien_tuotteet_uudelleen, jotta_riveille_saadaan "]]],
							["_Str", "=", ["concat", ["_Str", "uudet_ulkomaiset_hinnat."]]]
						]
					]
				]
			],
			["QUERY", ["suad", ["suad_supplier_id", "=", ["po_supplier_id"]], "*"]],
			["QUERY", ["suad", "&", ["suad_address_type", "=", ["g.mgsTOIM_OSO"]]]],
			[
				"if", [["Records_in_selection", ["suad"]], "=", "1"],
				[
					["po_order_address", "=", ["suad_text_address"]]
				],
				"else",
				[
					["po_order_address", "=", ["su_text_address"]]
				]
			],
			["xMESSAGES_ON"]
		],
    "po_scTILAAJA": [
			["po_VIITTEEMME"]
		],
    "po_scVALUUTTA": [
      [
				"if", ["po_sVanhaVal", "<>", ""],
        [
          [
						"if", [[["Records_in_selection", ["por"]], ">", "0"]], "and",
					["po_currency_id", "<>", ["po_sVanhaVal"]],
						[
							["_Str", "=", ["concat", ["Olet_muuttanut_valuuttaa", "\n"]]],
							["_Str", "=", ["concat", ["_Str", "Hae_jokaiselle_ostoriville_tuotteet_uudestaan, jotta_niille_saadaan"]]],
							["_Str", "=", ["concat", ["_Str", " uusi_ulkomainen_hinta"]]],
							["xCRY", ["_Str"]]
						]
					]
        ]
      ],
			["po_svanhaval", "=", ["po_currency_id"]],
			["RELATE_ONE", ["po_currency_id"]],
			["po_exchange_rate", "=", ["cur_buying_rate"]],
			["po_mkhintayh", "=", ["multiply", ["po_puchase_price", "po_exchange_rate"]]],
			["po_C_CURRENCY"]
    ],
		"po_C_CURRENCY": [
			[
				"if", ["_el_InInput", "=", "true"],
				[
					["po_rMaksetta", "=", ["cur_C_Currency", ["false", "po_exchange_rate", "1", "po_currency_id", "po_purchase_price", "cur_aspopCurren[cur_aspopCurren]"]]],
					["po_tDefaultCurrency", "=", ["cur__DefaultCurre"]],
					["po_tComparisonCurrency", "=", ["cur_aspopCurren[cur_aspopCurren]"]]
				]
			]
		],
		"po_scASIAKAS": [
			[
				"if", ["po_delivery_to_customer", ">", "0"],
				[
					["_po_tAddress", "=", ["po_DeliveryAddress", ["po_company_id", "po_delivery_to_customer"]]],
					["_fld_VALUE_STR_SET", ["set", ["po_delivery_address", "_po_tAddress"]]]
				]
			]
		],
		"po_scDELIVERY_TO_CUSTOMER": [
			[
				"if", ["Form_event", "<>", "On_Load"],
				[
					["_fii__SEL_APPLY_TO", ["por_delivery_to_customer", "por_delivery_to_customer"]],
					["ARRAY_TEXT", ["_po_atProductionLot", "0"]],
					["ARRAY_LONGINT", ["_po_alPhase", "0"]],
					["_sel__SEL_TO_ARR_TWO", ["por_production_lot", "_po_atProductionLot", "por_work_phase_number", "_po_alPhase"]],
					[
						"for ---- ??", [["_po_lIndex", "=", "1"], ["Size_of_array", ["_po_atProductionLot"]]],
						"do",
						[
							["po_DELIV_TO_CUST_TO_wos_SAVE", [["_po_atProductionLot", ["_po_lIndex"], ["_po_alPhase", ["_po_lIndex"]], "_po_lDeliveryToCustomer"]]]
						]
					]
				]
			]
		]
	}
}
