# Customized Panes for 'xxxxxxxx' Created: 2010/03/03 # PANE:Bank Details (inc Balances) [PANE] ADMIN ARSPENLZ 01001Bank Details (inc Balances) 090settings\ADMIN_VBS_ARSPEN01.XML 000000500000ARSPEN010M000 0000 00000 [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 & "
" CustomizedPane.CodeObject.FormProperties = FormProps End Function Function CustomizedPane_OnRefresh() ' Specify the variables to be used when calling the business (for all three times) dim XMLDoc, XMLDoc2, XMLDoc3, XMLOut, XMLOut2, XMLOut3, XMLParam, XMLParam2, XMLParam3, Bank, FormData CustomizedPane.CodeObject.UpdateFormValues = " " ' Populate the RequisitionUser variable with the refresh value Bank = CustomizedPane.CodeObject.RefreshValue if Bank = "" then exit function end if ' Build up the XML that will be supplied to the business object for the current period XMLParam = XMLParam & " " XMLParam = XMLParam & " " XMLParam = XMLParam & " " 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("CSHQ45",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 BankCode, Description, AccNum, CurrencyCode, CurrencyDesc, Telephone, Foreign, CashAccount, CashAccountDesc Dim CurrSB, CurrOD, CurrOW, CurrCB, CurrLE Dim Prev1SB, Prev1OD, Prev1OW, Prev1CB, Prev1LE Dim Prev2SB, Prev2OD, Prev2OW, Prev2CB, Prev2LE ' 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 BankCode = XMLDoc.SelectSingleNode("//Bank").Text Description = XMLDoc.SelectSingleNode("//BankDescription").Text AccNum = XMLDoc.SelectSingleNode("//AccountNumber").Text CurrencyCode = XMLDoc.SelectSingleNode("//Currency").Text CurrencyDesc = XMLDoc.SelectSingleNode("//TBLCUR_Description").Text Telephone = XMLDoc.SelectSingleNode("//Telephone").Text CashAccount = XMLDoc.SelectSingleNode("//CashLedgerAccount").Text CashAccountDesc = XMLDoc.SelectSingleNode("//GENMST_Description").Text Foreign = "Yes" If CurrencyCode = SystemVariables.CodeObject.LocalCurrency then Foreign = "No" End If If not XMLDoc.SelectSingleNode("//StatementBalance") is nothing then CurrSB = XMLDoc.SelectSingleNode("//StatementBalance").Text End if If not XMLDoc.SelectSingleNode("//OutstandingDeposits") is nothing then CurrOD = XMLDoc.SelectSingleNode("//OutstandingDeposits").Text End if If not XMLDoc.SelectSingleNode("//OutstandingWithdrawals") is nothing then CurrOW = XMLDoc.SelectSingleNode("//OutstandingWithdrawals").Text End if If not XMLDoc.SelectSingleNode("//CurrentBalance") is nothing then CurrCB = XMLDoc.SelectSingleNode("//CurrentBalance").Text End if If not XMLDoc.SelectSingleNode("//LocalEquivalent") is nothing then CurrLE = XMLDoc.SelectSingleNode("//LocalEquivalent").Text End if Set XMLDoc = Nothing Set XMLOut = Nothing ' Build up the XML that will be supplied to the business object for previous period 1 XMLParam2 = XMLParam2 & " " XMLParam2 = XMLParam2 & " " XMLParam2 = XMLParam2 & " " XMLParam2 = XMLParam2 & " " XMLParam2 = XMLParam2 & " " XMLParam2 = XMLParam2 & " " on error resume next ' Call the business object, supplying the XML and putting the result in to XMLOut2 XMLOut2 = CallBO("CSHQ45",XMLParam2,"auto") if err then exit function end if ' Switch on error handling on error goto 0 ' Load the output from the business object in to the DOM Set XMLDoc2 = createobject("MSXML2.DOMDocument") XMLDoc2.async = false XMLDoc2.LoadXML(XMLOut2) If not XMLDoc2.SelectSingleNode("//StatementBalance") is nothing then Prev1SB = XMLDoc2.SelectSingleNode("//StatementBalance").Text End if If not XMLDoc2.SelectSingleNode("//OutstandingDeposits") is nothing then Prev1OD = XMLDoc2.SelectSingleNode("//OutstandingDeposits").Text End if If not XMLDoc2.SelectSingleNode("//OutstandingWithdrawals") is nothing then Prev1OW = XMLDoc2.SelectSingleNode("//OutstandingWithdrawals").Text End if If not XMLDoc2.SelectSingleNode("//CurrentBalance") is nothing then Prev1CB = XMLDoc2.SelectSingleNode("//CurrentBalance").Text End if If not XMLDoc2.SelectSingleNode("//LocalEquivalent") is nothing then Prev1LE = XMLDoc2.SelectSingleNode("//LocalEquivalent").Text End if Set XMLDoc2 = Nothing Set XMLOut2 = Nothing ' Build up the XML that will be supplied to the business object for previous period 1 XMLParam3 = XMLParam3 & " " XMLParam3 = XMLParam3 & " " XMLParam3 = XMLParam3 & " " XMLParam3 = XMLParam3 & " " XMLParam3 = XMLParam3 & " " XMLParam3 = XMLParam3 & " " on error resume next ' Call the business object, supplying the XML and putting the result in to XMLOut3 XMLOut3 = CallBO("CSHQ45",XMLParam3,"auto") if err then exit function end if ' Switch on error handling on error goto 0 ' Load the output from the business object in to the DOM Set XMLDoc3 = createobject("MSXML2.DOMDocument") XMLDoc3.async = false XMLDoc3.LoadXML(XMLOut3) If not XMLDoc3.SelectSingleNode("//StatementBalance") is nothing then Prev2SB = XMLDoc3.SelectSingleNode("//StatementBalance").Text End if If not XMLDoc3.SelectSingleNode("//OutstandingDeposits") is nothing then Prev2OD = XMLDoc3.SelectSingleNode("//OutstandingDeposits").Text End if If not XMLDoc3.SelectSingleNode("//OutstandingWithdrawals") is nothing then Prev2OW = XMLDoc3.SelectSingleNode("//OutstandingWithdrawals").Text End if If not XMLDoc3.SelectSingleNode("//CurrentBalance") is nothing then Prev2CB = XMLDoc3.SelectSingleNode("//CurrentBalance").Text End if If not XMLDoc3.SelectSingleNode("//LocalEquivalent") is nothing then Prev2LE = XMLDoc3.SelectSingleNode("//LocalEquivalent").Text End if Set XMLDoc3 = Nothing Set XMLOut3 = Nothing 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