{
	"name": "form/nc/erp-sync/finvoice/xml/finvoice-definition.json",
	"finvoice": [
		{
			"tag": "Finvoice",
			"attribute": {
				"Version": "1.3",
				"xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
				"xsi:noNamespaceSchemaLocation": "Finvoice.xsd"
			},
			"content": [
				{
					"tag": "code",
					"content": [
						{
							"type": "Code",
							"define": "_qry Fld(0;co_kCompany_ID;\n\n=\n\n;-\n>\n \\t\n<\n>\n \\tmgsFIRMATUN;\n\n\n;kFalse)",
							"force": "M",
							"header": "Find our Company",
							"order": "1",
							"segment": "finvoice_INVOICE_SellerPartyDetails"
						}
					]
				},
				{
					"tag": "SellerPartyDetails",
					"content": [
						{
							"tag": "SellerPartyIdentifier",
							"content": [
								{
									"field": "co.json_data.trade_registry_number",
									"type": "Field",
									"from_static": "0849338-0",
									"define": "co_kTrade_Registry_Number",
									"fill": "SellerPartyIdentifier",
									"force": "M",
									"header": "SellerPartyIdentifier",
									"order": "3",
									"segment": "finvoice_INVOICE_SellerPartyDetails"
								}
							]
						},
						{
							"tag": "SellerOrganisationName",
							"content": [
								{
									"field": "co.name",
									"type": "Field",
									"from_static": "Manage Applications Ky",
									"define": "co_kName",
									"fill": "SellerOrganisationName",
									"force": "M",
									"header": "SellerOrganisationName",
									"order": "4",
									"segment": "finvoice_INVOICE_SellerPartyDetails"
								}
							]
						},
						{
							"tag": "SellerOrganisationTaxCode",
							"content": [
								{
									"info": "co_kVAT_Number?",
									"field": "co.json_data.vat_number",
									"type": "Field",
									"from_static": "FI08493380",
									"define": "co_kVAT_Number",
									"fill": "SellerOrganisationTaxCode",
									"force": "M",
									"header": "SellerOrganisationTaxCode",
									"order": "5",
									"segment": "finvoice_INVOICE_SellerPartyDetails"
								}
							]
						},
						{
							"tag": "SellerPostalAddressDetails",
							"content": [
								{
									"tag": "SellerStreetName",
									"content": [
										{
											"field": "co.address",
											"type": "Field",
											"from_static": "Laukaantie 4",
											"define": "co_kAddress",
											"fill": "SellerStreetName",
											"force": "M",
											"header": "SellerStreetName",
											"order": "7",
											"segment": "finvoice_INVOICE_SellerPartyDetails"
										}
									]
								},
								{
									"tag": "SellerTownName",
									"content": [
										{
											"field": "co.post_office",
											"type": "Field",
											"from_static": "Jyväskylä",
											"define": "co_kPost_Office",
											"fill": "SellerTownName",
											"force": "M",
											"header": "SellerTownName",
											"order": "8",
											"segment": "finvoice_INVOICE_SellerPartyDetails"
										}
									]
								},
								{
									"tag": "SellerPostCodeIdentifier",
									"content": [
										{
											"field": "co.post_code",
											"type": "Field",
											"from_static": "40320",
											"define": "co_kPost_Code",
											"fill": "SellerPostCodeIdentifier",
											"force": "M",
											"header": "SellerPostCodeIdentifier",
											"order": "9",
											"segment": "finvoice_INVOICE_SellerPartyDetails"
										}
									]
								},
								{
									"tag": "CountryCode",
									"content": [
										{
											"type": "A",
											"from_static": "FI",
											"define": "FI",
											"fill": "CountryCode",
											"force": "M",
											"header": "CountryCode",
											"order": "10",
											"segment": "finvoice_INVOICE_SellerPartyDetails"
										}
									]
								},
								{
									"tag": "CountryName",
									"content": [
										{
											"type": "A",
											"from_static": "FINLAND",
											"define": "FINLAND",
											"fill": "CountryName",
											"force": "M",
											"header": "CountryName",
											"order": "11",
											"segment": "finvoice_INVOICE_SellerPartyDetails"
										}
									]
								}
							]
						}
					]
				},
				{
					"tag": "SellerOrganisationUnitNumber",
					"content": [
						{
							"info": "OVT-tunnus",
							"field": "co.json_data.electronic_invoice_address",
							"type": "Field",
							"from_static": "003708493380  ",
							"define": "co_kElectronic_Invoice_Address",
							"fill": "SellerOrganisationUnitNumber",
							"force": "M",
							"header": "SellerOrganisationUnitNumber",
							"order": "1",
							"segment": "finvoice_INVOICE_SellerOrganisationUnitNumber"
						}
					]
				},
				{
					"tag": "code",
					"content": [
						{
							"type": "Code",
							"define": "_sel RELATE_MANY(in_kInvoice_ID;inr_kInvoice_id)_rec FIRST(inr_kTbl)_txt2:=_fld ValueStr(inr_kEmployee_id)_qry Fld(0;em_kEmployee_ID;\n\n=\n\n;-\n>\n \\t_txt2;\n\n\n;kFalse)",
							"force": "M",
							"header": "Find right company and right person",
							"order": "1",
							"segment": "finvoice_INVOICE_SellerContactPersonName"
						}
					]
				},
				{
					"tag": "SellerContactPersonName",
					"content": [
						{
							"info": "Default_Sales_Person_id",
							"field": "per.full_name",
							"type": "Field",
							"from_static": "Pasi Mankinen",
							"define": "em_kWhole_Name",
							"fill": "SellerContactPersonName",
							"force": "M",
							"header": "SellerContactPersonName",
							"order": "2",
							"segment": "finvoice_INVOICE_SellerContactPersonName"
						}
					]
				},
				{
					"tag": "SellerCommunicationDetails",
					"content": [
						{
							"tag": "SellerPhoneNumberIdentifier",
							"content": [
								{
									"tag": "code",
									"content": [
										{
											"type": "Code",
											"from_static": "014 621 161",
											"define": "If (_fld ValueStr(co_kTelephone_Area_Code)#\n\n\n) xml_tCodeData:=_fld ValueStr(co_kTelephone_Area_Code)+\n\n\n+ _fld ValueStr(co_kTelephone_Number)Else xml_tCodeData:=_fld ValueStr(co_kTelephone_Number)End if",
											"header": "SellerPhoneNumberIdentifier",
											"order": "3",
											"segment": "finvoice_INVOICE_SellerCommunicationDetails"
										}
									]
								}
							]
						},
						{
							"tag": "SellerEmailaddressIdentifier",
							"content": [
								{
									"field": "co.email",
									"type": "Field",
									"define": "co_keMail",
									"fill": "SellerEmailaddressIdentifier",
									"force": "M",
									"header": "SellerEmailaddressIdentifier",
									"order": "5",
									"segment": "finvoice_INVOICE_SellerCommunicationDetails"
								}
							]
						}
					]
				},
				{
					"tag": "SellerInformationDetails",
					"content": [
						{
							"type": "A",
							"fill": "SellerVatRegistrationDate",
							"header": "SellerVatRegistrationDate",
							"order": "4",
							"segment": "finvoice_INVOICE_SellerInformationDetails"
						}
					],
					"content": [
						{
							"tag": "SellerHomeTownName",
							"content": [
								{
									"field": "co.post_office",
									"type": "Field",
									"from_static": "Jyväskylä",
									"define": "co_kPost_Office",
									"fill": "SellerHomeTownName",
									"force": "M",
									"header": "SellerHomeTownName",
									"order": "2",
									"segment": "finvoice_INVOICE_SellerInformationDetails"
								}
							]
						},
						{
							"tag": "SellerVatRegistrationText",
							"content": [
								{
									"type": "A",
									"from_static": "Alv. Rek.",
									"define": "Alv. Rek.",
									"fill": "SellerVatRegistrationText",
									"force": "M",
									"header": "SellerVatRegistrationText",
									"order": "3",
									"segment": "finvoice_INVOICE_SellerInformationDetails"
								}
							]
						},
						{
							"tag": "SellerPhoneNumber",
							"content": [
								{
									"tag": "code",
									"content": [
										{
											"info": " \\t ",
											"type": "Code",
											"from_static": "014 621 161",
											"define": "If (_fld ValueStr(co_kTelephone_Area_Code)#\n\n\n) xml_tCodeData:=_fld ValueStr(co_kTelephone_Area_Code)+\n\n\n+ _fld ValueStr(co_kTelephone_Number)Else xml_tCodeData:=_fld ValueStr(co_kTelephone_Number)End if",
											"fill": "SellerPhoneNumber",
											"force": "M",
											"header": "SellerPhoneNumber",
											"order": "5",
											"segment": "finvoice_INVOICE_SellerInformationDetails"
										}
									]
								}
							]
						},
						{
							"tag": "SellerFaxNumber",
							"content": [
								{
									"tag": "code",
									"content": [
										{
											"type": "Code",
											"from_static": "014 621 163",
											"define": "If (_fld ValueStr(co_kFax_Area_Code)#\n\n\n) xml_tCodeData:=_fld ValueStr(co_kFax_Area_Code)+\n\n\n+ _fld ValueStr(co_kFax_Number)Else xml_tCodeData:=_fld ValueStr(co_kFax_Number)End if",
											"fill": "SellerFaxNumber",
											"force": "M",
											"header": "SellerFaxNumber",
											"order": "6",
											"segment": "finvoice_INVOICE_SellerInformationDetails"
										}
									]
								}
							]
						},
						{
							"tag": "SellerCommonEmailaddressIdentifier",
							"content": [
								{
									"field": "co.email",
									"type": "Field",
									"define": "co_keMail",
									"fill": "SellerCommonEmailaddressIdentifier",
									"force": "M",
									"header": "SellerCommonEmailaddressIdentifier",
									"order": "7",
									"segment": "finvoice_INVOICE_SellerInformationDetails"
								}
							]
						},
						{
							"tag": "SellerWebaddressIdentifier",
							"content": [
								{
									"field": "co.www",
									"type": "Field",
									"define": "co_kWWW",
									"fill": "SellerWebaddressIdentifier",
									"force": "M",
									"header": "SellerWebaddressIdentifier",
									"order": "8",
									"segment": "finvoice_INVOICE_SellerInformationDetails"
								}
							]
						},
						{
							"tag": "SellerFreeText",
							"content": [
								{
									"type": "A",
									"fill": "SellerFreeText",
									"force": "M",
									"header": "SellerFreeText",
									"order": "9",
									"segment": "finvoice_INVOICE_SellerInformationDetails"
								}
							]
						},
						{
							"tag": "SellerAccountDetails",
							"content": [
								{
									"tag": "SellerAccountID",
									"attribute": {
										"IdentificationSchemeName": "IBAN"
									},
									"content": [
										{
											"type": "Variable",
											"from_static": "FI9352900220303935",
											"define": "in_tSellerAccountID",
											"force": "M",
											"header": "SellerAccountID",
											"order": "3",
											"segment": "finvoice_INVOICE_SellerAccountDetails_data"
										}
									]
								},
								{
									"tag": "SellerBic",
									"attribute": {
										"IdentificationSchemeName": "BIC"
									},
									"content": [
										{
											"type": "Variable",
											"from_static": "OKOYFIHH",
											"define": "in_tSellerBic",
											"force": "M",
											"header": "SellerBic",
											"order": "6",
											"segment": "finvoice_INVOICE_SellerAccountDetails_data"
										}
									]
								}
							]
						},
						{
							"tag": "code",
							"content": [
								{
									"type": "Code",
									"define": "If (_fld ValueStr (in_kType_ )#\n<\n>\n \\tin_tFinancingInvoiceType)  in_tSellerAccountIDXml:=_prf_ Txt (\n\n\n;\n\nin_Finvoice_Settings\n\n)  // \n<\n>\n \\tin_tFinvoiceSettingsName    in_tSellerAccountID:=xml ValueGet (in_tSellerAccountIDXml;\n\nSellerAccountID\n\n)  While (in_tSellerAccountID#\n\n\n)    in_tSellerBic:=xml ValueGet (in_tSellerAccountIDXml;\n\nSellerBic\n\n)    xml DOCUMENT_SEND (\n\nfinvoice_INVOICE_SellerAccountDetails\n\n)    in_tSellerAccountIDXml:=xml TagDelete (in_tSellerAccountIDXml;\n\nSellerAccountID\n\n;kFalse )    in_tSellerAccountIDXml:=xml TagDelete (in_tSellerAccountIDXml;\n\nSellerBic\n\n;kFalse )    in_tSellerAccountID:=xml ValueGet (in_tSellerAccountIDXml;\n\nSellerAccountID\n\n)  End while End if ",
									"force": "M",
									"header": "SellerAccountDetails",
									"order": "10",
									"segment": "finvoice_INVOICE_SellerInformationDetails"
								}
							]
						},
						{
							"tag": "code",
							"content": [
								{
									"type": "Code",
									"define": "_txt:=_fld ValueStr(in_kCompany_id)_qry Fld(0;co_kCompany_ID;\n\n=\n\n;-\n>\n \\t_txt;\n\n\n;kFalse)",
									"force": "M",
									"header": "Find invoice receivers Company",
									"order": "11",
									"segment": "finvoice_INVOICE_SellerInformationDetails"
								}
							]
						},
						{
							"tag": "InvoiceRecipientDetails",
							"content": [
								{
									"tag": "InvoiceRecipientAddress",
									"content": [
										{
											"tag": "code",
											"content": [
												{
													"info": "Electronic invoicing address of the seller for example  IBAN",
													"type": "Code",
													"from_static": "FI9352900220303935",
													"define": "in_tSellerAccountIDXml:=_prf_ Txt (\n\n\n;\n<\n>\n \\tin_tFinvoiceSettingsName)xml_tCodeData:=xml ValueGet (in_tSellerAccountIDXml;\n\nInvoiceRecipientAddress\n\n)",
													"fill": "InvoiceRecipientAddress",
													"force": "M",
													"header": "InvoiceRecipientAddress",
													"order": "13",
													"segment": "finvoice_INVOICE_SellerInformationDetails"
												}
											]
										}
									]
								},
								{
									"tag": "InvoiceRecipientIntermediatorAddress",
									"content": [
										{
											"tag": "code",
											"content": [
												{
													"info": "BIC",
													"type": "Code",
													"from_static": "OKOYFIHH",
													"define": "_txt:=_prf_ Txt (\n\n\n;\n<\n>\n \\tin_tFinvoiceSettingsName)xml_tCodeData:=xml ValueGet (_txt;\n\nSellerBic\n\n)",
													"fill": "InvoiceRecipientIntermediatorAddress",
													"force": "M",
													"header": "InvoiceRecipientIntermediatorAddress",
													"order": "14",
													"segment": "finvoice_INVOICE_SellerInformationDetails"
												}
											]
										}
									]
								}
							]
						}
					]
				},
				{
					"tag": "code",
					"content": [
						{
							"type": "Code",
							"define": "_qry Fld(0;co_kCompany_ID;\n\n=\n\n;-\n>\n \\t\n<\n>\n \\tmgsFIRMATUN;\n\n\n;kFalse)",
							"force": "M",
							"header": "Find invoice senders Company",
							"order": "1",
							"segment": "finvoice_INVOICE_InvoiceSenderPartyDetails"
						}
					]
				},
				{
					"tag": "InvoiceSenderPartyDetails",
					"content": [
						{
							"tag": "InvoiceSenderOrganisationName",
							"content": [
								{
									"field": "co.name",
									"type": "Field",
									"from_static": "Manage Applications Ky",
									"define": "co_kName",
									"fill": "InvoiceSenderOrganisationName",
									"force": "M",
									"header": "InvoiceSenderOrganisationName",
									"order": "3",
									"segment": "finvoice_INVOICE_InvoiceSenderPartyDetails"
								}
							]
						}
					]
				},
				{
					"tag": "code",
					"content": [
						{
							"type": "Code",
							"define": "_txt:=_fld ValueStr(in_kCompany_id)_qry Fld(0;co_kCompany_ID;\n\n=\n\n;-\n>\n \\t_txt;\n\n\n;kFalse)",
							"force": "M",
							"header": "Find invoice receivers Company",
							"order": "1",
							"segment": "finvoice_INVOICE_InvoiceRecipientPartyDetails"
						}
					]
				},
				{
					"tag": "InvoiceRecipientPartyDetails",
					"content": [
						{
							"tag": "InvoiceRecipientPartyIdentifier",
							"content": [
								{
									"field": "co.json_data.trade_registry_number",
									"type": "Field",
									"length": "35",
									"from_static": "1798007-6",
									"define": "co_kTrade_Registry_Number",
									"fill": "InvoiceRecipientPartyIdentifier",
									"force": "M",
									"header": "InvoiceRecipientPartyIdentifier",
									"order": "3",
									"segment": "finvoice_INVOICE_InvoiceRecipientPartyDetails"
								}
							]
						},
						{
							"tag": "InvoiceRecipientOrganisationName",
							"content": [
								{
									"field": "co.name",
									"type": "Field",
									"length": "35",
									"from_static": "Ultratec Oy, Ostolaskut",
									"define": "co_kName",
									"fill": "InvoiceRecipientOrganisationName",
									"force": "M",
									"header": "InvoiceRecipientOrganisationName",
									"order": "4",
									"segment": "finvoice_INVOICE_InvoiceRecipientPartyDetails"
								}
							]
						},
						{
							"tag": "InvoiceRecipientOrganisationTaxCode",
							"content": [
								{
									"field": "co.json_data.vat_number",
									"type": "Field",
									"length": "35",
									"define": "co_kVAT_Number",
									"fill": "InvoiceRecipientOrganisationTaxCode",
									"force": "M",
									"header": "InvoiceRecipientOrganisationTaxCode",
									"order": "5",
									"segment": "finvoice_INVOICE_InvoiceRecipientPartyDetails"
								}
							]
						},
						{
							"tag": "InvoiceRecipientPostalAddressDetails",
							"content": [
								{
									"tag": "InvoiceRecipientStreetName",
									"content": [
										{
											"field": "co.address",
											"type": "Field",
											"length": "35",
											"from_static": "PL 32003",
											"define": "co_kAddress",
											"fill": "InvoiceRecipientStreetName",
											"force": "M",
											"header": "InvoiceRecipientStreetName",
											"order": "7",
											"segment": "finvoice_INVOICE_InvoiceRecipientPartyDetails"
										}
									]
								},
								{
									"tag": "InvoiceRecipientTownName",
									"content": [
										{
											"field": "co.post_office",
											"type": "Field",
											"length": "35",
											"from_static": "Laskut",
											"define": "co_kPost_Office",
											"fill": "InvoiceRecipientTownName",
											"force": "M",
											"header": "InvoiceRecipientTownName",
											"order": "8",
											"segment": "finvoice_INVOICE_InvoiceRecipientPartyDetails"
										}
									]
								},
								{
									"tag": "InvoiceRecipientPostCodeIdentifier",
									"content": [
										{
											"field": "co.post_code",
											"type": "Field",
											"length": "35",
											"from_static": "01051",
											"define": "co_kPost_Code",
											"fill": "InvoiceRecipientPostCodeIdentifier",
											"force": "M",
											"header": "InvoiceRecipientPostCodeIdentifier",
											"order": "9",
											"segment": "finvoice_INVOICE_InvoiceRecipientPartyDetails"
										}
									]
								},
								{
									"tag": "CountryCode",
									"content": [
										{
											"tag": "code",
											"content": [
												{
													"info": "FI",
													"type": "Code",
													"length": "2",
													"from_static": "FI",
													"define": "xml_tCodeData:=\n\n\nxml_tParam:=_fld ValueStr(co_kCountry)If(xml_tParam=\n\n\n) | (xml_tParam=\n\n@Finland@\n\n) | (xml_tParam=\n\n@Suomi@\n\n)  xml_tCodeData:=\n\nFI\n\nEnd ifif(xml_tCodeData=\n\n\n)  xml_tCodeData:=\n\nFI\n\nEnd if",
													"fill": "CountryCode",
													"force": "M",
													"header": "CountryCode",
													"order": "10",
													"segment": "finvoice_INVOICE_InvoiceRecipientPartyDetails"
												}
											]
										}
									]
								},
								{
									"tag": "CountryName",
									"content": [
										{
											"tag": "code",
											"content": [
												{
													"info": "FINLAND",
													"type": "Code",
													"length": "35",
													"from_static": "FINLAND",
													"define": "xml_tCodeData:=\n\n\nxml_tCodeData:=_fld ValueStr(co_kCountry)If (xml_tCodeData=\n\n\n)  xml_tCodeData:=\n\nFINLAND\n\nEnd if",
													"fill": "CountryName",
													"force": "M",
													"header": "CountryName",
													"order": "11",
													"segment": "finvoice_INVOICE_InvoiceRecipientPartyDetails"
												}
											]
										}
									]
								},
								{
									"tag": "InvoiceRecipientPostOfficeBoxIdentifier",
									"content": [
										{
											"info": "co_kAddress",
											"type": "A",
											"length": "35",
											"fill": "InvoiceRecipientPostOfficeBoxIdentifier",
											"force": "M",
											"header": "InvoiceRecipientPostOfficeBoxIdentifier",
											"order": "12",
											"segment": "finvoice_INVOICE_InvoiceRecipientPartyDetails"
										}
									]
								}
							]
						}
					]
				},
				{
					"tag": "InvoiceRecipientOrganisationUnitNumber",
					"content": [
						{
							"info": "OVT",
							"field": "co.json_data.vat_number",
							"type": "Field",
							"define": "co_kVAT_Number",
							"fill": "InvoiceRecipientOrganisationUnitNumber",
							"force": "M",
							"header": "InvoiceRecipientOrganisationUnitNumber",
							"order": "1",
							"segment": "finvoice_INVOICE_InvoiceRecipientOrganisationUnitNumber"
						}
					]
				},
				{
					"tag": "InvoiceRecipientCommunicationDetails",
					"content": [
						{
							"tag": "InvoiceRecipientPhoneNumberIdentifier",
							"content": [
								{
									"tag": "code",
									"content": [
										{
											"type": "Code",
											"from_static": "044 3368493",
											"define": "xml_tCodeData:=_fld ValueStr(co_kTelephone_Area_Code) + \n\n\n+ _fld ValueStr(co_kTelephone_Number)",
											"force": "M",
											"header": "InvoiceRecipientPhoneNumberIdentifier",
											"order": "3",
											"segment": "finvoice_INVOICE_InvoiceRecipientCommunicationDetails"
										}
									]
								}
							]
						},
						{
							"tag": "InvoiceRecipientEmailaddressIdentifier",
							"content": [
								{
									"field": "co.email",
									"type": "Field",
									"from_static": "timo@tehovinssi.fi",
									"define": "co_keMail",
									"fill": "InvoiceRecipientEmailaddressIdentifier",
									"force": "M",
									"header": "InvoiceRecipientEmailaddressIdentifier",
									"order": "5",
									"segment": "finvoice_INVOICE_InvoiceRecipientCommunicationDetails"
								}
							]
						}
					]
				},
				{
					"tag": "code",
					"content": [
						{
							"info": "_txt:=_fld ValueStr(in_kCompany_id)_qry Fld(0;co_kCompany_ID;\n\n=\n\n;-\n>\n \\t_txt;\n\n\n;kFalse)",
							"type": "Code",
							"define": "in_lGetValuesFromCustomer:=kFalsein_tDeliveryAdress:=_fld ValueStr(in_kDelivery_Address)Case of : (_fld ValueStr (in_kCompany_id)#_fld ValueStr (in_kDelivery_Company_id))   in_lGetValuesFromCustomer:=kTrue : (_fld ValueStr(in_kInvoice_Address)=in_tDeliveryAdress)   in_lGetValuesFromCustomer:=kTrueEnd case_txt:=_fld ValueStr(in_kDelivery_Company_id)If(_qry Fld(0;co_kCompany_ID;\n\n=\n\n;-\n>\n \\t_txt;\n\n\n;kFalse)\n<\n=0)   in_lGetValuesFromCustomer:=kFalseEnd if",
							"force": "M",
							"header": "Find Company",
							"order": "1",
							"segment": "finvoice_INVOICE_BuyerPartyDetails"
						}
					]
				},
				{
					"tag": "BuyerPartyDetails",
					"content": [
						{
							"tag": "BuyerPartyIdentifier",
							"content": [
								{
									"tag": "code",
									"content": [
										{
											"info": "co_kTrade_Registry_Number",
											"type": "Code",
											"from_static": "1798007-6",
											"define": "xml_tCodeData:=\n\n\nIf (in_lGetValuesFromCustomer=kTrue)  xml_tCodeData:=_fld ValueStr(co_kTrade_Registry_Number)End ifIf(xml_tCodeData=\n\n\n)  xml_tCodeData:=\n\nxx\n\nEnd if",
											"fill": "BuyerPartyIdentifier",
											"force": "M",
											"header": "BuyerPartyIdentifier",
											"order": "3",
											"segment": "finvoice_INVOICE_BuyerPartyDetails"
										}
									]
								}
							]
						},
						{
							"tag": "BuyerOrganisationName",
							"content": [
								{
									"tag": "code",
									"content": [
										{
											"info": "co_kName",
											"type": "Code",
											"length": "35",
											"from_static": "Ultratec Oy",
											"define": "xml_tCodeData:=_str Parse(in_tDeliveryAdress;ksCR;1)If (in_lGetValuesFromCustomer=kTrue)  xml_tCodeData:=_fld ValueStr(co_kName)End ifIf(xml_tCodeData=\n\n\n)  xml_tCodeData:=\n\nxx\n\nEnd if",
											"fill": "BuyerOrganisationName",
											"force": "M",
											"header": "BuyerOrganisationName",
											"order": "4",
											"segment": "finvoice_INVOICE_BuyerPartyDetails"
										}
									]
								}
							]
						},
						{
							"tag": "BuyerOrganisationTaxCode",
							"content": [
								{
									"tag": "code",
									"content": [
										{
											"info": "co_kVAT_Number",
											"type": "Code",
											"define": "xml_tCodeData:=\n\n\nIf (in_lGetValuesFromCustomer=kTrue)  xml_tCodeData:=_fld ValueStr(co_kVAT_Number)End if",
											"fill": "BuyerOrganisationTaxCode",
											"force": "M",
											"header": "BuyerOrganisationTaxCode",
											"order": "5",
											"segment": "finvoice_INVOICE_BuyerPartyDetails"
										}
									]
								}
							]
						},
						{
							"tag": "BuyerPostalAddressDetails",
							"content": [
								{
									"tag": "BuyerStreetName",
									"content": [
										{
											"tag": "code",
											"content": [
												{
													"info": "co_kAddress",
													"type": "Code",
													"length": "35",
													"from_static": "Rautakyläntie 1",
													"define": "xml_tCodeData:=_str Parse(in_tDeliveryAdress;ksCR;2)If (in_lGetValuesFromCustomer=kTrue)  xml_tCodeData:=_fld ValueStr(co_kAddress)End ifIf(xml_tCodeData=\n\n\n)  xml_tCodeData:=\n\nxx\n\nEnd if",
													"fill": "BuyerStreetName",
													"force": "M",
													"header": "BuyerStreetName",
													"order": "7",
													"segment": "finvoice_INVOICE_BuyerPartyDetails"
												}
											]
										}
									]
								},
								{
									"tag": "BuyerTownName",
									"content": [
										{
											"tag": "code",
											"content": [
												{
													"info": "co_kPost_Office",
													"type": "Code",
													"length": "35",
													"from_static": "Petäjävesi",
													"define": "xml_tCodeData:=_str Parse(in_tDeliveryAdress;ksCR;3)If (in_lGetValuesFromCustomer=kTrue)  xml_tCodeData:=_fld ValueStr(co_kPost_Office)End ifIf(xml_tCodeData=\n\n\n)  xml_tCodeData:=\n\nxx\n\nEnd if",
													"fill": "BuyerTownName",
													"force": "M",
													"header": "BuyerTownName",
													"order": "8",
													"segment": "finvoice_INVOICE_BuyerPartyDetails"
												}
											]
										}
									]
								},
								{
									"tag": "BuyerPostCodeIdentifier",
									"content": [
										{
											"tag": "code",
											"content": [
												{
													"info": "co_kPost_Code",
													"type": "Code",
													"from_static": "41900",
													"define": "xml_tCodeData:=\n\n\nIf (in_lGetValuesFromCustomer=kTrue)  xml_tCodeData:=_fld ValueStr(co_kPost_Code)End ifIf(xml_tCodeData=\n\n\n)  xml_tCodeData:=\n\nxx\n\nEnd if",
													"fill": "BuyerPostCodeIdentifier",
													"force": "M",
													"header": "BuyerPostCodeIdentifier",
													"order": "9",
													"segment": "finvoice_INVOICE_BuyerPartyDetails"
												}
											]
										}
									]
								},
								{
									"tag": "CountryCode",
									"content": [
										{
											"tag": "code",
											"content": [
												{
													"info": "FI",
													"type": "Code",
													"from_static": "FI",
													"define": "xml_tCodeData:=\n\n\nIf (in_lGetValuesFromCustomer=kTrue)  xml_tParam:=_fld ValueStr(co_kCountry)  If(xml_tParam=\n\n\n) | (xml_tParam=\n\n@Finland@\n\n) | (xml_tParam=\n\n@Suomi@\n\n)    xml_tCodeData:=\n\nFI\n\n  End ifEnd ifif(xml_tCodeData=\n\n\n)  xml_tCodeData:=\n\nFI\n\nEnd if",
													"fill": "CountryCode",
													"force": "M",
													"header": "CountryCode",
													"order": "10",
													"segment": "finvoice_INVOICE_BuyerPartyDetails"
												}
											]
										}
									]
								},
								{
									"tag": "CountryName",
									"content": [
										{
											"tag": "code",
											"content": [
												{
													"info": "FINLAND",
													"type": "Code",
													"from_static": "FINLAND",
													"define": "xml_tCodeData:=\n\n\nIf (in_lGetValuesFromCustomer=kTrue)  xml_tCodeData:=_fld ValueStr(co_kCountry)  If (xml_tCodeData=\n\n\n)    xml_tCodeData:=\n\nFINLAND\n\n  End ifEnd if",
													"fill": "CountryName",
													"force": "M",
													"header": "CountryName",
													"order": "11",
													"segment": "finvoice_INVOICE_BuyerPartyDetails"
												}
											]
										}
									]
								},
								{
									"tag": "BuyerPostOfficeBoxIdentifier",
									"content": [
										{
											"info": "co_kAddress",
											"type": "A",
											"fill": "BuyerPostOfficeBoxIdentifier",
											"force": "M",
											"header": "BuyerPostOfficeBoxIdentifier",
											"order": "12",
											"segment": "finvoice_INVOICE_BuyerPartyDetails"
										}
									]
								}
							]
						}
					]
				},
				{
					"tag": "BuyerOrganisationUnitNumber",
					"content": [
						{
							"info": "OVT-tunnus",
							"field": "co.json_data.vat_number",
							"type": "Field",
							"define": "co_kVAT_number",
							"fill": "BuyerOrganisationUnitNumber",
							"force": "M",
							"header": "BuyerOrganisationUnitNumber",
							"order": "1",
							"segment": "finvoice_INVOICE_BuyerOrganisationUnitNumber"
						}
					]
				},
				{
					"tag": "BuyerContactPersonName",
					"content": [
						{
							"info": "Default_Sales_Person_id",
							"field": "ord.your_reference",
							"type": "Field",
							"from_static": "Timo Ruokolainen",
							"define": "in_kYour_Reference",
							"fill": "BuyerContactPersonName",
							"force": "M",
							"header": "BuyerContactPersonName",
							"order": "1",
							"segment": "finvoice_INVOICE_BuyerContactPersonName"
						}
					]
				},
				{
					"tag": "BuyerCommunicationDetails",
					"content": [
						{
							"tag": "BuyerPhoneNumberIdentifier",
							"content": [
								{
									"tag": "code",
									"content": [
										{
											"type": "Code",
											"from_static": "044 3368493",
											"define": "xml_tCodeData:=_fld ValueStr(co_kTelephone_Area_Code) + \n\n\n+ _fld ValueStr(co_kTelephone_Number)",
											"force": "M",
											"header": "BuyerPhoneNumberIdentifier",
											"order": "3",
											"segment": "finvoice_INVOICE_BuyerCommunicationDetails"
										}
									]
								}
							]
						},
						{
							"tag": "BuyerEmailaddressIdentifier",
							"content": [
								{
									"field": "co.email",
									"type": "Field",
									"from_static": "timo@tehovinssi.fi",
									"define": "co_keMail",
									"fill": "BuyerEmailaddressIdentifier",
									"force": "M",
									"header": "BuyerEmailaddressIdentifier",
									"order": "5",
									"segment": "finvoice_INVOICE_BuyerCommunicationDetails"
								}
							]
						}
					]
				},
				{
					"tag": "code",
					"content": [
						{
							"type": "Code",
							"define": "in_lGetValuesFromCustomer:=kFalsein_tDeliveryAdress:=_fld ValueStr(in_kDelivery_Address)Case of : (_fld ValueStr (in_kCompany_id)#_fld ValueStr (in_kDelivery_Company_id))   in_lGetValuesFromCustomer:=kTrue : (_fld ValueStr(in_kInvoice_Address)=in_tDeliveryAdress)   in_lGetValuesFromCustomer:=kTrueEnd case_txt:=_fld ValueStr(in_kDelivery_Company_id)If(_qry Fld(0;co_kCompany_ID;\n\n=\n\n;-\n>\n \\t_txt;\n\n\n;kFalse)\n<\n=0)   in_lGetValuesFromCustomer:=kFalseEnd if",
							"force": "M",
							"header": "Find our Company",
							"order": "1",
							"segment": "finvoice_INVOICE_DeliveryPartyDetails"
						}
					]
				},
				{
					"tag": "DeliveryPartyDetails",
					"content": [
						{
							"tag": "DeliveryPartyIdentifier",
							"content": [
								{
									"tag": "code",
									"content": [
										{
											"type": "Code",
											"length": "35",
											"from_static": "1798007-6",
											"define": "xml_tCodeData:=\n\n\nIf (in_lGetValuesFromCustomer=kTrue)  xml_tCodeData:=_fld ValueStr(co_kTrade_Registry_Number)End ifIf(xml_tCodeData=\n\n\n)  xml_tCodeData:=\n\nxx\n\nEnd if",
											"fill": "DeliveryPartyIdentifier",
											"force": "M",
											"header": "DeliveryPartyIdentifier",
											"order": "3",
											"segment": "finvoice_INVOICE_DeliveryPartyDetails"
										}
									]
								}
							]
						},
						{
							"tag": "DeliveryOrganisationName",
							"content": [
								{
									"tag": "code",
									"content": [
										{
											"type": "Code",
											"length": "35",
											"from_static": "Ultratec Oy",
											"define": "xml_tCodeData:=_str Parse(in_tDeliveryAdress;ksCR;1)If (in_lGetValuesFromCustomer=kTrue)  xml_tCodeData:=_fld ValueStr(co_kName)End ifIf(xml_tCodeData=\n\n\n)  xml_tCodeData:=\n\nxx\n\nEnd if",
											"fill": "DeliveryOrganisationName",
											"force": "M",
											"header": "DeliveryOrganisationName",
											"order": "4",
											"segment": "finvoice_INVOICE_DeliveryPartyDetails"
										}
									]
								}
							]
						},
						{
							"tag": "DeliveryOrganisationTaxCode",
							"content": [
								{
									"tag": "code",
									"content": [
										{
											"type": "Code",
											"length": "35",
											"define": "xml_tCodeData:=\n\n\nIf (in_lGetValuesFromCustomer=kTrue)  xml_tCodeData:=_fld ValueStr(co_kVAT_Number)End if",
											"fill": "DeliveryOrganisationTaxCode",
											"force": "M",
											"header": "DeliveryOrganisationTaxCode",
											"order": "5",
											"segment": "finvoice_INVOICE_DeliveryPartyDetails"
										}
									]
								}
							]
						},
						{
							"tag": "DeliveryPostalAddressDetails",
							"content": [
								{
									"tag": "DeliveryStreetName",
									"content": [
										{
											"tag": "code",
											"content": [
												{
													"type": "Code",
													"length": "35",
													"from_static": "Rautakyläntie 1",
													"define": "xml_tCodeData:=_str Parse(in_tDeliveryAdress;ksCR;2)If (in_lGetValuesFromCustomer=kTrue)  xml_tCodeData:=_fld ValueStr(co_kAddress)End ifIf(xml_tCodeData=\n\n\n)  xml_tCodeData:=\n\nxx\n\nEnd if",
													"fill": "DeliveryStreetName",
													"force": "M",
													"header": "DeliveryStreetName",
													"order": "7",
													"segment": "finvoice_INVOICE_DeliveryPartyDetails"
												}
											]
										}
									]
								},
								{
									"tag": "DeliveryTownName",
									"content": [
										{
											"tag": "code",
											"content": [
												{
													"type": "Code",
													"length": "35",
													"from_static": "Petäjävesi",
													"define": "xml_tCodeData:=_str Parse(in_tDeliveryAdress;ksCR;3)If (in_lGetValuesFromCustomer=kTrue)  xml_tCodeData:=_fld ValueStr(co_kPost_Office)End ifIf(xml_tCodeData=\n\n\n)  xml_tCodeData:=\n\nxx\n\nEnd if",
													"fill": "DeliveryTownName",
													"force": "M",
													"header": "DeliveryTownName",
													"order": "8",
													"segment": "finvoice_INVOICE_DeliveryPartyDetails"
												}
											]
										}
									]
								},
								{
									"tag": "DeliveryPostCodeIdentifier",
									"content": [
										{
											"tag": "code",
											"content": [
												{
													"type": "Code",
													"length": "35",
													"from_static": "41900",
													"define": "xml_tCodeData:=\n\n\nIf (in_lGetValuesFromCustomer=kTrue)  xml_tCodeData:=_fld ValueStr(co_kPost_Code)End ifIf(xml_tCodeData=\n\n\n)  xml_tCodeData:=\n\nxx\n\nEnd if",
													"fill": "DeliveryPostCodeIdentifier",
													"force": "M",
													"header": "DeliveryPostCodeIdentifier",
													"order": "9",
													"segment": "finvoice_INVOICE_DeliveryPartyDetails"
												}
											]
										}
									]
								},
								{
									"tag": "CountryCode",
									"content": [
										{
											"tag": "code",
											"content": [
												{
													"type": "Code",
													"length": "2",
													"from_static": "FI",
													"define": "xml_tCodeData:=\n\n\nIf (in_lGetValuesFromCustomer=kTrue)  xml_tParam:=_fld ValueStr(co_kCountry)  If(xml_tParam=\n\n\n) | (xml_tParam=\n\n@Finland@\n\n) | (xml_tParam=\n\n@Suomi@\n\n)    xml_tCodeData:=\n\nFI\n\n  End ifEnd ifif(xml_tCodeData=\n\n\n)  xml_tCodeData:=\n\nFI\n\nEnd if",
													"fill": "CountryCode",
													"force": "M",
													"header": "CountryCode",
													"order": "10",
													"segment": "finvoice_INVOICE_DeliveryPartyDetails"
												}
											]
										}
									]
								},
								{
									"tag": "CountryName",
									"content": [
										{
											"tag": "code",
											"content": [
												{
													"type": "Code",
													"length": "35",
													"from_static": "FINLAND",
													"define": "xml_tCodeData:=\n\n\nIf (in_lGetValuesFromCustomer=kTrue)  xml_tCodeData:=_fld ValueStr(co_kCountry)  If (xml_tCodeData=\n\n\n)    xml_tCodeData:=\n\nFINLAND\n\n  End ifEnd if",
													"fill": "CountryName",
													"force": "M",
													"header": "CountryName",
													"order": "11",
													"segment": "finvoice_INVOICE_DeliveryPartyDetails"
												}
											]
										}
									]
								},
								{
									"tag": "DeliveryPostofficeBoxIdentifier",
									"content": [
										{
											"info": "co_kAddress",
											"type": "A",
											"length": "35",
											"fill": "DeliveryPostofficeBoxIdentifier",
											"force": "M",
											"header": "DeliveryPostofficeBoxIdentifier",
											"order": "12",
											"segment": "finvoice_INVOICE_DeliveryPartyDetails"
										}
									]
								}
							]
						}
					]
				},
				{
					"tag": "DeliveryOrganisationUnitNumber",
					"content": [
						{
							"info": "OVT-tunnus",
							"field": "co.json_data.electronic_invoice_address",
							"type": "Field",
							"from_static": "003717980076",
							"define": "co_kElectronic_Invoice_Address",
							"fill": "DeliveryOrganisationUnitNumber",
							"force": "M",
							"header": "DeliveryOrganisationUnitNumber",
							"order": "1",
							"segment": "finvoice_INVOICE_DeliveryOrganisationUnitNumber"
						}
					]
				},
				{
					"tag": "DeliveryCommunicationDetails",
					"content": [
						{
							"tag": "DeliveryPhoneNumberIdentifier",
							"content": [
								{
									"tag": "code",
									"content": [
										{
											"type": "Code",
											"from_static": "044 3368493",
											"define": "xml_tCodeData:=_fld ValueStr(co_kTelephone_Area_Code)+\n\n\n+_fld ValueStr(co_kTelephone_Number)",
											"fill": "DeliveryPhoneNumberIdentifier",
											"force": "M",
											"header": "DeliveryPhoneNumberIdentifier",
											"order": "2",
											"segment": "finvoice_INVOICE_DeliveryCommunicationDetails"
										}
									]
								}
							]
						},
						{
							"tag": "DeliveryEmailaddressIdentifier",
							"content": [
								{
									"tag": "code",
									"content": [
										{
											"type": "Code",
											"from_static": "timo@tehovinssi.fi ",
											"define": "xml_tCodeData:=_fld ValueStr(co_keMail)+\n\n\n",
											"fill": "DeliveryEmailaddressIdentifier",
											"force": "M",
											"header": "DeliveryEmailaddressIdentifier",
											"order": "3",
											"segment": "finvoice_INVOICE_DeliveryCommunicationDetails"
										}
									]
								}
							]
						}
					]
				},
				{
					"tag": "code",
					"content": [
						{
							"type": "Code",
							"define": "_txt:=_fld ValueStr (inr_kDispatch_Note )If (_txt#\n\n\n)  _qry Fld (0;dn_kDispatch_Note_ID ;\n\n=\n\n;-\n>\n \\t_txt;\n\n\n;kFalse )Else   _sel REDUCE (dn_kTbl ;0)End if If (_sel RecsInSel (dn_kTbl )\n<\n=0)  xml_fSegmentSend:=falseEnd if",
							"force": "M",
							"header": "find dispatch note",
							"order": "1",
							"segment": "finvoice_INVOICE_DeliveryDetails"
						}
					]
				},
				{
					"tag": "code",
					"content": [
						{
							"type": "Code",
							"define": "_txt:=_fld ValueStr(in_kCompany_id)_qry Fld(0;co_kCompany_ID;\n\n=\n\n;-\n>\n \\t_txt;\n\n\n;kFalse)",
							"force": "M",
							"header": "Find Company",
							"order": "1",
							"segment": "finvoice_INVOICE_InvoiceDetails"
						}
					]
				},
				{
					"tag": "InvoiceDetails",
					"content": [
						{
							"type": "A",
							"fill": "SellerReferenceIdentifierUrlText",
							"header": "SellerReferenceIdentifierUrlText",
							"order": "11",
							"segment": "finvoice_INVOICE_InvoiceDetails"
						},
						{
							"type": "A",
							"from_static": "\n",
							"fill": "OrderIdentifierUrlText",
							"header": "OrderIdentifierUrlText",
							"order": "13",
							"segment": "finvoice_INVOICE_InvoiceDetails"
						},
						{
							"type": "A",
							"fill": "AgreementIdentifier",
							"header": "AgreementIdentifier",
							"order": "14",
							"segment": "finvoice_INVOICE_InvoiceDetails"
						},
						{
							"type": "A",
							"fill": "AgreementIdentifierUrlText",
							"header": "AgreementIdentifierUrlText",
							"order": "15",
							"segment": "finvoice_INVOICE_InvoiceDetails"
						},
						{
							"type": "A",
							"from_static": "\n",
							"fill": "ShortProposedAccountIdentifier",
							"header": "ShortProposedAccountIdentifier",
							"order": "31",
							"segment": "finvoice_INVOICE_InvoiceDetails"
						},
						{
							"type": "A",
							"fill": "NormalProposedAccountIdentifier",
							"header": "NormalProposedAccountIdentifier",
							"order": "32",
							"segment": "finvoice_INVOICE_InvoiceDetails"
						},
						{
							"type": "A",
							"fill": "AccountDimensionText",
							"header": "AccountDimensionText",
							"order": "33",
							"segment": "finvoice_INVOICE_InvoiceDetails"
						}
					],
					"content": [
						{
							"tag": "InvoiceTypeCode",
							"content": [
								{
									"info": "xml_sStr:=_fld ValueStr (in_kType_)Case of    : (xml_sStr=\n\nNO\n\n)     xml_tCodeData:=\n\n380\n\n   : (xml_sStr=\n\nHY\n\n)     xml_tCodeData:=\n\n381\n\n Else     xml_tCodeData:=\n\n380\n\nEnd case",
									"type": "A",
									"from_static": "INV01",
									"define": "INV01",
									"fill": "InvoiceTypeCode",
									"force": "M",
									"header": "InvoiceTypeCode",
									"order": "3",
									"segment": "finvoice_INVOICE_InvoiceDetails"
								}
							]
						},
						{
							"tag": "InvoiceTypeText",
							"content": [
								{
									"type": "A",
									"from_static": "LASKU",
									"define": "LASKU",
									"fill": "InvoiceTypeText",
									"force": "M",
									"header": "InvoiceTypeText",
									"order": "4",
									"segment": "finvoice_INVOICE_InvoiceDetails"
								}
							]
						},
						{
							"tag": "OriginCode",
							"content": [
								{
									"type": "A",
									"from_static": "Original",
									"define": "Original",
									"fill": "OriginCode",
									"force": "M",
									"header": "OriginCode",
									"order": "5",
									"segment": "finvoice_INVOICE_InvoiceDetails"
								}
							]
						},
						{
							"tag": "InvoiceNumber",
							"content": [
								{
									"field": "ord.order_id",
									"type": "Field",
									"from_static": "230035",
									"define": "in_kInvoice_id",
									"fill": "InvoiceNumber",
									"force": "M",
									"header": "InvoiceNumber",
									"order": "6",
									"segment": "finvoice_INVOICE_InvoiceDetails"
								}
							]
						},
						{
							"tag": "InvoiceDate",
							"attribute": {
								"Format": "CCYYMMDD"
							},
							"content": [
								{
									"field": "ord.order_date",
									"type": "Field",
									"format": "YYYYMMDD",
									"from_static": "20231205",
									"define": "in_kDate_",
									"force": "M",
									"order": "8",
									"segment": "finvoice_INVOICE_InvoiceDetails"
								}
							]
						},
						{
							"tag": "SellerReferenceIdentifier",
							"content": [
								{
									"field": "ord.our_reference",
									"type": "Field",
									"from_static": "230012/PM",
									"define": "in_kOur_Reference",
									"fill": "SellerReferenceIdentifier",
									"force": "M",
									"header": "SellerReferenceIdentifier",
									"order": "10",
									"segment": "finvoice_INVOICE_InvoiceDetails"
								}
							]
						},
						{
							"tag": "OrderIdentifier",
							"content": [
								{
									"field": "ord.company_reference_number",
									"type": "Field",
									"define": "in_kCustomer_Order_Number",
									"fill": "OrderIdentifier",
									"force": "M",
									"header": "OrderIdentifier",
									"order": "12",
									"segment": "finvoice_INVOICE_InvoiceDetails"
								}
							]
						},
						{
							"tag": "InvoiceTotalVatExcludedAmount",
							"attribute": {
								"AmountCurrencyIdentifier": "EUR∫finvoice_INVOICE_InvoiceDetails∫17∫InvoiceTotalVatExcludedAmount∫M∫Field∫0∫in_kCurrency_ID∫∫∫∫0∫∫∫∫ƒ"
							},
							"content": [
								{
									"define": "\n\n>\n \\t",
									"header": "InvoiceTotalVatExcludedAmount",
									"order": "18",
									"segment": "finvoice_INVOICE_InvoiceDetails"
								},
								{
									"field": "ord.price_without_vat",
									"type": "Field",
									"format": "########0.00",
									"from_static": "485,04",
									"define": "in_kPrice_Total",
									"force": "M",
									"header": "InvoiceTotalVatExcludedAmount",
									"order": "19",
									"segment": "finvoice_INVOICE_InvoiceDetails"
								}
							]
						},
						{
							"tag": "InvoiceTotalVatAmount",
							"attribute": {
								"AmountCurrencyIdentifier": "EUR∫finvoice_INVOICE_InvoiceDetails∫22∫InvoiceTotalVatAmount∫M∫Field∫0∫in_kCurrency_ID∫∫∫∫0∫∫∫∫ƒ"
							},
							"content": [
								{
									"define": "\n\n>\n \\t",
									"header": "InvoiceTotalVatAmount",
									"order": "23",
									"segment": "finvoice_INVOICE_InvoiceDetails"
								},
								{
									"field": "ord.vat_price",
									"type": "Field",
									"format": "########0.00",
									"from_static": "116,41",
									"define": "in_kVAT_Total",
									"force": "M",
									"header": "InvoiceTotalVatAmount",
									"order": "24",
									"segment": "finvoice_INVOICE_InvoiceDetails"
								}
							]
						},
						{
							"tag": "InvoiceTotalVatIncludedAmount",
							"attribute": {
								"AmountCurrencyIdentifier": "EUR∫finvoice_INVOICE_InvoiceDetails∫27∫InvoiceTotalVatIncludedAmount∫M∫Field∫0∫in_kCurrency_ID∫∫∫∫0∫∫∫∫ƒ"
							},
							"content": [
								{
									"define": "\n\n>\n \\t",
									"force": "M",
									"header": "InvoiceTotalVatIncludedAmount",
									"order": "28",
									"segment": "finvoice_INVOICE_InvoiceDetails"
								},
								{
									"field": "ord.price_with_vat",
									"type": "Field",
									"format": "########0.00",
									"from_static": "601,45",
									"define": "in_kTotal_Amount",
									"force": "M",
									"header": "InvoiceTotalVatIncludedAmount",
									"order": "29",
									"segment": "finvoice_INVOICE_InvoiceDetails"
								}
							]
						},
						{
							"tag": "VatSpecificationDetails",
							"content": [
								{
									"tag": "VatBaseAmount",
									"attribute": {
										"AmountCurrencyIdentifier": "EUR∫finvoice_INVOICE_Vat_data∫3∫VatBaseAmount∫M∫Field∫0∫in_kCurrency_ID∫∫∫∫0∫∫∫∫ƒ"
									},
									"content": [
										{
											"field": "ord.price_without_vat",
											"type": "Field",
											"format": "########0.00",
											"from_static": "485,04",
											"define": "in_kPrice_Total",
											"force": "M",
											"header": "VatBaseAmount",
											"order": "5",
											"segment": "finvoice_INVOICE_Vat_data"
										}
									]
								},
								{
									"tag": "VatRatePercent",
									"content": [
										{
											"info": "inr_kVAT_Percentage",
											"type": "Variable",
											"from_static": "24",
											"define": "in_rVatPercentageFinvoice",
											"fill": "VatRatePercent",
											"force": "M",
											"header": "VatRatePercent",
											"order": "7",
											"segment": "finvoice_INVOICE_Vat_data"
										}
									]
								},
								{
									"tag": "VatRateAmount",
									"attribute": {
										"AmountCurrencyIdentifier": "EUR∫finvoice_INVOICE_Vat_data∫9∫VatRateAmount∫M∫Field∫0∫in_kCurrency_ID∫∫∫∫0∫∫∫∫ƒ"
									},
									"content": [
										{
											"info": "in_kVAT_Total",
											"type": "Variable",
											"format": "########0.00",
											"from_static": "116,41",
											"define": "in_rVatPriceFinvoice",
											"force": "M",
											"header": "VatRateAmount",
											"order": "11",
											"segment": "finvoice_INVOICE_Vat_data"
										}
									]
								}
							]
						},
						{
							"tag": "code",
							"content": [
								{
									"info": "_sel RELATE_MANY(in_kInvoice_ID;inr_kInvoice_id)_long2:=_sel RecsInSel (inr_kTbl )_ord FLD (inr_kTbl ;inr_kRow_Number ;1)_sel REC_FIRST (inr_kTbl )For (_long;1;_long2)  xml DOCUMENT_SEND (\n\nfinvoice_INVOICE_Rows\n\n)  _sel REC_NEXT (inr_kTbl )End for ",
									"type": "Code",
									"define": "_sel RELATE_MANY (in_kInvoice_ID ;inr_kInvoice_id )ARRAY REAL(in_arVAT_Percentage_tmp;0)ARRAY REAL(in_arVAT_Price_tmp;0)in_ VAT_ARR_CREATE (-\n>\n \\tin_arVAT_Percentage_tmp;-\n>\n \\tin_arVAT_Price_tmp)SORT ARRAY(in_arVAT_Percentage_tmp;in_arVAT_Price_tmp;\n<\n)_long2:=Size of array(in_arVAT_Percentage_tmp)  //$in_lArrSize -\n>\n \\t _longFor (_long;1;_long2)    in_rVatPercentageFinvoice:=in_arVAT_Percentage_tmp{_long}  in_rVatPriceFinvoice:=in_arVAT_Price_tmp{_long}    xml DOCUMENT_SEND (\n\nfinvoice_INVOICE_VatSpecification\n\n)  End for",
									"force": "M",
									"header": "VatSpecificationDetails",
									"order": "34",
									"segment": "finvoice_INVOICE_InvoiceDetails"
								}
							]
						},
						{
							"tag": "InvoiceFreeText",
							"content": [
								{
									"tag": "code",
									"content": [
										{
											"info": "in_kInvoice_Text",
											"type": "Code",
											"length": "70",
											"define": "xml_tCodeData:=_fld ValueStr (in_kFootnote )_txt:=_fld ValueStr (in_kInvoice_Text )_date:=_fld ValueDate (in_kDue_Date )_date2:=_fld ValueDate (in_kCash_Discount_Due_Date )If ((_date=_date2) | (_date2=!00.00.00!))  xml_tCodeData:=\n\n\nEnd if If (false) If (_fld ValueBoolean (in_kPrinted )=True)  _txt2:=\n\n* Tulostettu *\n\n  If (xml_tCodeData#\n\n\n)    xml_tCodeData:=xml_tCodeData+\n\n / \n\n  End if   xml_tCodeData:=xml_tCodeData+_txt2 End if End ifCase of   : ((xml_tCodeData#\n\n\n) \n&\n (_txt#\n\n\n))    xml_tCodeData:=xml_tCodeData+\n\n / \n\n+_txt  : (_txt#\n\n\n)    xml_tCodeData:=_txtEnd case ",
											"fill": "InvoiceFreeText",
											"force": "M",
											"header": "InvoiceFreeText",
											"order": "35",
											"segment": "finvoice_INVOICE_InvoiceDetails"
										}
									]
								}
							]
						},
						{
							"tag": "PaymentTermsDetails",
							"content": [
								{
									"tag": "PaymentTermsFreeText",
									"content": [
										{
											"tag": "code",
											"content": [
												{
													"type": "Code",
													"from_static": "7 pv netto",
													"define": "_sel RELATE_MANY (in_kTerms_Of_Payment_id ;top_kTerms_Of_Payment_id)if (_sel RecsInSel (top_kTbl )\n>\n \\t0)xml_tCodeData:=_fld ValueStr (top_kName )elsexml_tCodeData:=\n\n\nend if",
													"fill": "PaymentTermsFreeText",
													"force": "M",
													"header": "PaymentTermsFreeText",
													"order": "37",
													"segment": "finvoice_INVOICE_InvoiceDetails"
												}
											]
										}
									]
								},
								{
									"tag": "InvoiceDueDate",
									"attribute": {
										"Format": "CCYYMMDD"
									},
									"content": [
										{
											"field": "ord.due_date",
											"type": "Field",
											"format": "YYYYMMDD",
											"from_static": "20231212",
											"define": "in_kDue_Date",
											"force": "M",
											"header": "InvoiceDueDate",
											"order": "39",
											"segment": "finvoice_INVOICE_InvoiceDetails"
										}
									]
								},
								{
									"tag": "code",
									"content": [
										{
											"type": "Code",
											"define": "xml_ SEGMENT_ROW_SEND_SET (kTrue)",
											"force": "M",
											"header": "Cash discount end",
											"order": "56",
											"segment": "finvoice_INVOICE_InvoiceDetails"
										}
									]
								},
								{
									"tag": "PaymentOverDueFineDetails",
									"content": [
										{
											"tag": "PaymentOverDueFineFreeText",
											"content": [
												{
													"field": "ord.json_data.remark_time",
													"type": "Field",
													"from_static": "7 pv",
													"define": "in_kRemark_Time",
													"fill": "PaymentOverDueFineFreeText",
													"force": "M",
													"header": "PaymentOverDueFineFreeText",
													"order": "58",
													"segment": "finvoice_INVOICE_InvoiceDetails"
												}
											]
										},
										{
											"tag": "PaymentOverDueFinePercent",
											"content": [
												{
													"field": "ord.json_data.penalty_interest_percent",
													"type": "Field",
													"from_static": "8",
													"define": "in_kPenalty_Interest",
													"fill": "PaymentOverDueFinePercent",
													"force": "M",
													"header": "PaymentOverDueFinePercent",
													"order": "59",
													"segment": "finvoice_INVOICE_InvoiceDetails"
												}
											]
										}
									]
								}
							]
						}
					]
				},
				{
					"tag": "PartialPaymentDetails",
					"content": [
						{
							"type": "A",
							"fill": "ProcessingCostsAmount",
							"header": "ProcessingCostsAmount",
							"order": "13",
							"segment": "finvoice_INVOICE_PartialPaymentDetails"
						}
					],
					"content": [
						{
							"tag": "PaidAmount",
							"attribute": {
								"AmountCurrencyIdentifier": "EUR∫finvoice_INVOICE_PartialPaymentDetails∫3∫PaidAmount∫M∫Field∫0∫in_kCurrency_ID∫∫∫∫0∫∫∫∫ƒ"
							},
							"content": [
								{
									"field": "ord.json_data.paid_price",
									"type": "Field",
									"format": "########0.00",
									"from_static": "0,00",
									"define": "in_kPaid_Total",
									"force": "M",
									"header": "PaidAmount",
									"order": "5",
									"segment": "finvoice_INVOICE_PartialPaymentDetails"
								}
							]
						},
						{
							"tag": "UnPaidAmount",
							"attribute": {
								"AmountCurrencyIdentifier": "EUR∫finvoice_INVOICE_PartialPaymentDetails∫8∫UnPaidAmount∫M∫Field∫0∫in_kCurrency_ID∫∫∫∫0∫∫∫∫ƒ"
							},
							"content": [
								{
									"field": "ord.price_with_vat",
									"type": "Field",
									"format": "########0.00",
									"from_static": "601,45",
									"define": "in_kTotal_Amount",
									"force": "M",
									"header": "UnPaidAmount",
									"order": "10",
									"segment": "finvoice_INVOICE_PartialPaymentDetails"
								}
							]
						},
						{
							"tag": "InterestPercent",
							"content": [
								{
									"field": "ord.json_data.penalty_interest_percent",
									"type": "Field",
									"from_static": "8",
									"define": "in_kPenalty_Interest",
									"fill": "InterestPercent",
									"force": "M",
									"header": "InterestPercent",
									"order": "12",
									"segment": "finvoice_INVOICE_PartialPaymentDetails"
								}
							]
						},
						{
							"tag": "PartialPaymentVatIncludedAmount",
							"attribute": {
								"AmountCurrencyIdentifier": "EUR∫finvoice_INVOICE_PartialPaymentDetails∫15∫PartialPaymentVatIncludedAmount∫M∫Field∫0∫in_kCurrency_ID∫∫∫∫0∫∫∫∫ƒ"
							},
							"content": [
								{
									"field": "ord.price_with_vat",
									"type": "Field",
									"format": "########0.00",
									"from_static": "601,45",
									"define": "in_kTotal_Amount",
									"force": "M",
									"header": "PartialPaymentVatIncludedAmount",
									"order": "17",
									"segment": "finvoice_INVOICE_PartialPaymentDetails"
								}
							]
						},
						{
							"tag": "PartialPaymentVatExcludedAmount",
							"attribute": {
								"AmountCurrencyIdentifier": "EUR∫finvoice_INVOICE_PartialPaymentDetails∫20∫PartialPaymentVatExcludedAmount∫M∫Field∫0∫in_kCurrency_ID∫∫∫∫0∫∫∫∫ƒ"
							},
							"content": [
								{
									"field": "ord.price_without_vat",
									"type": "Field",
									"format": "########0.00",
									"from_static": "485,04",
									"define": "in_kPrice_Total",
									"force": "M",
									"header": "PartialPaymentVatExcludedAmount",
									"order": "22",
									"segment": "finvoice_INVOICE_PartialPaymentDetails"
								}
							]
						},
						{
							"tag": "PartialPaymentDueDate",
							"attribute": {
								"Format": "CCYYMMDD"
							},
							"content": [
								{
									"field": "ord.due_date",
									"type": "Field",
									"format": "YYYYMMDD",
									"from_static": "20231212",
									"define": "in_kDue_Date",
									"force": "M",
									"header": "PartialPaymentDueDate",
									"order": "25",
									"segment": "finvoice_INVOICE_PartialPaymentDetails"
								}
							]
						},
						{
							"tag": "PartialPaymentReferenceIdentifier",
							"content": [
								{
									"field": "ord.json_data.bank_reference_number",
									"type": "Field",
									"from_static": "23003508133",
									"define": "in_kReference_Number",
									"fill": "PartialPaymentReferenceIdentifier",
									"force": "M",
									"header": "PartialPaymentReferenceIdentifier",
									"order": "27",
									"segment": "finvoice_INVOICE_PartialPaymentDetails"
								}
							]
						}
					]
				},
				{
					"tag": "InvoiceRow",
					"content": [
						{
							"type": "A",
							"fill": "RowSubIdentifier",
							"header": "RowSubIdentifier",
							"order": "3",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"from_static": "\n",
							"fill": "BuyerArticleIdentifier",
							"header": "BuyerArticleIdentifier",
							"order": "5",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"from_static": "\n",
							"fill": "ArticleInfoUrlText",
							"header": "ArticleInfoUrlText",
							"order": "7",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"from_static": "\n",
							"fill": "ConfirmedQuantity",
							"header": "ConfirmedQuantity",
							"order": "18",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"fill": "StartDate",
							"header": "StartDate",
							"order": "19",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"fill": "EndDate",
							"header": "EndDate",
							"order": "20",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"from_static": "\n",
							"fill": "RowIdentifierUrlText",
							"header": "RowIdentifierUrlText",
							"order": "27",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"info": "Should be dDate when the order was done. In interest invoice it is the date of the original invoice.",
							"type": "A",
							"format": "YYYYMMDD",
							"header": "RowIdentifierDate",
							"order": "28",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"fill": "RowDeliveryIdentifier",
							"header": "RowDeliveryIdentifier",
							"order": "29",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"fill": "RowDeliveryUrlText",
							"header": "RowDeliveryUrlText",
							"order": "30",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"from_static": "\n",
							"fill": "RowQuatationIdentifier",
							"header": "RowQuatationIdentifier",
							"order": "34",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"fill": "RowQuatationIdentifierUrlText",
							"header": "RowQuatationIdentifierUrlText",
							"order": "35",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"fill": "RowAgreementIdentifier",
							"header": "RowAgreementIdentifier",
							"order": "36",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"fill": "RowAgreementIdentifierUrlText",
							"header": "RowAgreementIdentifierUrlText",
							"order": "37",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"type": "A",
							"from_static": "\n",
							"fill": "RowAccountDimensionText",
							"header": "RowAccountDimensionText",
							"order": "44",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"from_static": "\n",
							"fill": "SubInvoiceRow",
							"header": "SubInvoiceRow",
							"order": "64",
							"segment": "finvoice_INVOICE_Row_data"
						}
					],
					"content": [
						{
							"tag": "ArticleIdentifier",
							"content": [
								{
									"info": "2010-07-14, Article Id is given by seller, EANetc. inr_kProduct_id, pr_kEAN_Code, pr_kProduct_Code?",
									"type": "A",
									"fill": "ArticleIdentifier",
									"force": "M",
									"header": "ArticleIdentifier",
									"order": "4",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "ArticleName",
							"content": [
								{
									"tag": "code",
									"content": [
										{
											"info": "2010-07-14, replace cr code PM 2020-10-26",
											"type": "Code",
											"length": "100",
											"from_static": "Manageri II -ohjelmiston vuoden 2023 ylläpito, erä 3/4 (edellinen ylläpitolasku nro 230020).",
											"define": "xml_tCodeData:=_fld ValueStr (inr_kExplanation)xml_tCodeData:=Replace string(xml_tCodeData;ksCR;\n\n\n)",
											"fill": "ArticleName",
											"force": "M",
											"header": "ArticleName",
											"order": "6",
											"segment": "finvoice_INVOICE_Row_data"
										}
									]
								}
							]
						},
						{
							"tag": "DeliveredQuantity",
							"attribute": {
								"QuantityUnitCode": "kpl∫finvoice_INVOICE_Row_data∫9∫DeliveredQuantity∫M∫Field∫0∫inr_kUnit∫∫∫∫0∫∫∫∫ƒ"
							},
							"content": [
								{
									"define": "\n\n>\n \\t",
									"header": "DeliveredQuantity",
									"order": "10",
									"segment": "finvoice_INVOICE_Row_data"
								},
								{
									"field": "ordr.delivery_amount",
									"type": "Field",
									"from_static": "1",
									"define": "inr_kDelivered_Quantity",
									"force": "M",
									"header": "DeliveredQuantity",
									"order": "11",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "OrderedQuantity",
							"attribute": {
								"QuantityUnitCode": "kpl∫finvoice_INVOICE_Row_data∫14∫OrderedQuantity∫M∫Field∫0∫inr_kUnit∫∫∫∫0∫∫∫∫ƒ"
							},
							"content": [
								{
									"define": "\n\n>\n \\t",
									"header": "OrderedQuantity",
									"order": "15",
									"segment": "finvoice_INVOICE_Row_data"
								},
								{
									"field": "ordr.order_amount",
									"type": "Field",
									"from_static": "1",
									"define": "inr_kOrder_Amount",
									"force": "M",
									"header": "OrderedQuantity",
									"order": "16",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "UnitPriceAmount",
							"attribute": {
								"AmountCurrencyIdentifier": "EUR∫finvoice_INVOICE_Row_data∫22∫UnitPriceAmount∫M∫Field∫0∫in_kCurrency_ID∫∫∫∫0∫∫∫∫ƒ"
							},
							"content": [
								{
									"define": "\n\n>\n \\t",
									"header": "UnitPriceAmount",
									"order": "23",
									"segment": "finvoice_INVOICE_Row_data"
								},
								{
									"field": "ordr.unit_price",
									"type": "Field",
									"format": "########0.00",
									"from_static": "242,52",
									"define": "inr_kPrice__Unit",
									"force": "M",
									"header": "UnitPriceAmount",
									"order": "24",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowIdentifier",
							"content": [
								{
									"info": "Identifier given by buyer when the original order was done. In interest invoice or credit note relates to the original invoice. or: inr_kCustomer_Row_Number ?",
									"field": "ordr.dispatch_note_id",
									"type": "Field",
									"define": "inr_kDispatch_Note",
									"fill": "RowIdentifier",
									"force": "M",
									"header": "RowIdentifier",
									"order": "26",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowDeliveryDate",
							"attribute": {
								"Format": "CCYYMMDD"
							},
							"content": [
								{
									"field": "ordr.actual_delivery_date",
									"type": "Field",
									"format": "YYYYMMDD",
									"from_static": "20231205",
									"define": "inr_kDelivery_Date",
									"force": "M",
									"header": "RowDeliveryDate",
									"order": "32",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowDeliveryDetails",
							"content": [
								{
									"tag": "RowWaybillIdentifier",
									"content": [
										{
											"type": "A",
											"fill": "RowWaybillIdentifier",
											"force": "M",
											"header": "RowWaybillIdentifier",
											"order": "39",
											"segment": "finvoice_INVOICE_Row_data"
										}
									]
								}
							]
						},
						{
							"tag": "code",
							"content": [
								{
									"info": "_sel RELATE_ONE (soc_kSales_Order_Code_ID ;inr_kSales_Order_Code_id )_sel RELATE_ONE (ac_kAccount_ID ;soc_kSales_Account_id )",
									"type": "Code",
									"define": "_sel RELATE_ONE (soc_kSales_Order_Code_ID ;inr_kSales_Order_Code_id )_sel RELATE_ONE (ac_kAccount_ID ;soc_kSales_Account_id )_txt:=_fld ValueStr (ac_kSend_Accounts )_txt2:=_str Parse(_txt;\n\n,\n\n;1)_txt3:=_str Parse(_txt;\n\n,\n\n;2)",
									"order": "41",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowShortProposedAccountIdentifier",
							"content": [
								{
									"type": "Variable",
									"from_static": "400",
									"define": "_txt2",
									"fill": "RowShortProposedAccountIdentifier",
									"force": "M",
									"header": "RowShortProposedAccountIdentifier",
									"order": "42",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowNormalProposedAccountIdentifier",
							"content": [
								{
									"type": "Variable",
									"from_static": "4000",
									"define": "_txt3",
									"fill": "RowNormalProposedAccountIdentifier",
									"force": "M",
									"header": "RowNormalProposedAccountIdentifier",
									"order": "43",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowFreeText",
							"content": [
								{
									"tag": "code",
									"content": [
										{
											"info": "SOP asetus: xml_tCodeData:= _fld ValueStr(inr_kExplanation)If (_fld ValueStr(inr_kDispatch_Note)#\n\n\n) xml_tCodeData:=\n\nLähetyslista: \n\n+_fld ValueStr(inr_kDispatch_Note)+\n\n /  \n\n+ksCR+xml_tCodeDataEnd if",
											"type": "Code",
											"from_static": "As. viite: Timo Ruokolainen",
											"define": "xml_tCodeData:=\n\n\n_txt:=_fld ValueStr (inr_kDispatch_Note )If (_txt#\n\n\n)  xml_tCodeData:=\n\nLähetyslista: \n\n+_fld ValueStr (inr_kDispatch_Note )End if _txt:=_fld ValueStr (inr_kSales_Order )If (_txt#\n\n\n)  _qry Fld (0;so_kSales_Order_ID ;\n\n=\n\n;-\n>\n \\t_txt;\n\n\n;kFalse )  If (_sel RecsInSel (so_kTbl )\n>\n \\t0)    _txt:=_fld ValueStr (so_kYour_Reference )    If (_txt#\n\n\n)      If (xml_tCodeData#\n\n\n)        xml_tCodeData:=xml_tCodeData+\n\n / \n\n      End if       xml_tCodeData:=xml_tCodeData+\n\nAs. viite: \n\n+_txt    End if     _txt:=_fld ValueStr (so_kCustomer_Order_Number )    If (_txt#\n\n\n)      If (xml_tCodeData#\n\n\n)        xml_tCodeData:=xml_tCodeData+\n\n / \n\n      End if       xml_tCodeData:=xml_tCodeData+\n\nAs. tilausnumero: \n\n+_txt    End if   End if End if ",
											"fill": "RowFreeText",
											"force": "M",
											"header": "RowFreeText",
											"order": "45",
											"segment": "finvoice_INVOICE_Row_data"
										}
									]
								}
							]
						},
						{
							"tag": "RowDiscountPercent",
							"content": [
								{
									"field": "ordr.discount_percent",
									"type": "Field",
									"from_static": "0",
									"define": "inr_kDiscount_Percentage",
									"fill": "RowDiscountPercent",
									"force": "M",
									"header": "RowDiscountPercent",
									"order": "46",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowVatRatePercent",
							"content": [
								{
									"field": "ordr.vat_percent",
									"type": "Field",
									"from_static": "24",
									"define": "inr_kVAT_Percentage",
									"fill": "RowVatRatePercent",
									"force": "M",
									"header": "RowVatRatePercent",
									"order": "47",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowVatCode",
							"content": [
								{
									"info": "AB, MarginaaliveroAE, Käännetty ALVE, YhteisömyyntiG, Veroton myynti ulkomaille (kolmannet maat)O, Veroton palveluS, Normaali veroprosenttiZ, Veroton tuotZEG, Vero tavaraostoista muista EU-maistaZES, Vero palveluostoista muista EU-maista",
									"field": "ordc.json_data.vat_code",
									"type": "Field",
									"length": "10",
									"define": "soc_kVAT_Code",
									"fill": "RowVatCode",
									"force": "C",
									"header": "RowVatCode",
									"order": "48",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowVatAmount",
							"attribute": {
								"AmountCurrencyIdentifier": "EUR∫finvoice_INVOICE_Row_data∫50∫RowVatAmount∫M∫Field∫0∫in_kCurrency_ID∫∫∫∫0∫∫∫∫ƒ"
							},
							"content": [
								{
									"define": "\n\n>\n \\t",
									"header": "RowVatAmount",
									"order": "51",
									"segment": "finvoice_INVOICE_Row_data"
								},
								{
									"field": "ordr.vat_price",
									"type": "Field",
									"format": "########0.00",
									"from_static": "58,20",
									"define": "inr_kVAT_Price",
									"force": "M",
									"header": "RowVatAmount",
									"order": "52",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowVatExcludedAmount",
							"attribute": {
								"AmountCurrencyIdentifier": "EUR∫finvoice_INVOICE_Row_data∫55∫RowVatExcludedAmount∫M∫Field∫0∫in_kCurrency_ID∫∫∫∫0∫∫∫∫ƒ"
							},
							"content": [
								{
									"define": "\n\n>\n \\t",
									"header": "RowVatExcludedAmount",
									"order": "56",
									"segment": "finvoice_INVOICE_Row_data"
								},
								{
									"field": "ordr.price_without_vat",
									"type": "Field",
									"format": "########0.00",
									"from_static": "242,52",
									"define": " inr_kPrice_Total ",
									"force": "M",
									"header": "RowVatExcludedAmount",
									"order": "57",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowAmount",
							"attribute": {
								"AmountCurrencyIdentifier": "EUR∫finvoice_INVOICE_Row_data∫60∫RowAmount∫M∫Field∫0∫in_kCurrency_ID∫∫∫∫0∫∫∫∫ƒ"
							},
							"content": [
								{
									"define": "\n\n>\n \\t",
									"header": "RowAmount",
									"order": "61",
									"segment": "finvoice_INVOICE_Row_data"
								},
								{
									"field": "ordr.json_data.price_with_vat",
									"type": "Field",
									"format": "########0.00",
									"from_static": "300,72",
									"define": "inr_kTotal_Amount",
									"force": "M",
									"header": "RowAmount",
									"order": "62",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						}
					]
				},
				{
					"tag": "InvoiceRow",
					"content": [
						{
							"type": "A",
							"fill": "RowSubIdentifier",
							"header": "RowSubIdentifier",
							"order": "3",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"from_static": "\n",
							"fill": "BuyerArticleIdentifier",
							"header": "BuyerArticleIdentifier",
							"order": "5",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"from_static": "\n",
							"fill": "ArticleInfoUrlText",
							"header": "ArticleInfoUrlText",
							"order": "7",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"from_static": "\n",
							"fill": "ConfirmedQuantity",
							"header": "ConfirmedQuantity",
							"order": "18",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"fill": "StartDate",
							"header": "StartDate",
							"order": "19",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"fill": "EndDate",
							"header": "EndDate",
							"order": "20",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"from_static": "\n",
							"fill": "RowIdentifierUrlText",
							"header": "RowIdentifierUrlText",
							"order": "27",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"info": "Should be dDate when the order was done. In interest invoice it is the date of the original invoice.",
							"type": "A",
							"format": "YYYYMMDD",
							"header": "RowIdentifierDate",
							"order": "28",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"fill": "RowDeliveryIdentifier",
							"header": "RowDeliveryIdentifier",
							"order": "29",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"fill": "RowDeliveryUrlText",
							"header": "RowDeliveryUrlText",
							"order": "30",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"from_static": "\n",
							"fill": "RowQuatationIdentifier",
							"header": "RowQuatationIdentifier",
							"order": "34",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"fill": "RowQuatationIdentifierUrlText",
							"header": "RowQuatationIdentifierUrlText",
							"order": "35",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"fill": "RowAgreementIdentifier",
							"header": "RowAgreementIdentifier",
							"order": "36",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"fill": "RowAgreementIdentifierUrlText",
							"header": "RowAgreementIdentifierUrlText",
							"order": "37",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"type": "A",
							"from_static": "\n",
							"fill": "RowAccountDimensionText",
							"header": "RowAccountDimensionText",
							"order": "44",
							"segment": "finvoice_INVOICE_Row_data"
						},
						{
							"from_static": "\n",
							"fill": "SubInvoiceRow",
							"header": "SubInvoiceRow",
							"order": "64",
							"segment": "finvoice_INVOICE_Row_data"
						}
					],
					"content": [
						{
							"tag": "ArticleIdentifier",
							"content": [
								{
									"info": "2010-07-14, Article Id is given by seller, EANetc. inr_kProduct_id, pr_kEAN_Code, pr_kProduct_Code?",
									"type": "A",
									"fill": "ArticleIdentifier",
									"force": "M",
									"header": "ArticleIdentifier",
									"order": "4",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "ArticleName",
							"content": [
								{
									"tag": "code",
									"content": [
										{
											"info": "2010-07-14, replace cr code PM 2020-10-26",
											"type": "Code",
											"length": "100",
											"from_static": "Manageri II -ohjelmiston vuoden 2023 ylläpito, erä 4/4 (edellinen ylläpitolasku nro 230020).",
											"define": "xml_tCodeData:=_fld ValueStr (inr_kExplanation)xml_tCodeData:=Replace string(xml_tCodeData;ksCR;\n\n\n)",
											"fill": "ArticleName",
											"force": "M",
											"header": "ArticleName",
											"order": "6",
											"segment": "finvoice_INVOICE_Row_data"
										}
									]
								}
							]
						},
						{
							"tag": "DeliveredQuantity",
							"attribute": {
								"QuantityUnitCode": "kpl∫finvoice_INVOICE_Row_data∫9∫DeliveredQuantity∫M∫Field∫0∫inr_kUnit∫∫∫∫0∫∫∫∫ƒ"
							},
							"content": [
								{
									"define": "\n\n>\n \\t",
									"header": "DeliveredQuantity",
									"order": "10",
									"segment": "finvoice_INVOICE_Row_data"
								},
								{
									"field": "ordr.delivery_amount",
									"type": "Field",
									"from_static": "1",
									"define": "inr_kDelivered_Quantity",
									"force": "M",
									"header": "DeliveredQuantity",
									"order": "11",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "OrderedQuantity",
							"attribute": {
								"QuantityUnitCode": "kpl∫finvoice_INVOICE_Row_data∫14∫OrderedQuantity∫M∫Field∫0∫inr_kUnit∫∫∫∫0∫∫∫∫ƒ"
							},
							"content": [
								{
									"define": "\n\n>\n \\t",
									"header": "OrderedQuantity",
									"order": "15",
									"segment": "finvoice_INVOICE_Row_data"
								},
								{
									"field": "ordr.order_amount",
									"type": "Field",
									"from_static": "1",
									"define": "inr_kOrder_Amount",
									"force": "M",
									"header": "OrderedQuantity",
									"order": "16",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "UnitPriceAmount",
							"attribute": {
								"AmountCurrencyIdentifier": "EUR∫finvoice_INVOICE_Row_data∫22∫UnitPriceAmount∫M∫Field∫0∫in_kCurrency_ID∫∫∫∫0∫∫∫∫ƒ"
							},
							"content": [
								{
									"define": "\n\n>\n \\t",
									"header": "UnitPriceAmount",
									"order": "23",
									"segment": "finvoice_INVOICE_Row_data"
								},
								{
									"field": "ordr.unit_price",
									"type": "Field",
									"format": "########0.00",
									"from_static": "242,52",
									"define": "inr_kPrice__Unit",
									"force": "M",
									"header": "UnitPriceAmount",
									"order": "24",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowIdentifier",
							"content": [
								{
									"info": "Identifier given by buyer when the original order was done. In interest invoice or credit note relates to the original invoice. or: inr_kCustomer_Row_Number ?",
									"field": "ordr.dispatch_note_id",
									"type": "Field",
									"define": "inr_kDispatch_Note",
									"fill": "RowIdentifier",
									"force": "M",
									"header": "RowIdentifier",
									"order": "26",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowDeliveryDate",
							"attribute": {
								"Format": "CCYYMMDD"
							},
							"content": [
								{
									"field": "ordr.actual_delivery_date",
									"type": "Field",
									"format": "YYYYMMDD",
									"from_static": "20231205",
									"define": "inr_kDelivery_Date",
									"force": "M",
									"header": "RowDeliveryDate",
									"order": "32",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowDeliveryDetails",
							"content": [
								{
									"tag": "RowWaybillIdentifier",
									"content": [
										{
											"type": "A",
											"fill": "RowWaybillIdentifier",
											"force": "M",
											"header": "RowWaybillIdentifier",
											"order": "39",
											"segment": "finvoice_INVOICE_Row_data"
										}
									]
								}
							]
						},
						{
							"tag": "code",
							"content": [
								{
									"info": "_sel RELATE_ONE (soc_kSales_Order_Code_ID ;inr_kSales_Order_Code_id )_sel RELATE_ONE (ac_kAccount_ID ;soc_kSales_Account_id )",
									"type": "Code",
									"define": "_sel RELATE_ONE (soc_kSales_Order_Code_ID ;inr_kSales_Order_Code_id )_sel RELATE_ONE (ac_kAccount_ID ;soc_kSales_Account_id )_txt:=_fld ValueStr (ac_kSend_Accounts )_txt2:=_str Parse(_txt;\n\n,\n\n;1)_txt3:=_str Parse(_txt;\n\n,\n\n;2)",
									"order": "41",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowShortProposedAccountIdentifier",
							"content": [
								{
									"type": "Variable",
									"from_static": "400",
									"define": "_txt2",
									"fill": "RowShortProposedAccountIdentifier",
									"force": "M",
									"header": "RowShortProposedAccountIdentifier",
									"order": "42",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowNormalProposedAccountIdentifier",
							"content": [
								{
									"type": "Variable",
									"from_static": "4000",
									"define": "_txt3",
									"fill": "RowNormalProposedAccountIdentifier",
									"force": "M",
									"header": "RowNormalProposedAccountIdentifier",
									"order": "43",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowFreeText",
							"content": [
								{
									"tag": "code",
									"content": [
										{
											"info": "SOP asetus: xml_tCodeData:= _fld ValueStr(inr_kExplanation)If (_fld ValueStr(inr_kDispatch_Note)#\n\n\n) xml_tCodeData:=\n\nLähetyslista: \n\n+_fld ValueStr(inr_kDispatch_Note)+\n\n /  \n\n+ksCR+xml_tCodeDataEnd if",
											"type": "Code",
											"from_static": "As. viite: Timo Ruokolainen",
											"define": "xml_tCodeData:=\n\n\n_txt:=_fld ValueStr (inr_kDispatch_Note )If (_txt#\n\n\n)  xml_tCodeData:=\n\nLähetyslista: \n\n+_fld ValueStr (inr_kDispatch_Note )End if _txt:=_fld ValueStr (inr_kSales_Order )If (_txt#\n\n\n)  _qry Fld (0;so_kSales_Order_ID ;\n\n=\n\n;-\n>\n \\t_txt;\n\n\n;kFalse )  If (_sel RecsInSel (so_kTbl )\n>\n \\t0)    _txt:=_fld ValueStr (so_kYour_Reference )    If (_txt#\n\n\n)      If (xml_tCodeData#\n\n\n)        xml_tCodeData:=xml_tCodeData+\n\n / \n\n      End if       xml_tCodeData:=xml_tCodeData+\n\nAs. viite: \n\n+_txt    End if     _txt:=_fld ValueStr (so_kCustomer_Order_Number )    If (_txt#\n\n\n)      If (xml_tCodeData#\n\n\n)        xml_tCodeData:=xml_tCodeData+\n\n / \n\n      End if       xml_tCodeData:=xml_tCodeData+\n\nAs. tilausnumero: \n\n+_txt    End if   End if End if ",
											"fill": "RowFreeText",
											"force": "M",
											"header": "RowFreeText",
											"order": "45",
											"segment": "finvoice_INVOICE_Row_data"
										}
									]
								}
							]
						},
						{
							"tag": "RowDiscountPercent",
							"content": [
								{
									"field": "ordr.discount_percent",
									"type": "Field",
									"from_static": "0",
									"define": "inr_kDiscount_Percentage",
									"fill": "RowDiscountPercent",
									"force": "M",
									"header": "RowDiscountPercent",
									"order": "46",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowVatRatePercent",
							"content": [
								{
									"field": "ordr.vat_percent",
									"type": "Field",
									"from_static": "24",
									"define": "inr_kVAT_Percentage",
									"fill": "RowVatRatePercent",
									"force": "M",
									"header": "RowVatRatePercent",
									"order": "47",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowVatCode",
							"content": [
								{
									"info": "AB, MarginaaliveroAE, Käännetty ALVE, YhteisömyyntiG, Veroton myynti ulkomaille (kolmannet maat)O, Veroton palveluS, Normaali veroprosenttiZ, Veroton tuotZEG, Vero tavaraostoista muista EU-maistaZES, Vero palveluostoista muista EU-maista",
									"field": "ordc.json_data.vat_code",
									"type": "Field",
									"length": "10",
									"define": "soc_kVAT_Code",
									"fill": "RowVatCode",
									"force": "C",
									"header": "RowVatCode",
									"order": "48",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowVatAmount",
							"attribute": {
								"AmountCurrencyIdentifier": "EUR∫finvoice_INVOICE_Row_data∫50∫RowVatAmount∫M∫Field∫0∫in_kCurrency_ID∫∫∫∫0∫∫∫∫ƒ"
							},
							"content": [
								{
									"define": "\n\n>\n \\t",
									"header": "RowVatAmount",
									"order": "51",
									"segment": "finvoice_INVOICE_Row_data"
								},
								{
									"field": "ordr.vat_price",
									"type": "Field",
									"format": "########0.00",
									"from_static": "58,20",
									"define": "inr_kVAT_Price",
									"force": "M",
									"header": "RowVatAmount",
									"order": "52",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowVatExcludedAmount",
							"attribute": {
								"AmountCurrencyIdentifier": "EUR∫finvoice_INVOICE_Row_data∫55∫RowVatExcludedAmount∫M∫Field∫0∫in_kCurrency_ID∫∫∫∫0∫∫∫∫ƒ"
							},
							"content": [
								{
									"define": "\n\n>\n \\t",
									"header": "RowVatExcludedAmount",
									"order": "56",
									"segment": "finvoice_INVOICE_Row_data"
								},
								{
									"field": "ordr.price_without_vat",
									"type": "Field",
									"format": "########0.00",
									"from_static": "242,52",
									"define": " inr_kPrice_Total ",
									"force": "M",
									"header": "RowVatExcludedAmount",
									"order": "57",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						},
						{
							"tag": "RowAmount",
							"attribute": {
								"AmountCurrencyIdentifier": "EUR∫finvoice_INVOICE_Row_data∫60∫RowAmount∫M∫Field∫0∫in_kCurrency_ID∫∫∫∫0∫∫∫∫ƒ"
							},
							"content": [
								{
									"define": "\n\n>\n \\t",
									"header": "RowAmount",
									"order": "61",
									"segment": "finvoice_INVOICE_Row_data"
								},
								{
									"field": "ordr.json_data.price_with_vat",
									"type": "Field",
									"format": "########0.00",
									"from_static": "300,72",
									"define": "inr_kTotal_Amount",
									"force": "M",
									"header": "RowAmount",
									"order": "62",
									"segment": "finvoice_INVOICE_Row_data"
								}
							]
						}
					]
				},
				{
					"tag": "code",
					"content": [
						{
							"type": "Code",
							"define": "_sel RELATE_MANY(in_kInvoice_ID;inr_kInvoice_id)_long2:=_sel RecsInSel (inr_kTbl )_ord FLD (inr_kTbl ;inr_kRow_Number ;1)_sel REC_FIRST (inr_kTbl )For (_long;1;_long2)  xml DOCUMENT_SEND (\n\nfinvoice_INVOICE_Rows\n\n)  _sel REC_NEXT (inr_kTbl )End for ",
							"force": "M",
							"header": "Code",
							"order": "1",
							"segment": "finvoice_INVOICE_Line_Items"
						}
					]
				},
				{
					"tag": "SpecificationDetails",
					"content": [
						{
							"tag": "SpecificationFreeText",
							"content": [
								{
									"type": "A",
									"fill": "SpecificationFreeText",
									"force": "M",
									"header": "SpecificationFreeText",
									"order": "2",
									"segment": "finvoice_INVOICE_SpecificationDetails"
								}
							]
						}
					]
				},
				{
					"tag": "code",
					"content": [
						{
							"type": "Code",
							"define": "If (_fld ValueStr(in_kType_)=\n<\n>\n \\tin_tFinancingInvoiceType)  _txt:=\n\nin_Finvoice_Settings\n\n  //\n<\n>\n \\tin_tFinvoiceSettingsName   _txt:=_prf_ Txt (\n\n\n;_txt)  _txt:=xml ValueGet (_txt;\n\nFactoringCompanyId\n\n)    If(_txt=\n\n\n)   _txt:=\n<\n>\n \\tmgsFIRMATUN  End if  _qry Fld(0;co_kCompany_ID;\n\n=\n\n;-\n>\n \\t_txt;\n\n\n;kFalse)Else   _txt:=\n<\n>\n \\tmgsFIRMATUN  _qry Fld(0;co_kCompany_ID;\n\n=\n\n;-\n>\n \\t_txt;\n\n\n;kFalse)End ifIf (_sel RecsInSel(co_kTbl)\n<\n=0)  _err MESSAGE(_lang Current(\n\nCompany was not found\n\n)+\n\n: \n\n+_txt;\n\nINVOICE_EpiDetails\n\n;kFalse)End if",
							"force": "M",
							"header": "Find Sellers company",
							"order": "1",
							"segment": "finvoice_INVOICE_EpiDetails"
						}
					]
				},
				{
					"tag": "EpiDetails",
					"content": [
						{
							"tag": "EpiIdentificationDetails",
							"content": [
								{
									"type": "A",
									"fill": "EpiUrl",
									"header": "EpiUrl",
									"order": "9",
									"segment": "finvoice_INVOICE_EpiDetails"
								},
								{
									"type": "A",
									"from_static": "\n",
									"fill": "EpiOrderInfo",
									"header": "EpiOrderInfo",
									"order": "11",
									"segment": "finvoice_INVOICE_EpiDetails"
								}
							],
							"content": [
								{
									"tag": "EpiDate",
									"attribute": {
										"Format": "CCYYMMDD"
									},
									"content": [
										{
											"type": "Variable",
											"format": "YYYYMMDD",
											"from_static": "20240427",
											"define": "_date",
											"force": "M",
											"header": "EpiDate",
											"order": "6",
											"segment": "finvoice_INVOICE_EpiDetails"
										}
									],
									"content": [
										{
											"tag": "code",
											"content": [
												{
													"type": "Code",
													"define": "_date:=_date Current(kTrue)",
													"force": "M",
													"header": "EpiDate",
													"order": "5",
													"segment": "finvoice_INVOICE_EpiDetails"
												}
											]
										}
									]
								},
								{
									"tag": "EpiReference",
									"content": [
										{
											"field": "ord.json_data.bank_reference_number",
											"type": "Field",
											"from_static": "23003508133",
											"define": "in_kReference_Number",
											"fill": "EpiReference",
											"force": "M",
											"header": "EpiReference",
											"order": "8",
											"segment": "finvoice_INVOICE_EpiDetails"
										}
									]
								},
								{
									"tag": "EpiEmail",
									"content": [
										{
											"field": "co.email",
											"type": "Field",
											"define": "co_keMail",
											"fill": "EpiEmail",
											"force": "M",
											"header": "EpiEmail",
											"order": "10",
											"segment": "finvoice_INVOICE_EpiDetails"
										}
									]
								}
							]
						},
						{
							"tag": "EpiPartyDetails",
							"content": [
								{
									"define": "\n<\n/EpiBeneficiaryPartyDetails\n>\n \\t",
									"force": "M",
									"order": "25",
									"segment": "finvoice_INVOICE_EpiDetails"
								}
							],
							"content": [
								{
									"tag": "EpiBfiPartyDetails",
									"content": [
										{
											"tag": "EpiBfiIdentifier",
											"attribute": {
												"IdentificationSchemeName": "BIC"
											},
											"content": [
												{
													"field": "co.json_data.intermediator",
													"type": "Field",
													"from_static": "OKOYFIHH",
													"define": "co_kSWIFT_Code",
													"force": "M",
													"header": "EpiBfiIdentifier",
													"order": "16",
													"segment": "finvoice_INVOICE_EpiDetails"
												}
											]
										}
									]
								},
								{
									"tag": "EpiBeneficiaryPartyDetails",
									"content": [
										{
											"tag": "EpiNameAddressDetails",
											"content": [
												{
													"field": "co.name",
													"type": "Field",
													"from_static": "Manage Applications Ky",
													"define": "co_kName",
													"fill": "EpiNameAddressDetails",
													"force": "M",
													"header": "EpiNameAddressDetails",
													"order": "20",
													"segment": "finvoice_INVOICE_EpiDetails"
												}
											]
										},
										{
											"tag": "EpiBei",
											"content": [
												{
													"field": "co.json_data.trade_registry_number",
													"type": "Field",
													"from_static": "0849338-0",
													"define": "co_kTrade_Registry_Number",
													"fill": "EpiBei",
													"force": "M",
													"header": "EpiBei",
													"order": "21",
													"segment": "finvoice_INVOICE_EpiDetails"
												}
											]
										},
										{
											"tag": "EpiAccountID",
											"attribute": {
												"IdentificationSchemeName": "IBAN"
											},
											"content": [
												{
													"field": "co.json_data.bank_account",
													"type": "Field",
													"from_static": "FI9352900220303935",
													"define": "co_kBank_Account",
													"force": "M",
													"header": "EpiAccountID",
													"order": "23",
													"segment": "finvoice_INVOICE_EpiDetails"
												}
											]
										}
									]
								}
							]
						},
						{
							"tag": "EpiPaymentInstructionDetails",
							"content": [
								{
									"type": "A",
									"fill": "EpiPaymentInstructionId",
									"header": "EpiPaymentInstructionId",
									"order": "28",
									"segment": "finvoice_INVOICE_EpiDetails"
								},
								{
									"type": "A",
									"fill": "EpiTransactionTypeCode",
									"header": "EpiTransactionTypeCode",
									"order": "29",
									"segment": "finvoice_INVOICE_EpiDetails"
								},
								{
									"type": "A",
									"fill": "EpiInstructionCode",
									"header": "EpiInstructionCode",
									"order": "30",
									"segment": "finvoice_INVOICE_EpiDetails"
								}
							],
							"content": [
								{
									"tag": "EpiRemittanceInfoIdentifier",
									"attribute": {
										"IdentificationSchemeName": "SPY"
									},
									"content": [
										{
											"field": "ord.json_data.bank_reference_number",
											"type": "Field",
											"from_static": "23003508133",
											"define": "in_kReference_Number",
											"force": "M",
											"header": "EpiRemittanceInfoIdentifier",
											"order": "32",
											"segment": "finvoice_INVOICE_EpiDetails"
										}
									]
								},
								{
									"tag": "EpiInstructedAmount",
									"attribute": {
										"AmountCurrencyIdentifier": "EUR∫finvoice_INVOICE_EpiDetails∫35∫EpiInstructedAmount∫M∫Field∫0∫in_kCurrency_ID∫∫∫∫0∫∫∫∫ƒ"
									},
									"content": [
										{
											"field": "ord.price_with_vat",
											"type": "Field",
											"format": "########0.00",
											"from_static": "601,45",
											"define": "in_kTotal_Amount",
											"force": "M",
											"header": "EpiInstructedAmount",
											"order": "37",
											"segment": "finvoice_INVOICE_EpiDetails"
										}
									]
								},
								{
									"tag": "EpiCharge",
									"attribute": {
										"ChargeOption": "SHA"
									},
									"content": [
										{
											"error": "  text does not contain separator1: 'SHA'"
										}
									]
								},
								{
									"tag": "EpiDateOptionDate",
									"attribute": {
										"Format": "CCYYMMDD"
									},
									"content": [
										{
											"field": "ord.due_date",
											"type": "Field",
											"format": "YYYYMMDD",
											"from_static": "20231212",
											"define": "in_kDue_Date",
											"force": "M",
											"header": "EpiDateOptionDate",
											"order": "41",
											"segment": "finvoice_INVOICE_EpiDetails"
										}
									]
								}
							]
						}
					]
				}
			]
		}
	],
	"soap": [
		{
			"tag": "SOAP-ENV:Envelope",
			"attribute": {
				"xmlns:SOAP-ENV": "http://schemas.xmlsoap.org/soap/envelope/",
				"xmlns:eb": "http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd",
				"xmlns:xlink": "http://www.w3.org/1999/xlink"
			},
			"content": [
				{
					"tag": "SOAP-ENV:Header",
					"content": [
						{
							"tag": "eb:MessageHeader",
							"attribute": {
								"SOAP-ENV:mustUnderstand": "1",
								"eb:id": "20030222133003285",
								"xmlns:eb": "http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd"
							},
							"content": [
								{
									"tag": "eb:From",
									"content": [
										{
											"tag": "eb:PartyId",
											"content": [
												{
													"tag": "code",
													"content": [
														{
															"type": "Code",
															"from_static": "FI9352900220303935",
															"define": "in_tSellerAccountIDXml:=_prf_ Txt (\n\n\n;\n\nin_Finvoice_Settings\n\n)  // \n<\n>\n \\tin_tFinvoiceSettingsName  xml_tCodeData:=xml ValueGet (in_tSellerAccountIDXml;\n\nInvoiceRecipientAddress\n\n)",
															"fill": "eb:PartyId",
															"force": "M",
															"header": "eb:PartyId",
															"order": "5",
															"segment": "finvoice_INVOICE_Frame_data"
														}
													]
												}
											]
										},
										{
											"tag": "eb:Role",
											"content": [
												{
													"type": "A",
													"from_static": "Sender",
													"define": "Sender",
													"fill": "eb:Role",
													"force": "M",
													"header": "eb:Role",
													"order": "6",
													"segment": "finvoice_INVOICE_Frame_data"
												}
											]
										}
									]
								},
								{
									"tag": "eb:From",
									"content": [
										{
											"tag": "eb:PartyId",
											"content": [
												{
													"tag": "code",
													"content": [
														{
															"type": "Code",
															"from_static": "OKOYFIHH",
															"define": "in_tSellerAccountIDXml:=_prf_ Txt (\n\n\n;\n\nin_Finvoice_Settings\n\n)  // \n<\n>\n \\tin_tFinvoiceSettingsName  xml_tCodeData:=xml ValueGet (in_tSellerAccountIDXml;\n\nSellerBic\n\n)",
															"fill": "eb:PartyId",
															"force": "M",
															"header": "eb:PartyId",
															"order": "9",
															"segment": "finvoice_INVOICE_Frame_data"
														}
													]
												}
											]
										},
										{
											"tag": "eb:Role",
											"content": [
												{
													"type": "A",
													"from_static": "Intermediator",
													"define": "Intermediator",
													"fill": "eb:Role",
													"force": "M",
													"header": "eb:Role",
													"order": "10",
													"segment": "finvoice_INVOICE_Frame_data"
												}
											]
										}
									]
								},
								{
									"tag": "code",
									"content": [
										{
											"type": "Code",
											"define": "_txt:=_fld ValueStr(in_kCompany_id)_qry Fld(0;co_kCompany_ID;\n\n=\n\n;-\n>\n \\t_txt;\n\n\n;kFalse)",
											"force": "M",
											"header": "Find Receivers company",
											"order": "12",
											"segment": "finvoice_INVOICE_Frame_data"
										}
									]
								},
								{
									"tag": "eb:To",
									"content": [
										{
											"tag": "eb:PartyId",
											"content": [
												{
													"field": "co.json_data.electronic_invoice_address",
													"type": "Field",
													"from_static": "003717980076",
													"define": "co_kElectronic_Invoice_Address",
													"fill": "eb:PartyId",
													"force": "M",
													"header": "eb:PartyId",
													"order": "14",
													"segment": "finvoice_INVOICE_Frame_data"
												}
											]
										},
										{
											"tag": "eb:Role",
											"content": [
												{
													"type": "A",
													"from_static": "Receiver",
													"define": "Receiver",
													"fill": "eb:Role",
													"force": "M",
													"header": "eb:Role",
													"order": "15",
													"segment": "finvoice_INVOICE_Frame_data"
												}
											]
										}
									]
								},
								{
									"tag": "eb:To",
									"content": [
										{
											"tag": "eb:PartyId",
											"content": [
												{
													"field": "co.json_data.intermediator",
													"type": "Field",
													"from_static": "POPFFI22",
													"define": "co_kSWIFT_Code",
													"fill": "eb:PartyId",
													"force": "M",
													"header": "eb:PartyId",
													"order": "18",
													"segment": "finvoice_INVOICE_Frame_data"
												}
											]
										},
										{
											"tag": "eb:Role",
											"content": [
												{
													"type": "A",
													"from_static": "Intermediator",
													"define": "Intermediator",
													"fill": "eb:Role",
													"force": "M",
													"header": "eb:Role",
													"order": "19",
													"segment": "finvoice_INVOICE_Frame_data"
												}
											]
										}
									]
								},
								{
									"tag": "eb:CPAId",
									"content": [
										{
											"type": "A",
											"from_static": "yoursandmycpa",
											"define": "yoursandmycpa",
											"fill": "eb:CPAId",
											"force": "M",
											"header": "eb:CPAId",
											"order": "21",
											"segment": "finvoice_INVOICE_Frame_data"
										}
									]
								},
								{
									"tag": "eb:ConversationId",
									"content": [
										{
											"type": "A",
											"from_static": "nnnnn",
											"define": "nnnnn",
											"fill": "eb:ConversationId",
											"force": "M",
											"header": "eb:ConversationId",
											"order": "22",
											"segment": "finvoice_INVOICE_Frame_data"
										}
									]
								},
								{
									"tag": "eb:Service",
									"content": [
										{
											"type": "A",
											"from_static": "Routing",
											"define": "Routing",
											"fill": "eb:Service",
											"force": "M",
											"header": "eb:Service",
											"order": "23",
											"segment": "finvoice_INVOICE_Frame_data"
										}
									]
								},
								{
									"tag": "eb:Action",
									"content": [
										{
											"type": "A",
											"from_static": "ProcessInvoice",
											"define": "ProcessInvoice",
											"fill": "eb:Action",
											"force": "M",
											"header": "eb:Action",
											"order": "24",
											"segment": "finvoice_INVOICE_Frame_data"
										}
									]
								},
								{
									"tag": "eb:MessageData",
									"content": [
										{
											"tag": "eb:MessageId",
											"content": [
												{
													"field": "ord.order_id",
													"type": "Field",
													"from_static": "230035",
													"define": "in_kInvoice_ID",
													"fill": "eb:MessageId",
													"force": "M",
													"header": "eb:MessageId",
													"order": "26",
													"segment": "finvoice_INVOICE_Frame_data"
												}
											]
										},
										{
											"tag": "eb:Timestamp",
											"content": [
												{
													"info": "T",
													"type": "A",
													"from_static": "T",
													"define": "T",
													"force": "M",
													"header": "eb:Timestamp",
													"order": "29",
													"segment": "finvoice_INVOICE_Frame_data"
												},
												{
													"info": "aikavyöhyke",
													"type": "A",
													"from_static": "\n+02",
													"define": "+02",
													"force": "M",
													"header": "eb:Timestamp",
													"order": "31",
													"segment": "finvoice_INVOICE_Frame_data"
												}
											],
											"content": [
												{
													"tag": "code",
													"content": [
														{
															"info": "päivämäärä eroteltuna viivalla",
															"type": "Code",
															"from_static": "2024-04-27",
															"define": "_txt:=_date ToString (_date Current (kTrue ))_txt:=Replace string(_txt;\n\n.\n\n;\n\n-\n\n)xml_tCodeData:=_txt",
															"force": "M",
															"header": "eb:Timestamp",
															"order": "28",
															"segment": "finvoice_INVOICE_Frame_data"
														}
													]
												},
												{
													"tag": "code",
													"content": [
														{
															"info": "aika",
															"type": "Code",
															"from_static": "17:43:00",
															"define": "_txt2:=_time ToString (_time Current (kTrue ))xml_tCodeData:=_txt2",
															"force": "M",
															"header": "eb:Timestamp",
															"order": "30",
															"segment": "finvoice_INVOICE_Frame_data"
														}
													]
												}
											]
										},
										{
											"tag": "eb:RefToMessageId"
										}
									]
								}
							]
						}
					]
				},
				{
					"tag": "SOAP-ENV:Body",
					"content": [
						{
							"tag": "eb:Manifest",
							"attribute": {
								"eb:id": "Manifest",
								"eb:version": "2.0"
							},
							"content": [
								{
									"tag": "eb:Reference",
									"attribute": {
										"eb:id": "Finvoice",
										"xlink:href": "230035∫finvoice_INVOICE_Frame_data∫40∫eb:Reference∫M∫Field∫0∫in_kInvoice_ID∫∫∫∫0∫∫∫∫ƒ"
									},
									"content": [
										{
											"tag": "eb:schema",
											"attribute": {
												"eb:location": "http://www.pankkiyhdistys.fi/verkkolasku/finvoice/finvoice.xsd",
												"eb:version": "2.0"
											}
										}
									]
								}
							]
						}
					]
				}
			]
		}
	]
}
