# Customized Panes for 'SORPENLZ' Created: 2016/03/16 # PANE:Sales Order Values [PANE] DUP SORPENLZ 01004Sales Order Values 090settings\DUP_VBS_SORPEN05.XML 000000500000SORPEN050M000 0000 00000 0# [VBSCRIPT] ' This script contains functions for form and field events. ' You must not modify the name of the functions. Option Explicit Function CustomizedPane_OnLoad() Dim FormProps FormProps = "
" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "
" CustomizedPane.CodeObject.FormProperties = FormProps End Function Function CustomizedPane_OnRefresh() ' Specify the variables to be used when calling the business object dim XMLOut, XMLParam, SalesOrder, FormData CustomizedPane.CodeObject.UpdateFormValues = " " ' Populate the SalesOrder variable with the refresh value SalesOrder = CustomizedPane.CodeObject.RefreshValue if SalesOrder = "" then exit function end if ' Build up the XML to be passed to the business object XMLParam = XMLParam & " " XMLParam = XMLParam & " " XMLParam = XMLParam & " " on error resume next ' Call the business object, supplying the XML and putting the result in to XMLOut XMLOut = CallBO("SORQOV",XMLParam,"auto") if err then exit function end if ' Switch on error handling on error goto 0 ' Define the variables required for extracting the information from the DOM. Dim XMLDoc, SONum, CusPO, Cust, CustName, CurrencyCode Dim OutGross, OutDiscount, OutNetM, OutFreight, OutMisc, OutNetD, OutTotal, OutTax, OutInvoice, OutMass, OutVolume Dim OrgGross, OrgDiscount, OrgNetM, OrgFreight, OrgMisc, OrgNetD, OrgTotal, OrgMass, OrgVolume Dim ToGross, ToDiscount, ToNetM, ToFreight, ToMisc, ToNetD, ToTotal, ToTax, ToInvoice, ToMass, ToVolume Dim GstValue1, GstValue2, MyNode1, MyNode2 ' Load the output from the business object in to the DOM Set XMLDoc = createobject("MSXML2.DOMDocument") XMLDoc.async = false XMLDoc.LoadXML(XMLOut) ' Populate the values for the fields SONUm = XMLDoc.SelectSingleNode("//SalesOrder").Text CusPO = XMLDoc.SelectSingleNode("//CustomerPoNumber").Text Cust = XMLDoc.SelectSingleNode("//Customer").Text CustName = XMLDoc.SelectSingleNode("//CustomerName").Text CurrencyCode= XMLDoc.SelectSingleNode("//Currency").Text OutGross = XMLDoc.SelectSingleNode("//LocalCurrency/OutstandingValues/GrossMerchValue").Text OutDiscount = XMLDoc.SelectSingleNode("//LocalCurrency/OutstandingValues/DiscMerchValue").Text OutNetM = XMLDoc.SelectSingleNode("//LocalCurrency/OutstandingValues/NetMerchValue").Text OutFreight = XMLDoc.SelectSingleNode("//LocalCurrency/OutstandingValues/NetFreightValue").Text OutMisc = XMLDoc.SelectSingleNode("//LocalCurrency/OutstandingValues/NetMiscValue").Text OutNetD = XMLDoc.SelectSingleNode("//LocalCurrency/OutstandingValues/InvoiceDisc").Text OutTotal = XMLDoc.SelectSingleNode("//LocalCurrency/OutstandingValues/NetMerchTotal").Text Set MyNode1 = XMLDoc.SelectSingleNode("//LocalCurrency/OutstandingValues/GstValue") If Not MyNode1 is Nothing Then GstValue1 = XMLDoc.SelectSingleNode("//LocalCurrency/OutstandingValues/GstValue").Text End If OutTax = XMLDoc.SelectSingleNode("//LocalCurrency/OutstandingValues/TaxValue").Text OutInvoice = XMLDoc.SelectSingleNode("//LocalCurrency/OutstandingValues/InvoiceTotal").Text OutMass = XMLDoc.SelectSingleNode("//OutstMassTotal").Text OutVolume = XMLDoc.SelectSingleNode("//OutstVolumeTotal").Text OrgGross = XMLDoc.SelectSingleNode("//LocalCurrency/OriginalValues/GrossMerchValue").Text OrgDiscount = XMLDoc.SelectSingleNode("//LocalCurrency/OriginalValues/DiscMerchValue").Text OrgNetM = XMLDoc.SelectSingleNode("//LocalCurrency/OriginalValues/NetMerchValue").Text OrgFreight = XMLDoc.SelectSingleNode("//LocalCurrency/OriginalValues/NetFreightValue").Text OrgMisc = XMLDoc.SelectSingleNode("//LocalCurrency/OriginalValues/NetMiscValue").Text OrgNetD = XMLDoc.SelectSingleNode("//LocalCurrency/OriginalValues/InvoiceDisc").Text OrgTotal = XMLDoc.SelectSingleNode("//LocalCurrency/OriginalValues/NetMerchTotal").Text OrgMass = XMLDoc.SelectSingleNode("//OrigMass").Text OrgVolume = XMLDoc.SelectSingleNode("//OrigVolume").Text ToGross = XMLDoc.SelectSingleNode("//LocalCurrency/InvoiceValues/GrossMerchValue").Text ToDiscount = XMLDoc.SelectSingleNode("//LocalCurrency/InvoiceValues/DiscMerchValue").Text ToNetM = XMLDoc.SelectSingleNode("//LocalCurrency/InvoiceValues/NetMerchValue").Text ToFreight = XMLDoc.SelectSingleNode("//LocalCurrency/InvoiceValues/NetFreightValue").Text ToMisc = XMLDoc.SelectSingleNode("//LocalCurrency/InvoiceValues/NetMiscValue").Text ToNetD = XMLDoc.SelectSingleNode("//LocalCurrency/InvoiceValues/InvoiceDisc").Text ToTotal = XMLDoc.SelectSingleNode("//LocalCurrency/InvoiceValues/NetMerchTotal").Text Set MyNode2 = XMLDoc.SelectSingleNode("//LocalCurrency/InvoiceValues/GstValue") If Not MyNode2 is Nothing Then GstValue2 = XMLDoc.SelectSingleNode("//LocalCurrency/InvoiceValues/GstValue").Text End If ToTax = XMLDoc.SelectSingleNode("//LocalCurrency/InvoiceValues/TaxValue").Text ToInvoice = XMLDoc.SelectSingleNode("//LocalCurrency/InvoiceValues/InvoiceTotal").Text ToMass = XMLDoc.SelectSingleNode("//OutstMassShip").Text ToVolume = XMLDoc.SelectSingleNode("//OutstVolumeShip").Text FormData = "
" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "
" CustomizedPane.CodeObject.UpdateFormValues = FormData End Function Function CleanData(InString) Dim newString newString = Replace(InString, "&", "&") newString = Replace(newString, """", """) newString = Replace(newString, "'", "'") newString = Replace(newString, "<", "<") newString = Replace(newString, ">", ">") CleanData = newString End Function