# Customized Panes for 'xxxxxxxx' Created: 2008/11/04
# PANE:Invoice Balances Graph
[PANE]
Phil xxxxxxxx 01000Customer Invoice Balances 010 000000500000IMP04Z001M
[VBSCRIPT]
' This script creates a graph for Customer Ageing
' -----------------------------------------------
Option Explicit
Function CustomizedPane_OnRefresh()
RefreshGraph()
end Function
Function CustomizedPane_OnLoad()
dim GraphProperties
GraphProperties = GraphProperties & ""
GraphProperties = GraphProperties & " "
GraphProperties = GraphProperties & ""
GraphProperties = GraphProperties & "" ' Panel 1
GraphProperties = GraphProperties & ""
GraphProperties = GraphProperties & ""
GraphProperties = GraphProperties & ""
GraphProperties = GraphProperties & ""
GraphProperties = GraphProperties & ""
GraphProperties = GraphProperties & ""
CustomizedPane.CodeObject.GraphProperties = GraphProperties
RefreshGraph()
End Function
' This function refreshes the contents of the graph.
function RefreshGraph()
dim XMLOut, XMLParam, Customer
Customer = CustomizedPane.CodeObject.RefreshValue
if Customer = "" then
exit function
end if
XMLParam = XMLParam & " "
XMLParam = XMLParam & " "
XMLParam = XMLParam & " "
XMLParam = XMLParam & " "
XMLParam = XMLParam & " "
XMLParam = XMLParam & " "
on error resume next
XMLOut = CallBO("ARSQRY",XMLParam,"auto")
if err then
exit function
end if
' Switch on error handling
on error goto 0
'Load the XmlOut into the DOM
Dim xmlDoc
Set xmlDoc = createobject("Msxml2.FreeThreadedDOMDocument")
xmlDoc.async = false
xmlDoc.LoadXML(Xmlout)
Dim CurrentBalance
Dim Days30
Dim Days60
Dim Days90
Set CurrentBalance = xmlDoc.DocumentElement.SelectSingleNode("//ARStatement/TotalSection/Current")
Set Days30 = xmlDoc.DocumentElement.SelectSingleNode("//ARStatement/TotalSection/Days30")
Set Days60 = xmlDoc.DocumentElement.SelectSingleNode("//ARStatement/TotalSection/Days60")
Set Days90 = xmlDoc.DocumentElement.SelectSingleNode("//ARStatement/TotalSection/Days90")
Dim FinalString
FinalString = FinalString & ""
FinalString = FinalString & ""
FinalString = FinalString & ""
FinalString = FinalString & ""
FinalString = FinalString & ""
FinalString = FinalString & ""
CustomizedPane.CodeObject.GraphData = FinalString & ""
set xmlDoc = nothing
End Function