 <widget name="Download US Foodservice Invoices" group="Inventory" category="Invoice Downloads" description="This was not completed.  It contains javascript code from somewhere and appears to be an attempt to download an invoice by simulating logging onto the website manually." type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Download Us Foodservice Invoices" modified="01-04-2018 19:54:58" modifiedby="Thnikpad3" TaskEnabled=false IsAgent=false ContainsAgentSensors=false ContainsAgentActions=false TaskInitialStartTime=12-26-2017 22:20:59:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=0 TaskMinutesBetweenExecution=0 TaskSecondsBetweenExecution=0 TaskExecuteSun=true TaskExecuteMon=true TaskExecuteTue=true TaskExecuteWed=true TaskExecuteThu=true TaskExecuteFri=true TaskExecuteSat=true TaskConditional_Expression="" TaskConditional_Expression_Description="" TaskState_Function="" TaskState_Expression_Description="" TaskWidgetParams="" TaskWindowForExecution=0>
Preferences|toolboxx=73|toolboxy=567|aspectfuncx=100|aspectfuncy=100|aspectfuncw=750|aspectfunch=450|aspectfuncLock=true|aspectfuncVisible=false|PublishFtpFilename=Download US Foodservice Invoices.html|PublishToFtpSite=false|PublishFTPAccount=0|PublishFtpDirectory=/|PublishFtpPublicDirectory=/|PublishCopyFile=false|PublishCopyFilename=|PublishIncludeAspectScript=false|PublishIncludeAspectStyleshet=false|PublishAsText=false|
^
ID=top_bar|X=0|Y=0|W=801|H=21|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<include type:widget; server:{aspecthashid}; secure:false; documentID:M2HDPGX49Sct3l6etItu5n1J; widget:Support Home; containerItemID:\\quot\\top_bar\\quot\\; params:\\quot\\\\quot\\;>
^
ID=left_bar|X=0|Y=22|W=121|H=49|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=false|AttachTop=top_bar|AttachLeft=|AlignLeft=top_bar|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<include type:widget; server:{aspecthashid}; secure:false; documentID:M2HDPGX49Sct3l6etItu5n1J; widget:Support Home; containerItemID:\\quot\\left_bar\\quot\\; params:\\quot\\startpackage=__startpackage__~~pipe~~package={@\\quot\\__package__\\quot\\}~~pipe~~menu=__menu__\\quot\\;>//crlf//
^
ID=code|X=300|Y=100|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class=\\apos\\tabdialog\\apos\\>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\\\apos\\61819\\apos\\)\\quot\\>Javascript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\\\apos\\AspectScript\\apos\\)\\quot\\>AspectScript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\\\apos\\450495\\apos\\)\\quot\\>Notes</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\\\apos\\testing\\apos\\)\\quot\\>Testing</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\\\apos\\38495\\apos\\)\\quot\\>US Foods JS</span></td>//crlf////tab//</tr>//crlf//</table>
^
ID=61819|X=300|Y=122|W=812|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Javascript|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|
^
ID=AspectScript|X=300|Y=122|W=812|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|
^
ID=450495|X=300|Y=122|W=812|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<h2>Notes</h2>//crlf//Logging into http://www.usfood.com/ brings up https://www.usfood.com/jsp/Login.jsp<br>//crlf//<br//crlf//US Foods must do a redirection.  Probably supplies a cookie then too.<br>//crlf//<br>//crlf////crlf//<h2>Page that came up when pressing back after login</h2>//crlf//https://www1.usfoods.com/order/redirect/catapult.jsp?<br>//crlf//userName=PATRICKS1\\amp\\<br>//crlf//key=1392958131000\\amp\\<br>//crlf//code=0268583P230245491311f01020062B0351072GQ986YA86082R465A0547ZM90972M572JC26653M1713e0402x4190a186R45H2703046449446D66E45Z599EZ680P491Z05X2870H081T292bY78JR280q81P38SX87HH7020283Q63572H13X78N45o414e01018ZQ982V0505275M1634F570283WL07415B562369CD563N87Y5048HR7<br>//crlf//<br>//crlf////crlf//<h2>Dell2 requests a web page from AT\\amp\\T WorldNet Services using port 2048</h2>//crlf//POST /servlet/LoginServlet <br>//crlf//HTTP/1.1Host: www.usfood.com<br>//crlf//User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:20.0) Gecko/20100101 Firefox/20.0<br>//crlf//Accept: text/html\\comma\\application/xhtml\\plus\\xml\\comma\\application/xml;q=0.9\\comma\\*/*;q=0.8<br>//crlf//Accept-Language: en-US\\comma\\en;q=0.5Accept-Enco<br>//crlf////crlf////crlf//<h2>AT\\amp\\T WorldNet Services sends data to Dell2\\apos\\s port 2048</h2>//crlf//HTTP/1.1 302 FoundDate: Fri\\comma\\ 21 Feb 2014 03:50:02 <br>//crlf//GMTServer: Microsoft-IIS/6.0X-<br>//crlf//Powered-By: ASP.NET<br>//crlf//Server: WebSphere Application Server/6.0<br>//crlf//Location: https://www1.usfoods.com/order/redirect/catapult.jsp?userName=PATRICKS1\\amp\\key=1392958440000\\amp\\code=0<br>//crlf////crlf////crlf//
^
ID=testing|X=300|Y=122|W=812|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<conditional expression:(\\quot\\__query__\\quot\\=\\quot\\getLoginPage\\quot\\)>//crlf////tab//<!include type:script; name:\\quot\\testUSFood\\quot\\; commands:\\quot\\//crlf////tab////tab//appendToLog(\\quot\\Test US Food login\\quot\\)//crlf////crlf////tab////tab////-----------------------------------------------------------------//crlf////tab////tab////get the login page//crlf////tab////tab////-----------------------------------------------------------------//crlf////tab////tab//appendToLog(\\quot\\Step 1: Getting US Food login page\\quot\\)//crlf////tab////tab//sResult=socketOpen(\\quot\\www.usfood.com\\quot\\\\comma\\80\\comma\\socket\\comma\\30000)//crlf////tab////tab//if (sResult<>\\quot\\ok\\quot\\)//crlf////tab////tab////tab//appendToLog(\\quot\\Could not open socket to www.usfood.com: \\quot\\\\plus\\sResult)//crlf////tab////tab////tab//exit//crlf////tab////tab//endif//crlf////tab////tab//socketSetRequestMethod(socket\\comma\\\\quot\\GET\\quot\\)//crlf////tab////tab//socketSetRequestHeaderValue(socket\\comma\\\\quot\\User-Agent\\quot\\\\comma\\\\quot\\Mozilla/4.0 (compatible\\plus\\\\quot\\\\plus\\char(0x3B)\\plus\\\\quot\\ MSIE 4.01\\plus\\\\quot\\\\plus\\char(0x3B)\\plus\\\\quot\\ Windows 98)\\quot\\)//crlf////tab////tab//socketSetRequestHeaderValue(socket\\comma\\\\quot\\Accept\\quot\\\\comma\\\\quot\\text/xml\\quot\\)//crlf////tab////tab//socketSetRequestHeaderValue(socket\\comma\\\\quot\\Host\\quot\\\\comma\\\\quot\\www.usfood.com\\quot\\)//crlf////tab////tab//socketSetRequestURI(socket\\comma\\\\quot\\/jsp/Login.jsp\\quot\\)//crlf////tab////tab//socketSetRequestHttpVersion(socket\\comma\\\\quot\\HTTP/1.1\\quot\\)//crlf////tab////tab//socketSendRequest(socket)//crlf////tab////tab//socketGetResponse(socket)//crlf////crlf////tab////tab//sResponse=socketGetResponseCodeText(socket)//crlf////tab////tab//appendToLog(\\quot\\Response=\\quot\\\\plus\\sResponse)//crlf////crlf////tab////tab//sContent=socketGetResponseContent(socket)//crlf////tab////tab//arHeaders=socketGetResponseHeaders(socket)//crlf////tab////tab//appendToLog(\\quot\\got \\quot\\\\plus\\getElementCount(arHeaders\\comma\\\\quot\\~~pipe~~\\quot\\)\\plus\\\\quot\\ headers and \\quot\\\\plus\\len(sContent)\\plus\\\\quot\\ bytes\\quot\\)//crlf////tab////tab//s=replaceSubstring(arHeaders\\comma\\\\quot\\~~pipe~~\\quot\\\\comma\\char(13)\\plus\\char(10))//crlf////tab////tab//s=s \\plus\\ char(13)\\plus\\char(10)\\plus\\char(13)\\plus\\char(10)//crlf////tab////tab//s=s \\plus\\ replaceSubstring(sContent\\comma\\getToken(\\quot\\br\\quot\\)\\comma\\getToken(\\quot\\br\\quot\\)\\plus\\char(13)\\plus\\char(10))//crlf////tab////tab//fileWriteContent(getToken(\\quot\\temporary_files\\quot\\)\\plus\\\\quot\\USFoodHomePage.html\\quot\\\\comma\\s)//crlf////crlf////tab////tab////get the cookie//crlf////tab////tab//sCookie=socketGetResponseHeaderValue(socket\\comma\\\\quot\\set-cookie\\quot\\)//crlf////tab////tab//appendToLog(\\quot\\Set-Cookie=\\quot\\\\plus\\sCookie)//crlf////crlf////tab////tab////-----------------------------------------------------------------//crlf////tab////tab////login//crlf////tab////tab////-----------------------------------------------------------------//crlf////tab////tab//appendToLog(\\quot\\Step 2: Logging into US Food\\quot\\)//crlf////tab////tab//sResult=SSLSocketOpen(\\quot\\www.usfood.com\\quot\\\\comma\\443\\comma\\socket2\\comma\\30000)//crlf////tab////tab//if (sResult<>\\quot\\ok\\quot\\)//crlf////tab////tab////tab//appendToLog(\\quot\\Could not open socket to www.usfood.com: \\quot\\\\plus\\sResult)//crlf////tab////tab////tab//exit//crlf////tab////tab//endif//crlf////tab////tab//socketSetRequestMethod(socket2\\comma\\\\quot\\POST\\quot\\)//crlf////tab////tab//socketSetRequestHeaderValue(socket2\\comma\\\\quot\\User-Agent\\quot\\\\comma\\\\quot\\Mozilla/4.0 (compatible\\plus\\\\quot\\\\plus\\char(0x3B)\\plus\\\\quot\\ MSIE 4.01\\plus\\\\quot\\\\plus\\char(0x3B)\\plus\\\\quot\\ Windows 98)\\quot\\)//crlf////tab////tab//socketSetRequestHeaderValue(socket2\\comma\\\\quot\\cookie\\quot\\\\comma\\sCookie)//crlf////tab////tab//socketSetRequestHeaderValue(socket2\\comma\\\\quot\\Accept\\quot\\\\comma\\\\quot\\text/xml\\quot\\)//crlf////tab////tab//socketSetRequestHeaderValue(socket2\\comma\\\\quot\\Host\\quot\\\\comma\\\\quot\\www.usfood.com\\quot\\)//crlf////tab////tab//socketSetRequestURI(socket2\\comma\\\\quot\\/servlet/LoginServlet\\quot\\)//crlf////tab////tab//socketSetRequestHttpVersion(socket2\\comma\\\\quot\\HTTP/1.1\\quot\\)//crlf////crlf////tab////tab//socketSetRequestArgumentValue(socket2\\comma\\\\quot\\loginpage\\quot\\\\comma\\\\quot\\/jsp/Login.jsp\\quot\\)//crlf////tab////tab//socketSetRequestArgumentValue(socket2\\comma\\\\quot\\browser\\quot\\\\comma\\\\quot\\Netscape\\quot\\)//crlf////tab////tab//socketSetRequestArgumentValue(socket2\\comma\\\\quot\\isIE4\\quot\\\\comma\\\\quot\\false\\quot\\)//crlf////tab////tab//socketSetRequestArgumentValue(socket2\\comma\\\\quot\\handler\\quot\\\\comma\\\\quot\\login\\quot\\)//crlf////tab////tab//socketSetRequestArgumentValue(socket2\\comma\\\\quot\\userSysInfo\\quot\\\\comma\\\\quot\\Firefox~~pipe~~20~~pipe~~Windows~~pipe~~Win32~~pipe~~1680X1050~~pipe~~Cookies:true~~pipe~~Netscape~~pipe~~5.0 (Windows)\\quot\\)//crlf////tab////tab//socketSetRequestArgumentValue(socket2\\comma\\\\quot\\ajax\\quot\\\\comma\\\\quot\\true\\quot\\)//crlf////tab////tab//socketSetRequestArgumentValue(socket2\\comma\\\\quot\\username\\quot\\\\comma\\\\quot\\Patricks1\\quot\\)//crlf////tab////tab//socketSetRequestArgumentValue(socket2\\comma\\\\quot\\password\\quot\\\\comma\\\\quot\\4972park\\quot\\)//crlf////tab////tab//socketSetRequestArgumentValue(socket2\\comma\\\\quot\\Submit\\quot\\\\comma\\\\quot\\Login\\quot\\)//crlf////crlf////tab////tab//socketSendRequest(socket2)//crlf////tab////tab//socketGetResponse(socket2)//crlf////crlf////tab////tab//sResponse=socketGetResponseCodeText(socket)//crlf////tab////tab//appendToLog(\\quot\\Response=\\quot\\\\plus\\sResponse)//crlf////crlf////tab////tab//sContent=socketGetResponseContent(socket2)//crlf////tab////tab//arHeaders=socketGetResponseHeaders(socket2)//crlf////tab////tab//appendToLog(\\quot\\got \\quot\\\\plus\\getElementCount(arHeaders\\comma\\\\quot\\~~pipe~~\\quot\\)\\plus\\\\quot\\ headers and \\quot\\\\plus\\len(sContent)\\plus\\\\quot\\ bytes\\quot\\)//crlf////tab////tab//s=replaceSubstring(arHeaders\\comma\\\\quot\\~~pipe~~\\quot\\\\comma\\char(13)\\plus\\char(10))//crlf////tab////tab//s=s \\plus\\ char(13)\\plus\\char(10)\\plus\\char(13)\\plus\\char(10)//crlf////tab////tab//s=s \\plus\\ replaceSubstring(sContent\\comma\\getToken(\\quot\\br\\quot\\)\\comma\\getToken(\\quot\\br\\quot\\)\\plus\\char(13)\\plus\\char(10))//crlf////tab////tab//fileWriteContent(getToken(\\quot\\temporary_files\\quot\\)\\plus\\\\quot\\USFoodAfterLogin.html\\quot\\\\comma\\s)//crlf////crlf////tab////tab//sRedirect=socketGetResponseHeaderValue(socket2\\comma\\\\quot\\location\\quot\\)//crlf////tab////tab//appendToLog(\\quot\\sRedirect=\\quot\\\\plus\\sRedirect)//crlf////crlf////tab////tab////-----------------------------------------------------------------//crlf////tab////tab////get the redirection page//crlf////tab////tab////-----------------------------------------------------------------//crlf////tab////tab//appendToLog(\\quot\\Step 3: Getting redirect page\\quot\\)//crlf////tab////tab//sResult=SSLSocketOpen(\\quot\\www.usfood.com\\quot\\\\comma\\443\\comma\\socket3\\comma\\30000)//crlf////tab////tab//if (sResult<>\\quot\\ok\\quot\\)//crlf////tab////tab////tab//appendToLog(\\quot\\Could not open socket to www.usfood.com: \\quot\\\\plus\\sResult)//crlf////tab////tab////tab//exit//crlf////tab////tab//endif//crlf////tab////tab//socketSetRequestMethod(socket3\\comma\\\\quot\\GET\\quot\\)//crlf////tab////tab//socketSetRequestHeaderValue(socket3\\comma\\\\quot\\User-Agent\\quot\\\\comma\\\\quot\\Mozilla/4.0 (compatible\\plus\\\\quot\\\\plus\\char(0x3B)\\plus\\\\quot\\ MSIE 4.01\\plus\\\\quot\\\\plus\\char(0x3B)\\plus\\\\quot\\ Windows 98)\\quot\\)//crlf////tab////tab//socketSetRequestHeaderValue(socket3\\comma\\\\quot\\Accept\\quot\\\\comma\\\\quot\\text/xml\\quot\\)//crlf////tab////tab//socketSetRequestHeaderValue(socket3\\comma\\\\quot\\Host\\quot\\\\comma\\\\quot\\www.usfood.com\\quot\\)//crlf////tab////tab//socketSetRequestHeaderValue(socket3\\comma\\\\quot\\cookie\\quot\\\\comma\\sCookie)//crlf////tab////tab//appendToLog(\\quot\\RequestURI=\\quot\\\\plus\\getURLPath(sRedirect))//crlf////tab////tab//socketSetRequestURI(socket3\\comma\\getURLPath(sRedirect))//crlf////tab////tab//socketSetRequestHttpVersion(socket3\\comma\\\\quot\\HTTP/1.1\\quot\\)//crlf////tab////tab//socketSendRequest(socket3)//crlf////tab////tab//socketGetResponse(socket3)//crlf////crlf////tab////tab//sResponse=socketGetResponseCodeText(socket)//crlf////tab////tab//appendToLog(\\quot\\Response=\\quot\\\\plus\\sResponse)//crlf////crlf////tab////tab//sContent=socketGetResponseContent(socket3)//crlf////tab////tab//arHeaders=socketGetResponseHeaders(socket3)//crlf////tab////tab//appendToLog(\\quot\\got \\quot\\\\plus\\getElementCount(arHeaders\\comma\\\\quot\\~~pipe~~\\quot\\)\\plus\\\\quot\\ headers and \\quot\\\\plus\\len(sContent)\\plus\\\\quot\\ bytes\\quot\\)//crlf////tab////tab//s=replaceSubstring(arHeaders\\comma\\\\quot\\~~pipe~~\\quot\\\\comma\\char(13)\\plus\\char(10))//crlf////tab////tab//s=s \\plus\\ char(13)\\plus\\char(10)\\plus\\char(13)\\plus\\char(10)//crlf////tab////tab//s=s \\plus\\ replaceSubstring(sContent\\comma\\getToken(\\quot\\br\\quot\\)\\comma\\getToken(\\quot\\br\\quot\\)\\plus\\char(13)\\plus\\char(10))//crlf////tab////tab//fileWriteContent(getToken(\\quot\\temporary_files\\quot\\)\\plus\\\\quot\\USFoodRedirect.html\\quot\\\\comma\\s)//crlf////tab//\\quot\\>//crlf//</conditional>
^
ID=38495|X=300|Y=122|W=812|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=text|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<script language=\\quot\\JavaScript\\quot\\>//crlf////crlf//var supportsAjax=false;//crlf//var newWindow=null;//crlf////tab////crlf//function openPasswordReset() {//crlf////tab//if( newWindow ) {//crlf////tab////tab//newWindow.close();//crlf////tab//}//crlf////tab////crlf////tab//newWindow=window.open(\\quot\\/user/forgotMyPassword.go\\quot\\\\comma\\\\apos\\info\\apos\\\\comma\\\\apos\\scrollbars=no\\comma\\status=no\\comma\\width=820\\comma\\height=450\\apos\\);//crlf////tab//newWindow.rootWindow=this;//crlf//}//crlf////tab////crlf//function testAjax() {//crlf////tab//ajaxTester.test( function(data) {ajaxCallback(data);});//crlf//}//crlf////crlf////crlf//function ajaxCallback( data ) {//crlf////tab//supportsAjax=true;//crlf////tab//document.form.ajax.value=\\apos\\true\\apos\\;//crlf//}//crlf////crlf////crlf////crlf//var alreadyFocused=false;//crlf////crlf//function openWin(url) {//crlf////tab//var win=window.open(url \\comma\\\\apos\\info\\apos\\\\comma\\\\apos\\scrollbars=no\\comma\\status=no\\comma\\width=740\\comma\\height=425\\apos\\);   //crlf//}//crlf////crlf//function openBigWin(url) {//crlf////tab//var win=window.open(url \\comma\\\\apos\\brands\\apos\\\\comma\\\\apos\\scrollbars=yes\\comma\\resizable=yes\\comma\\width=980\\comma\\height=720\\apos\\);//crlf//}//crlf////crlf//function updateNav()//crlf//{//crlf////tab//window.status=\\quot\\Please Enter Your Login Information\\quot\\;//crlf//    if (parent.location.href !=location.href) {//crlf//        parent.location.replace(\\quot\\Login.jsp\\quot\\)//crlf//    }//crlf//    //crlf////tab//if(shouldFocus()) {//crlf//    document.form.username.focus();//crlf////tab//}//crlf////crlf////tab//// now to test to see if they are using IE 4.0.  Array.push is not implemented in ie 4.0//crlf////tab//var testArray=new Array();//crlf////tab//if( testArray.push ) {//crlf////tab////tab//document.form.isIE4.value=\\quot\\false\\quot\\;//crlf////tab//}//crlf////tab//testAjax();//crlf//}//crlf////crlf//function shouldFocus() {//crlf//    return !alreadyFocused;//crlf//}//crlf////crlf//function amFocused() {//crlf//    alreadyFocused=true;//crlf//}//crlf////crlf//function submitLogin()//crlf//{//crlf////tab//var newWindow=window.open(\\quot\\\\quot\\\\comma\\ \\quot\\SepWindow\\quot\\\\comma\\ \\apos\\height=600\\comma\\width=800\\apos\\);//crlf////tab//document.form.target=newWindow;//crlf////tab//document.form.submit();//crlf//}//crlf////crlf//function openPage(url)//crlf//{//tab////crlf////tab//var httpTest=url.substring(0\\comma\\4);//crlf////tab//if ((httpTest==\\quot\\http\\quot\\) ~~pipe~~~~pipe~~ (httpTest==\\quot\\HTTP\\quot\\)){//crlf////tab////tab//loc=url;//crlf////tab////tab//location=loc;//crlf////tab//}//crlf////tab//else {//tab////tab////crlf////tab////tab//var loc=\\quot\\/jsp/GenericContentFrameSetLogin.jsp?mainPage=\\quot\\\\plus\\url\\plus\\\\quot\\\\amp\\amp;returnPage=Login.jsp\\quot\\;//crlf//    //tab//location=loc;//crlf////tab//}//crlf//}//crlf////crlf//function openSecurePage(url)//crlf//{//crlf//   var loc=\\quot\\https://www.usfood.com/jsp/GenericContentFrameSetLogin.jsp?mainPage=\\quot\\\\plus\\url\\plus\\\\quot\\\\amp\\amp;returnPage=Login.jsp\\quot\\;//crlf//   location=loc;//crlf//}//crlf////crlf//function openNonSecurePage(url)//crlf//{//crlf//   var loc=\\quot\\http://www.usfood.com/jsp/GenericContentFrameSetLogin.jsp?mainPage=\\quot\\\\plus\\url\\plus\\\\quot\\\\amp\\amp;returnPage=Login.jsp\\quot\\;//crlf//   location=loc;//crlf//}//crlf////crlf////crlf//function openFullPage(url)//crlf//{//crlf////tab//location.replace(url);//crlf//}//crlf////crlf//function openWindow(url)//crlf//{//crlf////tab//var loc=\\quot\\/jsp/GenericContentFrameSetLogin.jsp?\\quot\\ \\plus\\ url;//crlf//    location=loc;//crlf//}//crlf////crlf////crlf//var winObj=null;//crlf////crlf//function openBottomPage(url) {//crlf////tab//if ( document.form.browser.value !=\\quot\\Netscape\\quot\\ )//crlf////tab//{//crlf////tab////tab//if(winObj){//crlf////tab////tab////tab//winObj.close();//crlf////tab////tab////tab//winObj=null;//crlf////tab////tab//}//crlf////tab//}//crlf////tab////crlf////tab//if ((url.search(\\quot\\Terms\\quot\\) !=-1) ~~pipe~~~~pipe~~ (url.search(\\quot\\CustomerPolicy\\quot\\) !=-1)) {//crlf////tab////tab//winObj=window.open(url \\plus\\ \\quot\\?Close\\quot\\ \\plus\\ \\quot\\\\amp\\amp;ref=www.usfood.com\\quot\\\\comma\\\\apos\\info\\apos\\\\comma\\\\apos\\scrollbars=yes\\comma\\status=no\\comma\\width=680\\comma\\height=620\\apos\\);//crlf////tab//}else//crlf////tab//{//crlf////tab////tab//if(url.search(\\quot\\Terms\\quot\\)==-1) {//crlf////tab////tab//winObj=window.open(url \\plus\\ \\quot\\?Close\\quot\\ \\plus\\ \\quot\\\\amp\\amp;ref=www.usfood.com\\quot\\\\comma\\\\apos\\info\\apos\\\\comma\\\\apos\\scrollbars=no\\comma\\status=no\\comma\\width=680\\comma\\height=620\\apos\\);//crlf////tab//}//crlf////tab////crlf////tab//}//crlf//}//crlf////crlf//var gatherFlag=true;//crlf////crlf//function gatherInfo(formObj)//crlf//{//crlf////tab//var testArray=new Array();//crlf////tab//var isIE=\\quot\\true\\quot\\;//crlf////tab//if( testArray.push ) {//crlf////tab////tab//isIE=\\quot\\false\\quot\\;//crlf////tab//}//crlf////tab////crlf////tab//var ajaxMessage=supportsAjax ? \\quot\\Ajax\\quot\\ : \\quot\\No Ajax\\quot\\;//crlf////crlf////tab//if( gatherFlag ) {//crlf////tab////tab//var info=BrowserDetect.browser \\plus\\ \\quot\\~~pipe~~\\quot\\ //crlf////tab////tab////tab//\\plus\\ BrowserDetect.version \\plus\\ \\quot\\~~pipe~~\\quot\\//crlf////tab////tab////tab//\\plus\\ BrowserDetect.OS \\plus\\ \\quot\\~~pipe~~\\quot\\//crlf////tab////tab////tab//\\plus\\ navigator.platform \\plus\\ \\quot\\~~pipe~~\\quot\\//crlf////tab////tab////tab//\\plus\\ screen.width \\plus\\ \\quot\\X\\quot\\ \\plus\\ screen.height \\plus\\ \\quot\\~~pipe~~\\quot\\//crlf////tab////tab////tab//\\plus\\ \\quot\\Cookies:\\quot\\ \\plus\\ navigator.cookieEnabled \\plus\\ \\quot\\~~pipe~~\\quot\\ //crlf////tab////tab////tab//\\plus\\ navigator.appName \\plus\\ \\quot\\~~pipe~~\\quot\\//crlf////tab////tab////tab//\\plus\\ navigator.appVersion;//crlf////tab////crlf////tab////tab//formObj.userSysInfo.value=info;//crlf////tab////tab//gatherFlag=false;//crlf////tab//}//crlf////crlf//}//crlf////crlf//function loginAttempt() {//crlf////tab//gatherInfo( document.form );//crlf////tab//document.form.submit();//crlf//}//crlf////crlf////crlf////crlf//</script>
^
ID=482788|X=194|Y=36|W=349|H=43|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<input type=\\quot\\button\\quot\\ value=\\quot\\Login\\quot\\ onClick=\\quot\\loadContent(\\apos\\testing\\apos\\\\comma\\\\apos\\query=getLoginPage\\apos\\)\\quot\\>//crlf////crlf//<include type:script; commands:\\quot\\//crlf////tab//s=\\quot\\https://www.usfood.com/servlet/jsp/Login.jsp\\quot\\//crlf////tab//appendToLog(\\quot\\getURLPath(\\quot\\\\plus\\s\\plus\\\\quot\\)=\\quot\\\\plus\\getURLPath(s))//crlf//\\quot\\>
</widget><widget name="Import Vendor Invoice" group="Inventory" category="Maintenance" description="Agent responsible for importing vendor invoices.  Any invoices located in the [hinedir]\invoices\ directory are imported and moved to [hinedir]\invoices\archive. [This has not been implemented yet]" type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Import Vendor Invoice" modified="11-10-2020 23:48:16" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=true ContainsAgentActions=true TaskInitialStartTime=06-16-2016 00:00:00:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=0 TaskMinutesBetweenExecution=1 TaskSecondsBetweenExecution=0 TaskExecuteSun=true TaskExecuteMon=true TaskExecuteTue=true TaskExecuteWed=true TaskExecuteThu=true TaskExecuteFri=true TaskExecuteSat=true TaskConditional_Expression="(not(isServer())) and (boolean(getToken(\\quote\\POSInterface_ImportEDIInvoices\\quote\\)))" TaskConditional_Expression_Description="" TaskState_Function="gfs(getToken(\\quote\\homedir\\quote\\)+\\quote\\invoices\*.*\\quote\\)" TaskState_Expression_Description="" TaskWidgetParams="" TaskWindowForExecution=0>
Preferences|toolboxx=34|toolboxy=176|aspectfuncx=217|aspectfuncy=100|aspectfuncw=826|aspectfunch=812|aspectfuncLock=true|aspectfuncVisible=false|PublishFtpFilename=Import Vendor Invoice.html|PublishToFtpSite=false|PublishFTPAccount=0|PublishFtpDirectory=/|PublishFtpPublicDirectory=/|PublishCopyFile=false|PublishCopyFilename=|PublishWysiwig=false|PublishIncludeAspectScript=false|PublishIncludeAspectStyleshet=false|PublishAsText=false|^
ID=top_bar|X=0|Y=0|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=left_bar|X=0|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=|AlignLeft=top_bar|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=code|X=300|Y=100|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'929609')\\quot\\>Javascript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AspectScript')\\quot\\>AspectScript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'sensor_list')\\quot\\>Sensors</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'action_list')\\quot\\>Actions</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'debug_console')\\quot\\>Console</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'914196')\\quot\\>Notes</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'37272')\\quot\\>View Electronic Invoice</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=929609|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Javascript|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AspectScript|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=sensor_list|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=Aspect_Script|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__SensorExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\cache~~backslash~~WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Import Vendor Invoice.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__sensor_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Import Vendor Invoice\\comma\\collectionEDIVendorNames\\comma\\sensor_list\\comma\\Sensor=collectionEDIVendorNames\\comma\\private\\comma\\text//crlf////tab//Import Vendor Invoice\\comma\\getInvoiceFormatID\\comma\\sensor_list\\comma\\Sensor=getInvoiceFormatID\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//collectionEDIVendorNames//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__sensor__\\quot\\=\\quot\\collectionEDIVendorNames\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__SensorDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//This is a sensor collection used by the Aspect_BackOffice_Vendor_EDI_Name_Selections//crlf////tab////tab//collection.  It provides the collection sued to select an EDI vendor in the Edit Vendor//crlf////tab////tab//dialog.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__SensorParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//None//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__SensorReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//System collection containing the collection//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__SensorExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\collectionEDIVendorNames\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//d=getSalt(4)//crlf////tab////tab////tab//driverOpen(Sensor_Collection\\comma\\d\\comma\\WRITE\\comma\\true)//crlf////crlf////tab////tab////tab//r=driverAddNewRecord(d)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Index\\quot\\\\comma\\r\\comma\\\\quot\\McLane\\quot\\)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Value\\quot\\\\comma\\r\\comma\\\\quot\\McLane\\quot\\)//crlf////crlf////tab////tab////tab//r=driverAddNewRecord(d)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Index\\quot\\\\comma\\r\\comma\\\\quot\\PFG\\quot\\)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Value\\quot\\\\comma\\r\\comma\\\\quot\\Performance Food Group\\quot\\)//crlf////crlf////tab////tab////tab//r=driverAddNewRecord(d)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Index\\quot\\\\comma\\r\\comma\\\\quot\\Sysco\\quot\\)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Value\\quot\\\\comma\\r\\comma\\\\quot\\Sysco\\quot\\)//crlf////crlf////tab////tab////tab//r=driverAddNewRecord(d)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Index\\quot\\\\comma\\r\\comma\\\\quot\\HFM\\quot\\)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Value\\quot\\\\comma\\r\\comma\\\\quot\\HFM Foodservice\\quot\\)//crlf////crlf////tab////tab////tab//r=driverAddNewRecord(d)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Index\\quot\\\\comma\\r\\comma\\\\quot\\Reinhart\\quot\\)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Value\\quot\\\\comma\\r\\comma\\\\quot\\Reinhart Foodservice\\quot\\)//crlf////crlf////tab////tab////tab//r=driverAddNewRecord(d)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Index\\quot\\\\comma\\r\\comma\\\\quot\\Gordon\\quot\\)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Value\\quot\\\\comma\\r\\comma\\\\quot\\Gordon FoodService\\quot\\)//crlf////crlf////tab////tab////tab//r=driverAddNewRecord(d)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Index\\quot\\\\comma\\r\\comma\\\\quot\\Labatt\\quot\\)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Value\\quot\\\\comma\\r\\comma\\\\quot\\Labatt FoodService\\quot\\)//crlf////crlf////tab////tab////tab//r=driverAddNewRecord(d)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Index\\quot\\\\comma\\r\\comma\\\\quot\\Curtze\\quot\\)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Value\\quot\\\\comma\\r\\comma\\\\quot\\Curtze FoodService\\quot\\)//crlf////crlf////tab////tab////tab//r=driverAddNewRecord(d)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Index\\quot\\\\comma\\r\\comma\\\\quot\\Fintech\\quot\\)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Value\\quot\\\\comma\\r\\comma\\\\quot\\Fintech\\quot\\)//crlf////crlf////tab////tab////tab//r=driverAddNewRecord(d)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Index\\quot\\\\comma\\r\\comma\\\\quot\\Hardies\\quot\\)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Value\\quot\\\\comma\\r\\comma\\\\quot\\Hardies\\quot\\)//crlf////crlf////tab////tab////tab//return(d)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//getInvoiceFormatID//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__sensor__\\quot\\=\\quot\\getInvoiceFormatID\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__SensorDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Reads the content of an invoice file to determine the vendor that produced//crlf////tab////tab//the file and returns the vendor ID.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__SensorParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Filename - Filename of the invoice file to be evaluated//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__SensorReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//A value from the Aspect_BackOffice_Invoice_Format_IDs collection or //crlf////tab////tab//Error: if the format cannot be identified//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__SensorExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\getInvoiceFormatID\\quot\\; commands:\\quot\\//crlf////tab////tab////tab////abort if filename is not defined//crlf////tab////tab////tab//if(undefined(\\quot\\__Filename__\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing filename\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////abort if file does not exist//crlf////tab////tab////tab//if(not(fileExists(\\quot\\__filename__\\quot\\)))//crlf////tab////tab////tab////tab//return(\\quot\\Error: File does not exist: __Filename__\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////read the file//crlf////tab////tab////tab//s=fileGetContent(\\quot\\__Filename__\\quot\\)//crlf////crlf////tab////tab////tab////look for curtze invoice - This has U.S.A in field 36 as the customer country//crlf////tab////tab////tab//s1=getElement(s\\comma\\0\\comma\\char(10))//crlf////tab////tab////tab//if(getElement(s1\\comma\\36\\comma\\char(0x7E))=\\quot\\U.S.A.\\quot\\)//crlf////tab////tab////tab////tab////remove any quotes in the file//crlf////tab////tab////tab////tab//if(pos(char(0x22)\\comma\\s)>=0)//crlf////tab////tab////tab////tab////tab//s=replaceSubstring(s\\comma\\char(0x22)\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab//fileWriteContent(\\quot\\__filename__\\quot\\\\comma\\s)//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//return(\\quot\\Curtze\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////look for Fintech invoice//crlf////tab////tab////tab//s1=getElement(s\\comma\\0\\comma\\char(10))//crlf////tab////tab////tab//if(pos(\\quot\\FintechProcessDate\\quot\\\\comma\\s1)>=0)//crlf////tab////tab////tab////tab//return(\\quot\\Fintech\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////look for Hardies invoice//crlf////tab////tab////tab//s1=getElement(s\\comma\\0\\comma\\char(10))//crlf////tab////tab////tab//if(startsWith(s1\\comma\\\\quot\\VendorID\\comma\\Type\\comma\\Customer\\pound\\\\comma\\RestaurantName\\comma\\Invoice\\pound\\\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Hardies\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////check for Premier Produce//crlf////tab////tab////tab//if(startsWith(trim(s)\\comma\\\\quot\\PremierProduce\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Premier\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////check for Jordano invoice//crlf////tab////tab////tab//if(getElement(s\\comma\\25)=\\quot\\Price Book Header Description\\quot\\)//crlf////tab////tab////tab////tab////remove any quotes in the file//crlf////tab////tab////tab////tab//if(pos(char(0x22)\\comma\\s)>=0)//crlf////tab////tab////tab////tab////tab//s=replaceSubstring(s\\comma\\char(0x22)\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab//fileWriteContent(\\quot\\__filename__\\quot\\\\comma\\s)//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//return(\\quot\\Jordano\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////check for HFM Invoice//crlf////tab////tab////tab//if(pos(\\quot\\HFM Foodservice\\quot\\\\comma\\s)>=0)//crlf////tab////tab////tab////tab//return(\\quot\\HFM\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////check for McLane invoice//crlf////tab////tab////tab//if(startsWith(s\\comma\\\\quot\\Mclane\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Mclane\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////check for Labatt invoice//crlf////tab////tab////tab//if(startsWith(s\\comma\\\\quot\\Labatt\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Labatt\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////check for US Foodservice invoice//crlf////tab////tab////tab//if(pos(\\quot\\USFSalesLocation\\comma\\USFSalesRep\\quot\\\\comma\\s)>=0)//crlf////tab////tab////tab////tab//return(\\quot\\USFoodservice\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////check for Sysco invoice//crlf////tab////tab////tab//if(startsWith(s\\comma\\\\quot\\CUSTNUM\\comma\\TRANSDATE\\comma\\INVNUM\\comma\\ITEMNUM\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\sysco\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////check for Sysco invoice//crlf////tab////tab////tab//if((pos(\\quot\\~~pipe~~Co Name\\quot\\\\comma\\s)>=0) and (pos(\\quot\\~~pipe~~SYSCO\\quot\\\\comma\\s)>=0))//crlf////tab////tab////tab////tab//return(\\quot\\SyscoAlt1\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////check for GFS invoice//crlf////tab////tab////tab//appendToLog(\\quot\\Checking for GFS invoice\\quot\\)//crlf////tab////tab////tab//appendToLog(\\quot\\s=\\quot\\\\plus\\left(s\\comma\\128))//crlf////tab////tab////tab//if((pos(\\quot\\~~pipe~~GFS~~pipe~~\\quot\\\\comma\\s)>=0) or (startsWith(s\\comma\\\\quot\\ISA~~pipe~~\\quot\\)))//crlf////tab////tab////tab////tab//return(\\quot\\GFS\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////check for PFG invoice//crlf////tab////tab////tab//if(startsWith(s\\comma\\\\quot\\H~~pipe~~\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\PFG\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////check for Reinhart invoice//crlf////tab////tab////tab//if(startsWith(s\\comma\\\\quot\\1~~pipe~~VendorName~~pipe~~\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Reinhart\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//return(\\quot\\Error: Unrecognized invoice format\\quot\\)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//^
ID=action_list|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=Aspect_Script|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Import Vendor Invoice.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Import Vendor Invoice\\comma\\setInvoiceEditedFlag\\comma\\action_list\\comma\\Action=setInvoiceEditedFlag\\comma\\private//crlf////tab//Import Vendor Invoice\\comma\\importInvoiceFromClipboard\\comma\\action_list\\comma\\Action=importInvoiceFromClipboard\\comma\\private//crlf////tab//Import Vendor Invoice\\comma\\importVendorInvoice\\comma\\action_list\\comma\\Action=importVendorInvoice\\comma\\private//crlf////tab//Import Vendor Invoice\\comma\\importEDIInvoices\\comma\\action_list\\comma\\Action=importEDIInvoices\\comma\\private//crlf//</conditional>//crlf////crlf//<conditional expression:false>//crlf//========================================================================//crlf//setInvoiceEditedFlag//crlf//========================================================================//crlf//</conditional>//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\setInvoiceEditedFlag\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Sets the Edited flag in an invoice record.  This action is called when the //crlf////tab////tab//edit invoice dialog is displayed.  It is used to determine if an imported//crlf////tab////tab//invoice has been opened for editing.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//StoreID - Store ID//crlf////tab////tab//InvoiceID - Invoice ID//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Ok or Error//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\setInvoiceEditedFlag\\quot\\; commands:\\quot\\//crlf////tab////tab////tab////abort if StoreID is undefined//crlf////tab////tab////tab//if(undefined(\\quot\\__StoreID__\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing StoreID\\quot\\)//crlf////tab////tab////tab//endif//crlf////tab////tab////tab////crlf////tab////tab////tab////abort if InvoiceID is undefined//crlf////tab////tab////tab//if(undefined(\\quot\\__InvoiceID__\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing InvoiceID\\quot\\)//crlf////tab////tab////tab//endif//crlf////tab////crlf////tab////tab////tab//driverOpen(Aspect_Back_Office_Invoice\\comma\\d\\comma\\WRITE\\comma\\false\\comma\\\\quot\\StoreID=__StoreID__~~pipe~~NoDepend\\quot\\)//crlf////tab////tab////tab//r=driverFindRecordAbsolute(d\\comma\\0\\comma\\\\quot\\ID=\\quot\\+quote(\\quot\\__InvoiceID__\\quot\\))//crlf////crlf////tab////tab////tab////abort if record not found//crlf////tab////tab////tab//if(r<0)//crlf////tab////tab////tab////tab//driverClose(d)//crlf////tab////tab////tab////tab//return(\\quot\\Error: Invoice not found.  ID=__InvoiceID__\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////set the edit flags//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Edit_Count\\quot\\\\comma\\r\\comma\\driverGetFieldAbsolute(d\\comma\\\\quot\\Edit_Count\\quot\\\\comma\\r)+1)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Date_Last_Edited\\quot\\\\comma\\r\\comma\\now())//crlf////tab////tab////tab//driverClose(d)//crlf////crlf////tab////tab////tab//return(\\quot\\Ok\\quot\\)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//<conditional expression:false>//crlf//========================================================================//crlf//importInvoiceFromClipboard//crlf//========================================================================//crlf//</conditional>//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\importInvoiceFromClipboard\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Imports an invoice from pasted content//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//StoreID - Store ID//crlf////tab////tab//Content - Pasted content//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Ok or Error//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\importInvoiceFromClipboard\\quot\\; commands:\\quot\\//crlf////tab////tab////tab////abort if missing StoreID//crlf////tab////tab////tab//if(undefined(\\quot\\__StoreID__\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing StoreID\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////abort if content is undefined//crlf////tab////tab////tab//if(undefined(\\quot\\__Content__\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing content\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////abort if content is empty//crlf////tab////tab////tab//sContent=trim(\\quot\\__Content__\\quot\\)//crlf////tab////tab////tab//if(len(scontent)=0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: Content is empty\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////de-tokenize content//crlf////tab////tab////tab//sContent=replaceSubstring(sContent\\comma\\\\quot\\*\\quot\\+\\quot\\_l_\\quot\\+\\quot\\*\\quot\\\\comma\\char(0x3C))//crlf////tab////tab////tab//sContent=replaceSubstring(sContent\\comma\\\\quot\\*\\quot\\+\\quot\\_g_\\quot\\+\\quot\\*\\quot\\\\comma\\char(0x3E))//crlf////tab////tab////tab//sContent=replaceSubstring(sContent\\comma\\\\quot\\*\\quot\\+\\quot\\_s_\\quot\\+\\quot\\*\\quot\\\\comma\\char(0x3B))//crlf////tab////tab////tab//sContent=replaceSubstring(sContent\\comma\\\\quot\\*\\quot\\+\\quot\\_q_\\quot\\+\\quot\\*\\quot\\\\comma\\char(0x22))//crlf////tab////tab////tab//sContent=replaceSubstring(sContent\\comma\\\\quot\\*\\quot\\+\\quot\\_cr_\\quot\\+\\quot\\*\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab//sContent=replaceSubstring(sContent\\comma\\\\quot\\*\\quot\\+\\quot\\_lf_\\quot\\+\\quot\\*\\quot\\\\comma\\char(13)+char(10))//crlf////tab////tab////tab//sContent=replaceSubstring(sContent\\comma\\\\quot\\*\\quot\\+\\quot\\_a_\\quot\\+\\quot\\*\\quot\\\\comma\\char(0x26))//crlf////crlf////tab////tab////tab////save the content to a temp file//crlf////tab////tab////tab//sFilename=getToken(\\quot\\temporary_files\\quot\\)+\\quot\\clipboard_invoice.$$$\\quot\\//crlf////tab////tab////tab//fileWriteContent(sFilename\\comma\\sContent)//crlf////crlf////tab////tab////tab//sParams=\\quot\\StoreID=__StoreID__//amp//Filename=\\quot\\+sFilename//crlf////tab////tab////tab//s=execAgentAction(\\quot\\importVendorInvoice\\quot\\\\comma\\sParams)//crlf////tab////tab////tab//return(s)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//<conditional expression:false>//crlf//========================================================================//crlf//importVendorInvoice//crlf//========================================================================//crlf//</conditional>//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\importVendorInvoice\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Imports a vendor invoice.//crlf////crlf////tab////tab//First\\comma\\ the getInvoiceFormatID sensor is called to determine the format//crlf////tab////tab//of the invoice (Mclane\\comma\\ GFS\\comma\\ Sysco\\comma\\ etc.)//crlf////crlf////tab////tab//A hashtable of invoice numbers contained in the file is created.  An invoice//crlf////tab////tab//record is create for each invoice number.//crlf////crlf////tab////tab//If an existing invoice with the same format and invoice number is found\\comma\\ the //crlf////tab////tab//invoice is imported to that record.  Otherwise\\comma\\ a new record is created.//crlf////crlf////tab////tab//The vendor ID is determined and recorded in the invoice record by looking for //crlf////tab////tab//a previous invoice using the same format.//crlf////crlf////tab////tab//After the invoice record is located or created\\comma\\ the invoice is merged into the //crlf////tab////tab//invoice details.//crlf////crlf////tab////tab//When the merge is complete\\comma\\ collections are used to determine the inventory item //crlf////tab////tab//that is associated with each record in the invoice.  The vendor ID and vendor item code//crlf////tab////tab//are used to locate the item.  The collection used for the search uses the vendor ID //crlf////tab////tab//and vendor item code as the key and the item ID as the value.  Each of the three vendor //crlf////tab////tab//fields in the inventory item record are searched.  If an item is found\\comma\\ the item ID and //crlf////tab////tab//size are recorded in the invoice detail.  //crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//StoreID - Store ID//crlf////tab////tab//Filename - Name of the invoice file to be imported//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\importVendorInvoice\\quot\\; commands:\\quot\\//crlf////tab////tab////tab////abort if missing StoreID//crlf////tab////tab////tab//if(undefined(\\quot\\__StoreID__\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing StoreID\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////abort if missing Filename//crlf////tab////tab////tab//if(undefined(\\quot\\__Filename__\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing filename\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////abort if file does not exist//crlf////tab////tab////tab//if(not(fileExists(\\quot\\__filename__\\quot\\)))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing filename\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////get the invoice format ID//crlf////tab////tab////tab//sFormatID=getSensorValue(\\quot\\getInvoiceFormatID\\quot\\\\comma\\\\quot\\Filename=__Filename__\\quot\\)//crlf////crlf////tab////tab////tab////abort if the format is unrecognized//crlf////tab////tab////tab//if(startsWith(sFormatID\\comma\\\\quot\\Error\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Invoice format could not be determined\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////determine the driver used to open the invoice.  Abort if it is invalid.//crlf////tab////tab////tab//sInvoiceDriverID=lookup(Aspect_BackOffice_Invoice_DriverID_by_Invoice_Format_ID\\comma\\sFormatID)//crlf////tab////tab////tab//if(len(sInvoiceDriverID)=0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: Cannot determine driver for invoice format: \\quot\\+sFormatID)//crlf////tab////tab////tab//endif//crlf////tab////tab////crlf////tab////tab////tab//appendToLog(\\quot\\Invoice format: \\quot\\+sFormatID+\\quot\\ Driver: \\quot\\+sInvoiceDriverID)//crlf////crlf////tab////tab////tab////remove quotes from sysco invoice//crlf////tab////tab////tab//if(sFormatID=\\quot\\syscoalt1\\quot\\)//crlf////tab////tab////tab////tab//appendToLog(\\quot\\Removing quotes from SyscoAlt1 invoice\\quot\\)//crlf////tab////tab////tab////tab//s=fileGetContent(\\quot\\__filename__\\quot\\)//crlf////tab////tab////tab////tab//s=removeChar(s\\comma\\char(0x22))//crlf////tab////tab////tab////tab//fileWriteContent(\\quot\\__filename__\\quot\\\\comma\\s)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////clean up US foodservice invoice.  They include special codes around commas and perhaps before//crlf////tab////tab////tab////negative numbers//crlf////tab////tab////tab//if(sFormatID=\\quot\\USFoodservice\\quot\\)//crlf////tab////tab////tab////tab//appendToLog(\\quot\\Cleaning up US Foodservice invoice\\quot\\)//crlf////tab////tab////tab////tab//s=fileGetContent(\\quot\\__filename__\\quot\\)//crlf////tab////tab////tab////tab//s=replaceSubstring(s\\comma\\\\quot\\+ACI-\\quot\\\\comma\\char(0x22))//crlf////tab////tab////tab////tab//s=replaceSubstring(s\\comma\\\\quot\\+AC0-\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab//fileWriteContent(\\quot\\__filename__\\quot\\\\comma\\s)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////create a hashtable of invoice numbers and dates.  The key is the invoice number//crlf////tab////tab////tab////and the value is the date. Also get the vendor name if it's a Fintech invoice.//crlf////tab////tab////tab////This is used to assign the invoice to the vendor instead of Fintech//crlf////tab////tab////tab//hashCreate(hInvoice)//crlf////tab////tab////tab//hashCreate(hFintechVendorName)//crlf////tab////tab////tab//driverOpen(sInvoiceDriverID\\comma\\d\\comma\\READ\\comma\\false\\comma\\\\quot\\Filename=__Filename__\\quot\\)//crlf////tab////tab////tab//driverSetFilter(d\\comma\\\\quot\\(not(Imported_Quantity=0)) or (not(Imported_Extended_Price=0))\\quot\\\\comma\\true)//crlf////tab////tab////tab//c=driverGetRecordCount(d)//crlf////tab////tab////tab//n=0//crlf////tab////tab////tab//while(n<c)//crlf////tab////tab////tab////tab//sInvoiceNumber=driverGetField(d\\comma\\\\quot\\Imported_Invoice_Number\\quot\\\\comma\\n)//crlf////tab////tab////tab////tab//if(not(hashContainsKey(hInvoice\\comma\\sInvoiceNumber)))//crlf////tab////tab////tab////tab////tab//dt=driverGetField(d\\comma\\\\quot\\Imported_Invoice_Date\\quot\\\\comma\\n)//crlf////tab////tab////tab////tab////tab//hashPut(hInvoice\\comma\\sInvoiceNumber\\comma\\dt)//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//if(sFormatID=\\quot\\Fintech\\quot\\)//crlf////tab////tab////tab////tab////tab//if(not(hashContainsKey(hFintechVendorName\\comma\\sInvoiceNumber)))//crlf////tab////tab////tab////tab////tab////tab//sFintechVendorName=driverGetField(d\\comma\\\\quot\\VendorName\\quot\\\\comma\\n)//crlf////tab////tab////tab////tab////tab////tab//hashPut(hFintechVendorName\\comma\\sInvoiceNumber\\comma\\sFintechVendorName)//crlf////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//n++//crlf////tab////tab////tab//endwhile//crlf////tab////tab////tab//driverClose(d)//crlf////crlf////tab////tab////tab//cInvoicesInFile=hashSize(hInvoice)//crlf////tab////tab////tab//appendToLog(\\quot\\Found \\quot\\+cInvoicesInFile+\\quot\\ invoice to import\\quot\\)//crlf////crlf////tab////tab////tab////abort if no invoice numbers were found//crlf////tab////tab////tab//if(cInvoicesInFile=0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: No invoice numbers found in file.\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////get the checksum of the file//crlf////tab////tab////tab//sChecksum=fileGetChecksum(\\quot\\__filename__\\quot\\\\comma\\true)//crlf////crlf////tab////tab////tab////open the invoice driver//crlf////tab////tab////tab//driverOpen(Aspect_Back_Office_Invoice\\comma\\dInvoice\\comma\\WRITE\\comma\\false\\comma\\\\quot\\StoreID=__StoreID__\\quot\\)//crlf////crlf////tab////tab////tab////import each invoice in the file//crlf////tab////tab////tab//arInvoiceNumber=hashGetKeys(hInvoice)//crlf////tab////tab////tab//nInvoice=0//crlf////tab////tab////tab//while(nInvoice<cInvoicesInFile)//crlf////tab////tab////tab////tab////get the invoice number to import//crlf////tab////tab////tab////tab//Import_Invoice_Number=getElement(arInvoiceNumber\\comma\\nInvoice)//crlf////tab////tab////tab////tab//Import_Invoice_Date=hashGet(hInvoice\\comma\\Import_Invoice_Number)//crlf////crlf////tab////tab////tab////tab////Get the absolute record number of the existing invoice record if the invoice //crlf////tab////tab////tab////tab////has already been imported//crlf////tab////tab////tab////tab//bAlreadyImported=false//crlf////tab////tab////tab////tab//rInvoice=-1//crlf////tab////tab////tab////tab////sFilter=\\quot\\(Import_Format=\\quot\\+quote(sFormatID)+\\quot\\) and (Import_File_CRC=\\quot\\+quote(sChecksum)+\\quot\\)\\quot\\//crlf////tab////tab////tab////tab//sFilter=\\quot\\(Import_Format=\\quot\\+quote(sFormatID)+\\quot\\) and (Number=\\quot\\+quote(Import_Invoice_Number)+\\quot\\)\\quot\\//crlf////tab////tab////tab////tab//driverSetFilter(dInvoice\\comma\\sFilter\\comma\\false)//crlf////tab////tab////tab////tab//driverSetSort(dInvoice\\comma\\\\quot\\-Date_Entered\\quot\\\\comma\\true)//crlf////tab////tab////tab////tab//if(driverGetRecordCount(dInvoice)>0)//crlf////tab////tab////tab////tab////tab//rInvoice=driverGetAbsoluteIndex(dInvoice\\comma\\0)//crlf////tab////tab////tab////tab////tab//bAlreadyImported=true//crlf////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////add a new record if the invoice has not already been imported//crlf////tab////tab////tab////tab//bIsNewInvoice=false//crlf////tab////tab////tab////tab//if(rInvoice<0)//crlf////tab////tab////tab////tab////tab//rInvoice=driverAddNewRecord(dInvoice)//crlf////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dInvoice\\comma\\\\quot\\Number\\quot\\\\comma\\rInvoice\\comma\\Import_Invoice_Number)//crlf////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dInvoice\\comma\\\\quot\\Date_Entered\\quot\\\\comma\\rInvoice\\comma\\now())//crlf////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dInvoice\\comma\\\\quot\\Date\\quot\\\\comma\\rInvoice\\comma\\Import_Invoice_Date)//crlf////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dInvoice\\comma\\\\quot\\Is_Imported\\quot\\\\comma\\rInvoice\\comma\\true)//crlf////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dInvoice\\comma\\\\quot\\Import_Date\\quot\\\\comma\\rInvoice\\comma\\now())//crlf////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dInvoice\\comma\\\\quot\\Import_Filename\\quot\\\\comma\\rInvoice\\comma\\\\quot\\__Filename__\\quot\\)//crlf////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dInvoice\\comma\\\\quot\\Import_Format\\quot\\\\comma\\rInvoice\\comma\\sFormatID)//crlf////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dInvoice\\comma\\\\quot\\Import_File_CRC\\quot\\\\comma\\rInvoice\\comma\\sChecksum)//crlf////tab////tab////tab////tab////tab//bIsNewInvoice=true//crlf////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////update the import count and date of last import//crlf////tab////tab////tab////tab//driverPutFieldAbsolute(dInvoice\\comma\\\\quot\\Import_Count\\quot\\\\comma\\rInvoice\\comma\\driverGetFieldAbsolute(dInvoice\\comma\\\\quot\\Import_Count\\quot\\\\comma\\rInvoice)+1)//crlf////tab////tab////tab////tab//driverPutFieldAbsolute(dInvoice\\comma\\\\quot\\Date_Of_Last_Import\\quot\\\\comma\\rInvoice\\comma\\now())//crlf////crlf////tab////tab////tab////tab////Get the vendor ID from a previous invoice using the same format.  Include the same//crlf////tab////tab////tab////tab////invoice in the search if it has already been imported.  Otherwise\\comma\\ exclude it since//crlf////tab////tab////tab////tab////it will not have a valid vendor assigned to it.//crlf////tab////tab////tab////tab//sVendorID=\\quot\\\\quot\\//crlf////tab////tab////tab////tab//sFilter=\\quot\\(Import_Format=\\quot\\+quote(sFormatID)+\\quot\\)\\quot\\//crlf////tab////tab////tab////tab//if(bIsNewInvoice)//crlf////tab////tab////tab////tab// //tab//sFilter=sFilter+\\quot\\and (not(DiskIndex=\\quot\\+rInvoice+\\quot\\))\\quot\\//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//driverSetFilter(dInvoice\\comma\\sFilter\\comma\\true)//crlf////tab////tab////tab////tab//if(driverGetRecordCount(dInvoice)>0)//crlf////tab////tab////tab////tab////tab//sVendorID=driverGetField(dInvoice\\comma\\\\quot\\VendorID\\quot\\\\comma\\0)//crlf////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dInvoice\\comma\\\\quot\\VendorID\\quot\\\\comma\\rInvoice\\comma\\sVendorID)//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\importVendorInvoice: Set VendorID=\\quot\\+sVendorID)//crlf////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////if an invoice has not been imported for this format yet\\comma\\ get the vendor ID by looking //crlf////tab////tab////tab////tab////tab////up the name of the vendor.  The sFormatID comes from the getInvoiceFormatID sensor and//crlf////tab////tab////tab////tab////tab////should be the name of the vendor (e.g. McLane).  Look for a vendor name containing //crlf////tab////tab////tab////tab////tab////the text in the sFormatID.//crlf////tab////tab////tab////tab////tab//sID1=sFormatID//crlf////tab////tab////tab////tab////tab//if(sID1=\\quot\\SyscoAlt1\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//sID1=\\quot\\Sysco\\quot\\//crlf////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//sVendorID=lookup(Aspect_BackOffice_Vendor_ID_By_Name\\comma\\sID1\\comma\\3\\comma\\\\quot\\StoreID=__StoreID__\\quot\\)//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\importVendorInvoice: Looking for vendor: \\quot\\+sFormatID+\\quot\\ result=\\quot\\+sVendorID)//crlf////tab////tab////tab////tab////tab//if(len(sVendorID)>0)//crlf////tab////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dInvoice\\comma\\\\quot\\VendorID\\quot\\\\comma\\rInvoice\\comma\\sVendorID)//crlf////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////set the vendor name if its a Fintech invoice//crlf////tab////tab////tab////tab//if((sFormatID=\\quot\\Fintech\\quot\\) and (bIsNewInvoice))//crlf////tab////tab////tab////tab////tab//driverOpen(Aspect_Back_Office_Vendor\\comma\\dVendor\\comma\\WRITE\\comma\\false\\comma\\\\quot\\StoreID=__StoreID__\\quot\\)//crlf////tab////tab////tab////tab////tab//sFintechVendorName=hashGet(hFintechVendorName\\comma\\Import_Invoice_Number)//crlf////crlf////tab////tab////tab////tab////tab////look for a vendor with a matching fintech vendor name//crlf////tab////tab////tab////tab////tab//rVendor=driverFindRecordAbsolute(dVendor\\comma\\0\\comma\\\\quot\\Fintech_Vendor_Name=\\quot\\+quote(sFintechVendorName))//crlf////crlf////tab////tab////tab////tab////tab////if a match is not found\\comma\\ look at the standard vendor name//crlf////tab////tab////tab////tab////tab//if(rVendor<0)//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Did not find vendor with matching fintech vendor name\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//rVendor=driverFindRecordAbsolute(dVendor\\comma\\0\\comma\\\\quot\\Name=\\quot\\+quote(sFintechVendorName))//crlf////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Found vendor with matching fintech vendor name\\quot\\)//crlf////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////if a match is still not found\\comma\\ add the vendor//crlf////tab////tab////tab////tab////tab//if(rVendor<0)//crlf////tab////tab////tab////tab////tab////tab//rVendor=driverAddNewRecord(dVendor)//crlf////tab////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dVendor\\comma\\\\quot\\Name\\quot\\\\comma\\rVendor\\comma\\sFintechVendorName)//crlf////tab////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dVendor\\comma\\\\quot\\Fintech_Vendor_Name\\quot\\\\comma\\rVendor\\comma\\sFintechVendorName)//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Added new vendor from Fintech invoice: \\quot\\+sFintechVendorName)//crlf////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dVendor\\comma\\\\quot\\Fintech_Vendor_Name\\quot\\\\comma\\rVendor\\comma\\sFintechVendorName)//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Found existing vendor: \\quot\\+sFintechVendorName)//crlf////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab//sFintechVendorID=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\ID\\quot\\\\comma\\rVendor)//crlf////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dInvoice\\comma\\\\quot\\VendorID\\quot\\\\comma\\rInvoice\\comma\\sFintechVendorID)//crlf////tab////tab////tab////tab////tab//driverClose(dVendor)//crlf////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////get the ID of the invoice record.  This is passed to the invoice details driver//crlf////tab////tab////tab////tab//sInvoiceID=driverGetFieldAbsolute(dInvoice\\comma\\\\quot\\ID\\quot\\\\comma\\rInvoice)//crlf////crlf////tab////tab////tab////tab////get the Date Entered value for the invoice.  This is passed to the invoice details//crlf////tab////tab////tab////tab////driver as a driver param//crlf////tab////tab////tab////tab//dtDateEntered=driverGetFieldAbsolute(dInvoice\\comma\\\\quot\\Date_Entered\\quot\\\\comma\\rInvoice)//crlf////crlf////tab////tab////tab////tab////open the invoice detail driver.  The invoice ID is passed as a driver param so new //crlf////tab////tab////tab////tab////records are associated with the invoice.  A special driver is used here that //crlf////tab////tab////tab////tab////doesn't take the Invoice_ID_Is_Deleted field into account because there is a //crlf////tab////tab////tab////tab////problem initializing the invoice ID during the merge.  (also see below)//crlf////tab////tab////tab////tab//sParams=\\quot\\StoreID=__StoreID__~~pipe~~InvoiceID=\\quot\\+sInvoiceID+\\quot\\~~pipe~~Date=\\quot\\+formatDate(dtDateEntered\\comma\\\\quot\\MM-dd-yyyy\\quot\\)//crlf////tab////tab////tab////tab//appendToLog(\\quot\\Opening invoice details.  Params=\\quot\\+sParams)//crlf////tab////tab////tab////tab//driverOpen(Aspect_BackOffice_Invoice_Detail_For_Import\\comma\\dInvoiceDetail\\comma\\WRITE\\comma\\false\\comma\\sParams)//crlf////tab////tab////tab////tab//driverSetFilter(dInvoiceDetail\\comma\\\\quot\\true\\quot\\\\comma\\true)//crlf////crlf////tab////tab////tab////tab////open the invoice to be imported.  The Invoice ID is passed as a driver param so //crlf////tab////tab////tab////tab////it can be used in a calculated field in the invoice.  This calculated field is //crlf////tab////tab////tab////tab////then merged into the invoice details.  It should be possible to initialize the //crlf////tab////tab////tab////tab////invoice ID using a driver param in the in invoice detail driver\\comma\\ but the merge //crlf////tab////tab////tab////tab////routine does not seem to make the parameter available when initializing a new//crlf////tab////tab////tab////tab////record//crlf////tab////tab////tab////tab//sParams=\\quot\\Filename=__Filename__~~pipe~~InvoiceID=\\quot\\+sInvoiceID//crlf////tab////tab////tab////tab//driverOpen(sInvoiceDriverID\\comma\\d\\comma\\READ\\comma\\false\\comma\\sParams)//crlf////crlf////tab////tab////tab////tab////filter the invoice to be imported//crlf////tab////tab////tab////tab//sFilter=\\quot\\(Imported_Invoice_Number=\\quot\\+quote(Import_Invoice_Number)+\\quot\\)\\quot\\//crlf////tab////tab////tab////tab//sFilter=sFilter+\\quot\\ and ((not(Imported_Quantity=0)) or (not(Imported_Extended_Price=0)))\\quot\\//crlf////tab////tab////tab////tab//driverSetFilter(d\\comma\\sFilter\\comma\\true)//crlf////tab////tab////tab////tab//c=driverGetRecordCount(d)//crlf////tab////tab////tab////tab//appendToLog(\\quot\\Filter: \\quot\\+sFilter+\\quot\\ Records: \\quot\\+c)//crlf////tab////tab////tab////tab//appendToLog(\\quot\\Importing invoice \\quot\\+Import_Invoice_Number+\\quot\\ Records: \\quot\\+c)//crlf////crlf////tab////tab////tab////tab////record the invoice amount in the invoice record//crlf////tab////tab////tab////tab//dAmount=driverRangeSum(d\\comma\\\\quot\\Imported_Extended_Price\\quot\\\\comma\\false\\comma\\\\quot\\true\\quot\\)//crlf////tab////tab////tab////tab//driverPutFieldAbsolute(dInvoice\\comma\\\\quot\\Amount\\quot\\\\comma\\rInvoice\\comma\\dAmount)//crlf////crlf////tab////tab////tab////tab////merge the invoice to be imported//crlf////tab////tab////tab////tab//arKeyFields=\\quot\\InvoiceID~~pipe~~Imported_Item_Code~~pipe~~Imported_Line_Number\\quot\\//crlf////tab////tab////tab////tab//arFieldsToMerge=\\quot\\Imported_Line_Number~~pipe~~InvoiceID~~pipe~~Imported_Item_Name~~pipe~~Imported_Quantity\\quot\\//crlf////tab////tab////tab////tab//arFieldsToMerge=arFieldsToMerge+\\quot\\~~pipe~~Imported_Pack_Size~~pipe~~Imported_Extended_Price\\quot\\//crlf////tab////tab////tab////tab//arFieldsToMerge=arFieldsToMerge+\\quot\\~~pipe~~Quantity~~pipe~~Extended_Price~~pipe~~Tax\\quot\\//crlf////tab////tab////tab////tab//arAliasFields=\\quot\\Quantity=Imported_Quantity\\quot\\//crlf////tab////tab////tab////tab//arAliasFields=arAliasFields+\\quot\\~~pipe~~Extended_Price=Imported_Extended_Price\\quot\\//crlf////tab////tab////tab////tab//arAliasFields=arAliasFields+\\quot\\~~pipe~~Tax=Imported_Tax\\quot\\//crlf////crlf////tab////tab////tab////tab//sMergeResult=driverMerge(true\\comma\\dInvoiceDetail\\comma\\\\quot\\\\quot\\\\comma\\d\\comma\\\\quot\\\\quot\\\\comma\\arKeyFields\\comma\\arFieldsToMerge\\comma\\arAliasFields\\comma\\\\quot\\\\quot\\\\comma\\false)//crlf////tab////tab////tab////tab//appendToLog(\\quot\\Import invoice: \\quot\\+sMergeResult)//crlf////crlf////tab////tab////tab////tab////select items and sizes where possible\\comma\\ using the vendor information from the //crlf////tab////tab////tab////tab////inventory items//crlf////tab////tab////tab////tab//if(len(sVendorID)>0)//crlf////crlf////tab////tab////tab////tab////tab////filter the invoice details to those just imported//crlf////tab////tab////tab////tab////tab//driverSetFilter(dInvoiceDetail\\comma\\\\quot\\InvoiceID=\\quot\\+quote(sInvoiceID)\\comma\\true)//crlf////tab////tab////tab////tab////tab//c=driverGetRecordCount(dInvoiceDetail)//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Assigning items and sizes to \\quot\\+c+\\quot\\ invoice details.  VendorID=\\quot\\+sVendorID)//crlf////tab////tab////tab////tab////tab//n=0//crlf////tab////tab////tab////tab////tab//while(n<c)//crlf////tab////tab////tab////tab////tab////tab////get the vendor item code//crlf////tab////tab////tab////tab////tab////tab//sItemCode=driverGetField(dInvoiceDetail\\comma\\\\quot\\Imported_Item_Code\\quot\\\\comma\\n)//crlf////tab////tab////tab////tab////tab////tab////appendToLog(\\quot\\ItemCode=\\quot\\+sItemCode)//crlf////crlf////tab////tab////tab////tab////tab////tab////find the ID of the inventory item that has a matching vendor ID and item code//crlf////tab////tab////tab////tab////tab////tab////Look in vendor1\\comma\\ vendor2 and vendor3.  The key of the collection is //crlf////tab////tab////tab////tab////tab////tab////VendorID_ItemCode.  The value is the ID of the item.//crlf////tab////tab////tab////tab////tab////tab//sKey=sVendorID+\\quot\\_\\quot\\+sItemCode//crlf////tab////tab////tab////tab////tab////tab//iVendorIndex=1//crlf////tab////tab////tab////tab////tab////tab//sItemID=lookup(Aspect_BackOffice_Inventory_Item_ID_by_Vendor1_ID_and_Code\\comma\\sKey\\comma\\0\\comma\\\\quot\\StoreID=__StoreID__\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////appendToLog(\\quot\\Vendor1 ItemID=\\quot\\+sItemID)//crlf////tab////tab////tab////tab////tab////tab//if(len(sItemID)=0)//crlf////tab////tab////tab////tab////tab////tab////tab//iVendorIndex=2//crlf////tab////tab////tab////tab////tab////tab////tab//sItemID=lookup(Aspect_BackOffice_Inventory_Item_ID_by_Vendor2_ID_and_Code\\comma\\sKey\\comma\\0\\comma\\\\quot\\StoreID=__StoreID__\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////appendToLog(\\quot\\Vendor2 ItemID=\\quot\\+sItemID)//crlf////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab//if(len(sItemID)=0)//crlf////tab////tab////tab////tab////tab////tab////tab//iVendorIndex=3//crlf////tab////tab////tab////tab////tab////tab////tab//sItemID=lookup(Aspect_BackOffice_Inventory_Item_ID_by_Vendor3_ID_and_Code\\comma\\sKey\\comma\\0\\comma\\\\quot\\StoreID=__StoreID__\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////appendToLog(\\quot\\Vendor3 ItemID=\\quot\\+sItemID)//crlf////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////if an itemID was found\\comma\\ then record the item and size //crlf////tab////tab////tab////tab////tab////tab//if(len(sItemID)>0)//crlf////tab////tab////tab////tab////tab////tab////tab////record the item ID//crlf////tab////tab////tab////tab////tab////tab////tab//driverPutField(dInvoiceDetail\\comma\\\\quot\\ItemID\\quot\\\\comma\\n\\comma\\sItemID)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////lookup the size prefix for the vendor in the item.  The key is the item ID//crlf////tab////tab////tab////tab////tab////tab////tab////and the value is the size prefix for the vendor.  The collection to be used //crlf////tab////tab////tab////tab////tab////tab////tab////depends on the vendor index (1 to 3)//crlf////tab////tab////tab////tab////tab////tab////tab//sCollectionID=\\quot\\Aspect_BackOffice_Inventory_Item_Vendor\\quot\\+iVendorIndex+\\quot\\_Size_Prefix_by_ItemID\\quot\\//crlf////tab////tab////tab////tab////tab////tab////tab//dSizePrefix=lookup(sCollectionID\\comma\\sItemID\\comma\\0\\comma\\\\quot\\StoreID=__StoreID__\\quot\\)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////lookup the size unit for the vendor in the item.  The key is the item ID//crlf////tab////tab////tab////tab////tab////tab////tab////and the value is the size unit for the vendor.  The collection to be used //crlf////tab////tab////tab////tab////tab////tab////tab////depends on the vendor index (1 to 3)//crlf////tab////tab////tab////tab////tab////tab////tab//sCollectionID=\\quot\\Aspect_BackOffice_Inventory_Item_Vendor\\quot\\+iVendorIndex+\\quot\\_Size_Unit_by_ItemID\\quot\\//crlf////tab////tab////tab////tab////tab////tab////tab//sSizeUnit=lookup(sCollectionID\\comma\\sItemID\\comma\\0\\comma\\\\quot\\StoreID=__StoreID__\\quot\\)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////appendToLog(\\quot\\Size Prefix=\\quot\\+dSizePrefix+\\quot\\ SizeUnit=\\quot\\+sSizeUnit)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////if both the size prefix and unit are valid\\comma\\ record them in the invoice detail//crlf////tab////tab////tab////tab////tab////tab////tab//if((dSizePrefix<>0) and (len(sSizeUnit)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab//driverPutField(dInvoiceDetail\\comma\\\\quot\\Size_Prefix\\quot\\\\comma\\n\\comma\\dSizePrefix)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//driverPutField(dInvoiceDetail\\comma\\\\quot\\Size_Unit\\quot\\\\comma\\n\\comma\\sSizeUnit)//crlf////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab//n++//crlf////tab////tab////tab////tab////tab//endwhile//crlf////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Cannot assign items and sizes to imported invoice because vendor ID is unknown\\quot\\)//crlf////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab//driverClose(d)//crlf////tab////tab////tab////tab//driverClose(dInvoiceDetail)//crlf////tab////tab////tab////tab//nInvoice++//crlf////tab////tab////tab//endwhile//crlf////crlf////tab////tab////tab////move the file to the archive directory//crlf////tab////tab////tab//if(pos(\\quot\\archive\\quot\\\\comma\\\\quot\\__filename__\\quot\\)<0)//crlf////tab////tab////tab////tab//sArchiveFilename=fileDrive(\\quot\\__filename__\\quot\\)+fileDir(\\quot\\__filename__\\quot\\)+\\quot\\archive\\\quot\\+fileName(\\quot\\__filename__\\quot\\)+fileExt(\\quot\\__filename__\\quot\\)//crlf////tab////tab////tab////tab//fileMove(\\quot\\__filename__\\quot\\\\comma\\sArchiveFilename\\comma\\true)//crlf////tab////tab////tab////tab//appendToLog(\\quot\\Archived __filename__ to \\quot\\+sArchiveFilename)//crlf////tab////tab////tab//else//crlf////tab////tab////tab////tab//appendToLog(\\quot\\__filename__ is already archived\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//driverClose(dInvoice)//crlf////tab////tab////tab////return(\\quot\\Ok: Imported \\quot\\+cInvoicesInFile+\\quot\\ invoice\\quot\\+if(cInvoicesInFile>0\\comma\\\\quot\\s\\quot\\\\comma\\\\quot\\\\quot\\))//crlf////tab////tab////tab//return(\\quot\\ok:\\quot\\+sInvoiceID);//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//importEDIInvoices//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\importEDIInvoices\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Imports all invoices in the [homedir]invoices directory.  The store is determined //crlf////tab////tab//by the POSInterface_StoreID which is set by the POS Interface agent.  Invoices //crlf////tab////tab//are imported for the store with POS import enabled.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//none//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\importEDIInvoices\\quot\\; commands:\\quot\\//crlf////tab////tab////tab////abort if no store has pos import enabled//crlf////tab////tab////tab//sStoreID=getToken(\\quot\\POSInterface_StoreID\\quot\\)//crlf////tab////tab////tab//if(sStoreID=\\quot\\undefined\\quot\\)//crlf////tab////tab////tab////tab//return(\\quot\\Error: No store defined in POSInterface_StoreID: \\quot\\+getToken(\\quot\\POSInterface_StoreID:\\quot\\))//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////get a list of files to be imported//crlf////tab////tab////tab//sFilespec=getToken(\\quot\\homedir\\quot\\)+\\quot\\invoices\*.*\\quot\\//crlf////tab////tab////tab//arFiles=getMatchingFiles(sFilespec\\comma\\false\\comma\\false)//crlf////tab////tab////tab//cFiles=getElementCount(arFiles\\comma\\\\quot\\~~pipe~~\\quot\\)//crlf////crlf////tab////tab////tab////abort if there are no files to import//crlf////tab////tab////tab//if(cFiles=0)//crlf////tab////tab////tab////tab//return(\\quot\\Ok: No files found in \\quot\\+sFilespec)//crlf////tab////tab////tab//endif//crlf////tab////tab////crlf////tab////tab////tab////import the files//crlf////tab////tab////tab//cError=0//crlf////tab////tab////tab//nFile=0//crlf////tab////tab////tab//while(nFile<cFiles)//crlf////tab////tab////tab////tab//sFilename=getElement(arFiles\\comma\\nFile\\comma\\\\quot\\~~pipe~~\\quot\\)//crlf////tab////tab////tab////tab//s=execAgentAction(\\quot\\importVendorInvoice\\quot\\\\comma\\\\quot\\StoreID=\\quot\\+sStoreID+\\quot\\//amp//Filename=\\quot\\+sFilename)//crlf////tab////tab////tab////tab//appendToLog(\\quot\\Import invoice: \\quot\\+sFilename+\\quot\\: \\quot\\+s)//crlf////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\ok\\quot\\)))//crlf////tab////tab////tab////tab////tab//cError++//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//nFile++//crlf////tab////tab////tab//endwhile//crlf////crlf////tab////tab////tab//return(if(cError=0\\comma\\\\quot\\Ok:\\quot\\\\comma\\\\quot\\Error:\\quot\\)+\\quot\\ Imported \\quot\\+cFiles+\\quot\\ invoices.  Errors: \\quot\\+cError)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//^
ID=debug_console|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=debug_console|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=914196|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=[!------------------------------------------------------------------------//crlf//Used to view an electronic invoice from a vendor//crlf////crlf//Params://crlf////tab//Filename - File name //crlf////crlf//The format of the file is determined using the //crlf//--------------------------------------------------------------------------]//crlf//^
ID=AgentStart|X=183|Y=41|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentStart|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=57215|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=never|^
ID=808932|X=151|Y=432|W=119|H=45|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=~~backslash~~equals~~backslash~~~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~Ok~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~|AgentNodeActionReturnValue=|AgentNodeComment=Ok|AgentNodeTermType=0|^
ID=AgentTabs|X=183|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStart');agentSetVisible(true)\\quot\\>Agent</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentDescription');agentSetVisible(false)\\quot\\>Description</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStatus');agentSetVisible(false)\\quot\\>Status</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentScript');agentSetVisible(false)\\quot\\>Script</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'ScriptText');agentSetVisible(false)\\quot\\>Script (Text)</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentChart');agentSetVisible(false);agentFormatNodes(document.getElementById('AgentChart'));agentDrawConnectors(document.getElementById('AgentChart'))\\quot\\>Chart</span></td>//crlf////tab//</tr>//crlf//</table>//crlf//^
ID=AgentScript|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<conditional expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//<!include type:script; name:\\quot\\agent_Import Vendor Invoice\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Import Vendor Invoice\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 01-10-2018 13:01:11//crlf////crlf////tab////tab////Force reporting when the agent is executed manually//crlf////tab////tab//bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\) or (false))//crlf////crlf////tab////tab////Record the starting time//crlf////tab////tab//tAgentStart=now()//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Import Vendor Invoice\\comma\\AgentAction\\comma\\57215\\comma\\0\\comma\\importEDIInvoices//crlf////tab////tab//result=execAgentAction(\\quot\\importEDIInvoices\\quot\\)//crlf////crlf////tab////tab////Ok?//crlf////tab////tab//if(startsWith(result\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Import Vendor Invoice\\comma\\AgentTerminate\\comma\\808932\\comma\\0\\comma\\Ok//crlf////tab////tab////tab//scriptSetResult(=\\quot\\Ok\\quot\\)//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Import Vendor Invoice\\comma\\AgentTerminate\\comma\\929816\\comma\\1\\comma\\Error//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//endif//crlf////tab//\\quot\\>//crlf//</conditional>^
ID=ScriptText|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<span style='font:8pt tahoma;color:black'>//amp//lt;state//amp//gt;01102018//amp//nbsp;130111//amp//lt;/state//amp//gt;<br>//amp//lt;<span class='includecontrol'>conditional</span>//amp//nbsp;expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)//amp//gt;<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//lt;!<span class='includecontrol'>include</span>//amp//nbsp;type:script;//amp//nbsp;name:\\quot\\agent_Import//amp//nbsp;Vendor//amp//nbsp;Invoice\\quot\\;//amp//nbsp;commands:\\quot\\<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Created//amp//nbsp;01-10-2018//amp//nbsp;13:01:11</span><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Force//amp//nbsp;reporting//amp//nbsp;when//amp//nbsp;the//amp//nbsp;agent//amp//nbsp;is//amp//nbsp;executed//amp//nbsp;manually</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\)//amp//nbsp;or//amp//nbsp;(false))<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Record//amp//nbsp;the//amp//nbsp;starting//amp//nbsp;time</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;tAgentStart=<span class='keyword'>now</span>()<br><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;result=<span class='keyword'>execAgentAction</span>(\\quot\\importEDIInvoices\\quot\\)<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Ok?</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'><span class='keyword'>if</span>(</span><span class='keyword'>startsWith</span>(result\\comma\\\\quot\\ok\\quot\\))<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(=\\quot\\Ok\\quot\\)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>else</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>endif</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;\\quot\\//amp//gt;<br>//amp//lt;/<span class='includecontrol'>conditional</span>//amp//gt;<br><br></span>^
ID=AgentDescription|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStatus|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentChart|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>01102018 130111</state>//crlf//<canvas id=\\quot\\agent_doc_canvas\\quot\\ width=\\quot\\100\\quot\\ height=\\quot\\100\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 100px; height: 100px; border-style: none; z-index: 2;\\quot\\></canvas><div id=\\quot\\chartAgentStart\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart57215\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\111\\quot\\ style=\\quot\\width: 120px; height: 111px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Import Vendor Invoice</b><br><span style=\\quot\\font-weight:normal;color:green\\quot\\>Active</span><br><span style=\\quot\\font-weight:normal;color:black\\quot\\>Debugging Is Off</span><br>Report Status: never<br>Report To: <br>Name Params: </div></div><div id=\\quot\\chart808932\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 387px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\46\\quot\\ style=\\quot\\width: 120px; height: 46px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><span style=\\quot\\color:black\\quot\\>Other</span></div></div><div id=\\quot\\chart57215\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart209140\\quot\\ style=\\quot\\position: absolute; top: 163px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\56\\quot\\ style=\\quot\\width: 150px; height: 56px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentaction\\quot\\><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>importEDIInvoices<br></td></tr><tr><td><u>Return</u></td><td>result</td></tr></tbody></table></div></div><div id=\\quot\\chart209140\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart808932\\quot\\ agentchildnonode=\\quot\\chart929816\\quot\\ style=\\quot\\position: absolute; top: 271px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\64\\quot\\ style=\\quot\\width: 150px; height: 64px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentdecision\\quot\\>Ok?<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Sensor</u></td><td>Expression<br></td></tr></tbody></table></div></div><div id=\\quot\\chart929816\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 271px; left: 190px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Error<hr><span style=\\quot\\color:red\\quot\\>Fail</span></div></div>^
ID=37272|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=[!------------------------------------------------------------------------//crlf//Used to view an electronic invoice from a vendor://crlf////crlf//Params://crlf////tab//Filename - file name//crlf////crlf//The format of the file is determined using the getInvoiceFormatID sensor.//crlf//--------------------------------------------------------------------------]//crlf////crlf//Filename=__Filename__<br>//crlf//InvoiceFormat=__InvoiceFormat__<br>//crlf//Driver=<!!include type:expression; expression:lookup(Aspect_BackOffice_Invoice_DriverID_by_Invoice_Format_ID\\comma\\\\quot\\__INVOICEFORMAT__\\quot\\)><br>//crlf//<br>//crlf////crlf//<conditional expression:not(defined(\\quot\\__filename__\\quot\\))>//crlf////tab//Error: Missing filename//crlf//</conditional>//crlf////crlf//<conditional expression:defined(\\quot\\__filename__\\quot\\)>//crlf////tab//<!include type:script; commands:\\quot\\//crlf////tab////tab//s=getSensorValue(\\quot\\getInvoiceFormatID\\quot\\\\comma\\\\quot\\Filename=__filename__\\quot\\)//crlf////tab////tab//return(htmlConstant(\\quot\\InvoiceFormat\\quot\\\\comma\\\\quot\\__\\quot\\\\comma\\s))//crlf////tab//\\quot\\>//crlf////crlf////tab//<!conditional expression:(startsWith(\\quot\\__InvoiceFormat__\\quot\\\\comma\\\\quot\\Error\\quot\\))>//crlf////tab////tab//Error: Unrecognized invoice format//crlf////tab//</conditional>//crlf////crlf////tab//<!conditional expression:not(startsWith(\\quot\\__InvoiceFormat__\\quot\\\\comma\\\\quot\\Error\\quot\\))>//crlf////tab////tab//<!!!include type:widget; server:{AspectHashID}; secure:true; documentID:\\quot\\K4Ui6j3Y1rwlvukPkOqn25Em\\quot\\; widget:\\quot\\Notification Container\\quot\\; containerItemID:\\quot\\601689\\quot\\; params:\\quot\\action=getheader//amp//Chapter=__salt__//amp//Section=<!!include type:expression; expression:lookup(Aspect_BackOffice_Invoice_Format_IDs\\comma\\\\quot\\__InvoiceFormat__\\quot\\)> Invoice\\quot\\;>//crlf////tab////tab//<!!!include type:widget; server:{AspectHashID}; secure:true; documentID:\\quot\\K4Ui6j3Y1rwlvukPkOqn25Em\\quot\\; widget:\\quot\\Notification Container\\quot\\; containerItemID:\\quot\\601689\\quot\\; params:\\quot\\action=getfooter\\quot\\;>//crlf////crlf////tab////tab//<!!!include type:driver;//crlf////tab////tab////tab//ver: \\quot\\1.0\\quot\\;//crlf////tab////tab////tab//title: \\quot\\\\quot\\;//crlf////tab////tab////tab//ID: \\quot\\\\quot\\;//crlf////tab////tab////tab//HashID: \\quot\\\\quot\\;//crlf////tab////tab////tab//driver: \\quot\\<!!include type:expression; expression:lookup(Aspect_BackOffice_Invoice_DriverID_by_Invoice_Format_ID\\comma\\\\quot\\__INVOICEFORMAT__\\quot\\)>\\quot\\;//crlf////tab////tab////tab//name: \\quot\\\\quot\\;//crlf////tab////tab////tab//systemdriver: \\quot\\false\\quot\\;//crlf////tab////tab////tab//dispose: \\quot\\false\\quot\\;//crlf////tab////tab////tab//state: \\quot\\\\quot\\;//crlf////tab////tab////tab//params: \\quot\\keyexpression=ID~~pipe~~Filename=__Filename__~~pipe~~CacheTtl=0~~pipe~~Metadata=ASPECT_BACK_OFFICE_ELECTRONIC_INVOICE\\quot\\;//crlf////tab////tab////tab//keyDescription: \\quot\\\\quot\\;//crlf////tab////tab////tab//display: \\quot\\\\quot\\;//crlf////tab////tab////tab//fields: \\quot\\\\quot\\;//crlf////tab////tab////tab//IncludeFields: \\quot\\\\quot\\;//crlf////tab////tab////tab//ExcludeFields: \\quot\\\\quot\\;//crlf////tab////tab////tab//sort: \\quot\\ID\\quot\\;//crlf////tab////tab////tab//filter: \\quot\\true\\quot\\;//crlf////tab////tab////tab//BaseFilter: \\quot\\\\quot\\;//crlf////tab////tab////tab//class: \\quot\\basic1\\quot\\;//crlf////tab////tab////tab//maxrecords: \\quot\\250\\quot\\;//crlf////tab////tab////tab//startrecord: \\quot\\0\\quot\\;//crlf////tab////tab////tab//style: \\quot\\width:auto\\quot\\;//crlf////tab////tab////tab//_style: \\quot\\float:left;width:100\\percent\\\\quot\\;//crlf////tab////tab////tab//height:\\quot\\auto\\quot\\;//crlf////tab////tab////tab//_maxheight:\\quot\\300px\\quot\\;//crlf////tab////tab////tab//canSelect: \\quot\\false\\quot\\;//crlf////tab////tab////tab//readOnly: \\quot\\false\\quot\\;//crlf////tab////tab////tab//canEdit: \\quot\\false\\quot\\;//crlf////tab////tab////tab//canAdd: \\quot\\false\\quot\\;//crlf////tab////tab////tab//canDelete: \\quot\\false\\quot\\;//crlf////tab////tab////tab//inspectMenu: \\quot\\\\quot\\;//crlf////tab////tab////tab//EmbedValues: \\quot\\\\quot\\;//crlf////tab////tab////tab//EditDialogID: \\quot\\\\quot\\;//crlf////tab////tab////tab//DialogHeader: \\quot\\false\\quot\\;//crlf////tab////tab////tab//canCloseDialog: \\quot\\true\\quot\\;//crlf////tab////tab////tab//ExternalParams: \\quot\\\\quot\\;//crlf////tab////tab////tab//ExternalFilters: \\quot\\\\quot\\;//crlf////tab////tab////tab//TableControls: \\quot\\true\\quot\\;//crlf////tab////tab////tab//TableHeader: \\quot\\true\\quot\\;//crlf////tab////tab////tab//TableBorder: \\quot\\true\\quot\\;//crlf////tab////tab////tab//RecordCount: \\quot\\true\\quot\\;//crlf////tab////tab////tab//Timestamp: \\quot\\true\\quot\\;//crlf////tab////tab////tab//SelectDisplay: \\quot\\true\\quot\\;//crlf////tab////tab////tab//EditDisplay: \\quot\\true\\quot\\;//crlf////tab////tab////tab//Menu: \\quot\\\\quot\\;//crlf////tab////tab////tab//faq: \\quot\\\\quot\\;//crlf////tab////tab////tab//procedure: \\quot\\\\quot\\;//crlf////tab////tab////tab//video: \\quot\\\\quot\\;//crlf////tab////tab////tab//Messages: \\quot\\true\\quot\\;//crlf////tab////tab////tab//ChartType: \\quot\\\\quot\\;//crlf////tab////tab////tab//ChartWidth: \\quot\\640\\quot\\;//crlf////tab////tab////tab//ChartHeight: \\quot\\480\\quot\\;//crlf////tab////tab////tab//ChartLabels: \\quot\\Down_45\\quot\\;//crlf////tab////tab////tab//ChartTitle: \\quot\\\\quot\\;//crlf////tab////tab////tab//ChartStyle: \\quot\\display:none\\quot\\;//crlf////tab////tab////tab//RefreshInterval: \\quot\\0\\quot\\;//crlf////tab////tab////tab//RefreshWhenHidden: \\quot\\true\\quot\\;//crlf////tab////tab////tab//RefreshIntervalRemote: \\quot\\0\\quot\\;//crlf////tab////tab////tab//RefreshWhenHiddenRemote: \\quot\\true\\quot\\;//crlf////tab////tab////tab//_Javascript: \\quot\\DocumentID~~pipe~~Widget~~pipe~~ContainerItemID~~pipe~~Params\\quot\\;//crlf////tab////tab////tab//debug: \\quot\\false\\quot\\;//crlf////tab////tab//>//crlf////tab//</conditional>//crlf////crlf//</conditional>^
ID=57215|X=151|Y=208|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentAction|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=209140|AgentChildNoNode=|AgentSensor=|AgentAction=importEDIInvoices|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=result|AgentNodeComment=|AgentNodeTermType=|^
ID=209140|X=151|Y=316|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentDecision|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=808932|AgentChildNoNode=929816|AgentSensor=1|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=startsWith(result//comma//~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~ok~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~)|AgentNodeActionReturnValue=|AgentNodeComment=Ok?|AgentNodeTermType=|^
ID=929816|X=341|Y=316|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=0|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=result|AgentNodeActionReturnValue=|AgentNodeComment=Error|AgentNodeTermType=1|
</widget><widget name="Download PFG Invoices" group="Inventory" category="EDI" description="Downloads PFG invoices from the PFG ftp server to the Aspect server.  Also contains an agent action called at the store to process and format a downloaded file so it can be imported at the store." type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Download Pfg Invoices" modified="04-10-2018 23:30:07" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=12-10-2017 00:00:00:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=2 TaskMinutesBetweenExecution=0 TaskSecondsBetweenExecution=0 TaskExecuteSun=true TaskExecuteMon=true TaskExecuteTue=true TaskExecuteWed=true TaskExecuteThu=true TaskExecuteFri=true TaskExecuteSat=true TaskConditional_Expression="(isServer()) and (getToken(\\quote\\AspectHashID\\quote\\)=\\quote\\v8k3ey5q1\\quote\\)" TaskConditional_Expression_Description="" TaskState_Function="" TaskState_Expression_Description="" TaskWidgetParams="" TaskWindowForExecution=0>
Preferences|toolboxx=22|toolboxy=127|aspectfuncx=201|aspectfuncy=100|aspectfuncw=844|aspectfunch=667|aspectfuncLock=true|aspectfuncVisible=false|PublishFtpFilename=Download PFG Invoices.html|PublishToFtpSite=false|PublishFTPAccount=0|PublishFtpDirectory=/|PublishFtpPublicDirectory=/|PublishCopyFile=false|PublishCopyFilename=|PublishWysiwig=false|PublishIncludeAspectScript=false|PublishIncludeAspectStyleshet=false|PublishAsText=false|^
ID=top_bar|X=0|Y=0|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=left_bar|X=0|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=|AlignLeft=top_bar|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=code|X=1500|Y=0|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'775835')\\quot\\>Javascript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'AspectScript')\\quot\\>AspectScript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'sensor_list')\\quot\\>Sensors</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'action_list')\\quot\\>Actions</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'debug_console')\\quot\\>Console</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'580641')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=775835|X=1500|Y=23|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Javascript|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AspectScript|X=1500|Y=23|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=sensor_list|X=1500|Y=23|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__SensorExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download PFG Invoices.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__sensor_list__\\quot\\=\\quot\\true\\quot\\)>//crlf//</conditional>//crlf////crlf//^
ID=action_list|X=1500|Y=23|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=Aspect_Script|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download PFG Invoices.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Download PFG Invoices\\comma\\processPFGInvoice\\comma\\action_list\\comma\\Action=processPFGInvoice\\comma\\private//crlf////tab//Download PFG Invoices\\comma\\downloadPFGInvoices\\comma\\action_list\\comma\\Action=downloadPFGInvoices\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//processPFGInvoice//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\processPFGInvoice\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Processes a PFG invoice to include the invoice date and number on each //crlf////tab////tab//line.  Outputs a pipe-delimited file.  The output file is identical to the //crlf////tab////tab//original except that it only contains \\quot\\D\\quot\\ records\\comma\\ which are the items\\comma\\ //crlf////tab////tab//and the invoice type (credit/invoice)\\comma\\ number and date are appended to the //crlf////tab////tab//end of each line.  //crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//InputFilename - Name of the input file//crlf////tab////tab//OutputFilename - Name of the output file//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Ok or Error//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\processPFGInvoice\\quot\\; commands:\\quot\\//crlf////tab////tab////tab////abort if missing InputFilename//crlf////tab////tab////tab//if(undefined(\\quot\\__InputFilename__\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing InpuFilename\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////abort if missing OutputFilename//crlf////tab////tab////tab//if(undefined(\\quot\\__OutputFilename__\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing OutputFilename\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////abort if the input file does not exist//crlf////tab////tab////tab//if(not(fileExists(\\quot\\__InputFilename__\\quot\\)))//crlf////tab////tab////tab////tab//return(\\quot\\Error: File does not exist: __InputFilename__\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////get the input//crlf////tab////tab////tab//sInput=fileGetContent(\\quot\\__InputFilename__\\quot\\)//crlf////crlf////tab////tab////tab////get rid of any quotes//crlf////tab////tab////tab//sInput=replaceSubstring(sInput\\comma\\char(0x22)\\comma\\\\quot\\\\quot\\)//crlf////crlf////tab////tab////tab////get rid of CR//crlf////tab////tab////tab//sInput=replaceSubstring(sInput\\comma\\char(13)\\comma\\\\quot\\\\quot\\)//crlf////crlf////tab////tab////tab////initialize the output//crlf////tab////tab////tab//sOutput=\\quot\\\\quot\\//crlf////crlf////tab////tab////tab//sInvoiceNumber=\\quot\\\\quot\\//crlf////tab////tab////tab//dtInvoice=\\quot\\\\quot\\//crlf////tab////tab////tab//bIsCredit=false//crlf////tab////tab////tab//c=getElementCount(sInput\\comma\\char(10))//crlf////tab////tab////tab//appendToLog(\\quot\\Processing PFG invoice (\\quot\\+c+\\quot\\ records) to __OutputFilename__\\quot\\)//crlf////tab////tab////tab//n=0//crlf////tab////tab////tab//while(n<c)//crlf////tab////tab////tab////tab//sLine=getElement(sInput\\comma\\n\\comma\\char(10))//crlf////tab////tab////tab////tab//if(startsWith(sLine\\comma\\\\quot\\H\\quot\\))//crlf////tab////tab////tab////tab////tab//bIsCredit=(getElement(sLine\\comma\\4\\comma\\\\quot\\~~pipe~~\\quot\\)=\\quot\\c\\quot\\)//crlf////tab////tab////tab////tab////tab//sInvoiceNumber=getElement(sLine\\comma\\5\\comma\\\\quot\\~~pipe~~\\quot\\)//crlf////tab////tab////tab////tab////tab//dtInvoice=parseTime(getElement(sLine\\comma\\6\\comma\\\\quot\\~~pipe~~\\quot\\)\\comma\\\\quot\\yyyyMMdd\\quot\\)//crlf////tab////tab////tab////tab//elseif(startsWith(sLine\\comma\\\\quot\\D\\quot\\))//crlf////tab////tab////tab////tab////tab//sOutput=sOutput+sLine+\\quot\\~~pipe~~\\quot\\+bIsCredit+\\quot\\~~pipe~~\\quot\\+sInvoiceNumber+\\quot\\~~pipe~~\\quot\\+formatDate(dtInvoice\\comma\\\\quot\\MM-dd-yyyy\\quot\\)+char(13)+char(10)//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//n++//crlf////tab////tab////tab//endwhile//crlf////tab////crlf////tab////tab////tab//fileWriteContent(\\quot\\__OutputFilename__\\quot\\\\comma\\sOutput)//crlf////tab////tab////tab//return(\\quot\\ok\\quot\\)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//downloadPFGInvoices//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadPFGInvoices\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads invoices from the PFG server to the Aspect server.  This action //crlf////tab////tab//is called on the Aspect server.  Invoices are then distributed to stores //crlf////tab////tab//after they have been downloaded from PFG.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//None//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Ok or Error//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\downloadPFGInvoices\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab////tab////count files on server and number downloaded//crlf////tab////tab////tab//cFilesOnServer=0//crlf////tab////tab////tab//cDownload=0//crlf////tab////tab////tab//cSkipped=0//crlf////tab////tab////tab//cError=0//crlf////tab////tab////tab//cDeleted=0//crlf////crlf////tab////tab////tab////directory to download to//crlf////tab////tab////tab//sPFGPendingDir=getToken(\\quot\\homedir\\quot\\)+\\quot\\pfg_invoices\pending\\\quot\\//crlf////tab////tab////tab//if(not(fileExists(sPFGPendingDir)))//crlf////tab////tab////tab////tab//appendToLog(\\quot\\Creating directory: \\quot\\+sPFGPendingDir)//crlf////tab////tab////tab////tab//fileMakeDirectory(sPFGPendingDir)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//if((not(fileExists(sPFGPendingDir))) or (not(fileIsDirectory(sPFGPendingDir))))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Directory is invalid: \\quot\\+sPFGPendingDir)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////connect to ftp server//crlf////tab////tab////tab//s=ftpConnect(pfg\\comma\\\\quot\\ECOMM.PFGC.COM\\quot\\\\comma\\\\quot\\zzASPECT\\quot\\\\comma\\\\quot\\PFG111517\\quot\\\\comma\\true)//crlf////tab////tab////tab//appendToLog(\\quot\\Connect to ECOMM.PFGC.COM: \\quot\\+s)//crlf////crlf////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////change directory to /OUT//crlf////tab////tab////tab////tab//s=ftpChangeDir(pfg\\comma\\\\quot\\/OUT\\quot\\)//crlf////tab////tab////tab////tab//appendToLog(\\quot\\chdir to /out: \\quot\\+s)//crlf////crlf////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////get file list//crlf////tab////tab////tab////tab////tab//arFiles=ftpListFiles(pfg)//crlf////tab////tab////tab////tab////tab//cFilesOnServer=getElementCount(arFiles\\comma\\char(10))//crlf////tab////tab////tab////tab////tab//if(cFilesOnServer=0)//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\No files on server\\quot\\)//crlf////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////doenload the files//crlf////tab////tab////tab////tab////tab////tab//n=0//crlf////tab////tab////tab////tab////tab////tab//while(n<cFilesOnServer)//crlf////tab////tab////tab////tab////tab////tab////tab////get the filename//crlf////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=getElement(arFiles\\comma\\n\\comma\\char(10))//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////the filename includes the size and time.  Get only the filename//crlf////tab////tab////tab////tab////tab////tab////tab//n1=pos(\\quot\\.txt\\quot\\\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab//if(n1>=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=substring(sFtpFilename\\comma\\0\\comma\\n1+4)//tab////crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////get the local filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab//sLocalFilename=sPFGPendingDir+sFtpFilename//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////download the file if it doesn't already exist//crlf////tab////tab////tab////tab////tab////tab////tab////tab//if((not(fileExists(sLocalFilename))) or (fileSize(sLocalFilename)=0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpRetrieveFile(pfg\\comma\\sLocalFilename\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Retr \\quot\\+sFtpFilename+\\quot\\: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExist=fileExists(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//iSize=fileSize(sLocalFilename)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////delete the file//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((bExist) and (iSize>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDeleteFile(pfg\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Delete \\quot\\+sFtpFilename+\\quot\\: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDeleted++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDownload++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: File download failed.  Exists: \\quot\\+bExist+\\quot\\ Size: \\quot\\+iSize)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(bExist)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//fileDelete(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cError++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cError++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\File already exists: \\quot\\+sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDeleteFile(pfg\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Delete \\quot\\+sFtpFilename+\\quot\\: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDeleted++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//cSkipped++//crlf////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: Invalid filename: \\quot\\+sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab//n++//crlf////tab////tab////tab////tab////tab////tab//endwhile//crlf////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////disconnect//crlf////tab////tab////tab////tab////tab//s=ftpDisconnect(pfg)//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Disconnect: \\quot\\+s)//crlf////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////return an error.  Could not change to directory//crlf////tab////tab////tab////tab////tab//ftpDisconnect(pfg)//crlf////tab////tab////tab////tab////tab//return(\\quot\\Error: \\quot\\+s)//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab//else//crlf////tab////tab////tab////tab////return an error.  Could not connect//crlf////tab////tab////tab////tab//return(\\quot\\Error: \\quot\\+s)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//return(\\quot\\Ok: Files: \\quot\\+cFilesOnServer+\\quot\\ Downloaded: \\quot\\+cDownload+\\quot\\ Skipped: \\quot\\+cSkipped+\\quot\\ Errors: \\quot\\+cError+\\quot\\ Deleted: \\quot\\+cDeleted)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf////crlf//^
ID=debug_console|X=1500|Y=23|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=debug_console|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=580641|X=1500|Y=23|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStart|X=183|Y=38|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentStart|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=835531|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=never|^
ID=195407|X=183|Y=515|W=119|H=45|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=Result|AgentNodeActionReturnValue=|AgentNodeComment=Success|AgentNodeTermType=0|^
ID=AgentTabs|X=183|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStart');agentSetVisible(true)\\quot\\>Agent</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentDescription');agentSetVisible(false)\\quot\\>Description</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStatus');agentSetVisible(false)\\quot\\>Status</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentScript');agentSetVisible(false)\\quot\\>Script</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'ScriptText');agentSetVisible(false)\\quot\\>Script (Text)</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentChart');agentSetVisible(false);agentFormatNodes(document.getElementById('AgentChart'));agentDrawConnectors(document.getElementById('AgentChart'))\\quot\\>Chart</span></td>//crlf////tab//</tr>//crlf//</table>//crlf//^
ID=AgentScript|X=183|Y=38|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<conditional expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//<!include type:script; name:\\quot\\agent_Download PFG Invoices\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download PFG Invoices\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 04-10-2018 21:30:49//crlf////crlf////tab////tab////Force reporting when the agent is executed manually//crlf////tab////tab//bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\) or (false))//crlf////crlf////tab////tab////Record the starting time//crlf////tab////tab//tAgentStart=now()//crlf////crlf////crlf////tab////tab////Running On Gambon?//crlf////tab////tab//if(getToken(\\quot\\AspectHashID\\quot\\)=\\quot\\v8k3ey5q1\\quot\\)//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download PFG Invoices\\comma\\AgentAction\\comma\\183759\\comma\\0\\comma\\downloadPFGInvoices//crlf////tab////tab////tab//Result=execAgentAction(\\quot\\downloadPFGInvoices\\quot\\)//crlf////tab////tab////tab//if(startsWith(Result\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download PFG Invoices\\comma\\AgentTerminate\\comma\\195407\\comma\\0\\comma\\Success//crlf////tab////tab////tab////tab//scriptSetResult(Result)//crlf////tab////tab////tab//else//crlf////tab////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download PFG Invoices\\comma\\AgentTerminate\\comma\\593081\\comma\\1\\comma\\An error occurred//crlf////tab////tab////tab////tab//scriptSetResult(Result)//crlf////tab////tab////tab//endif//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download PFG Invoices\\comma\\AgentTerminate\\comma\\823883\\comma\\1\\comma\\Error//crlf////tab////tab////tab//scriptSetResult(=\\quot\\Not running on server\\quot\\)//crlf////tab////tab//endif//crlf////tab//\\quot\\>//crlf//</conditional>^
ID=ScriptText|X=183|Y=38|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<span style='font:8pt tahoma;color:black'>//amp//lt;state//amp//gt;04102018//amp//nbsp;213049//amp//lt;/state//amp//gt;<br>//amp//lt;<span class='includecontrol'>conditional</span>//amp//nbsp;expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)//amp//gt;<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//lt;!<span class='includecontrol'>include</span>//amp//nbsp;type:script;//amp//nbsp;name:\\quot\\agent_Download//amp//nbsp;PFG//amp//nbsp;Invoices\\quot\\;//amp//nbsp;commands:\\quot\\<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Created//amp//nbsp;04-10-2018//amp//nbsp;21:30:49</span><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Force//amp//nbsp;reporting//amp//nbsp;when//amp//nbsp;the//amp//nbsp;agent//amp//nbsp;is//amp//nbsp;executed//amp//nbsp;manually</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\)//amp//nbsp;or//amp//nbsp;(false))<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Record//amp//nbsp;the//amp//nbsp;starting//amp//nbsp;time</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;tAgentStart=<span class='keyword'>now</span>()<br><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Running//amp//nbsp;On//amp//nbsp;Gambon?</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'><span class='keyword'>if</span>(</span><span class='keyword'>getToken</span>(\\quot\\AspectHashID\\quot\\)=\\quot\\v8k3ey5q1\\quot\\)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;Result=<span class='keyword'>execAgentAction</span>(\\quot\\downloadPFGInvoices\\quot\\)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'><span class='keyword'>if</span>(</span><span class='keyword'>startsWith</span>(Result\\comma\\\\quot\\ok\\quot\\))<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(Result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>else</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(Result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>endif</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>else</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(=\\quot\\Not//amp//nbsp;running//amp//nbsp;on//amp//nbsp;server\\quot\\)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>endif</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;\\quot\\//amp//gt;<br>//amp//lt;/<span class='includecontrol'>conditional</span>//amp//gt;<br><br></span>^
ID=AgentDescription|X=183|Y=38|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStatus|X=183|Y=38|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentChart|X=183|Y=38|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>04102018 213049</state>//crlf//<canvas id=\\quot\\agent_doc_canvas\\quot\\ width=\\quot\\100\\quot\\ height=\\quot\\100\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 100px; height: 100px; border-style: none; z-index: 2;\\quot\\></canvas><div id=\\quot\\chartAgentStart\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart835531\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\111\\quot\\ style=\\quot\\width: 120px; height: 111px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Download PFG Invoices</b><br><span style=\\quot\\font-weight:normal;color:green\\quot\\>Active</span><br><span style=\\quot\\font-weight:normal;color:black\\quot\\>Debugging Is Off</span><br>Report Status: never<br>Report To: <br>Name Params: </div></div><div id=\\quot\\chart195407\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 477px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Success<hr><span style=\\quot\\color:green\\quot\\>Success</span></div></div><div id=\\quot\\chart183759\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart396070\\quot\\ style=\\quot\\position: absolute; top: 279px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\56\\quot\\ style=\\quot\\width: 150px; height: 56px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentaction\\quot\\><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>downloadPFGInvoices<br></td></tr><tr><td><u>Return</u></td><td>Result</td></tr></tbody></table></div></div><div id=\\quot\\chart396070\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart195407\\quot\\ agentchildnonode=\\quot\\chart593081\\quot\\ style=\\quot\\position: absolute; top: 387px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\38\\quot\\ style=\\quot\\width: 150px; height: 38px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentdecision\\quot\\><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Sensor</u></td><td>Expression<br></td></tr></tbody></table></div></div><div id=\\quot\\chart593081\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 387px; left: 190px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>An error occurred<hr><span style=\\quot\\color:red\\quot\\>Fail</span></div></div><div id=\\quot\\chart835531\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart183759\\quot\\ agentchildnonode=\\quot\\chart823883\\quot\\ style=\\quot\\position: absolute; top: 163px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\77\\quot\\ style=\\quot\\width: 150px; height: 64px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentdecision\\quot\\>Running On Gambon?<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Sensor</u></td><td>Expression<br></td></tr></tbody></table></div></div><div id=\\quot\\chart823883\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 163px; left: 190px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Error<hr><span style=\\quot\\color:red\\quot\\>Fail</span></div></div>^
ID=183759|X=183|Y=317|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentAction|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=396070|AgentChildNoNode=|AgentSensor=|AgentAction=downloadPFGInvoices|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=Result|AgentNodeComment=|AgentNodeTermType=|^
ID=396070|X=183|Y=425|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentDecision|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=195407|AgentChildNoNode=593081|AgentSensor=1|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=startsWith(Result//comma//~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~ok~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~)|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=593081|X=373|Y=425|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=Result|AgentNodeActionReturnValue=|AgentNodeComment=An error occurred|AgentNodeTermType=1|^
ID=835531|X=183|Y=201|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentDecision|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=183759|AgentChildNoNode=823883|AgentSensor=1|AgentAction=0|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=getToken(~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~AspectHashID~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~)~~backslash~~equals~~backslash~~~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~v8k3ey5q1~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~|AgentNodeActionReturnValue=Result|AgentNodeComment=Running On Gambon?|AgentNodeTermType=|^
ID=823883|X=373|Y=201|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=~~backslash~~equals~~backslash~~~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~Not running on server~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~|AgentNodeActionReturnValue=|AgentNodeComment=Error|AgentNodeTermType=1|
</widget><widget name="Download Sysco Invoice" group="Inventory" category="Invoice Downloads" description="This agent downloads invoices from Sysco.  It runs on the customer's computer and downloads invoices from an ftp site.  The site and credentials are entered by the customer in the vendor setup dialog." type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Download Sysco Invoice" modified="11-10-2019 14:17:36" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=12-26-2017 00:00:00:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=0 TaskMinutesBetweenExecution=1 TaskSecondsBetweenExecution=0 TaskExecuteSun=true TaskExecuteMon=true TaskExecuteTue=true TaskExecuteWed=true TaskExecuteThu=true TaskExecuteFri=true TaskExecuteSat=true TaskConditional_Expression="(getToken(\\quote\\POSInterface_StoreID\\quote\\)\\lt\\\\gt\\\\quote\\Undefined\\quote\\) and (len(lookup(Aspect_BackOffice_Vendor_ID_by_EDI_Selection,\\quote\\Sysco\\quote\\,0,\\quote\\StoreID=\\quote\\+getToken(\\quote\\POSInterface_StoreID\\quote\\)))\\gt\\0)" TaskConditional_Expression_Description="Executes when sysco EDI information is defined for a vendor in the store with the pos interface enabled" TaskState_Function="hour(now())+gfs(replaceSubstring(getSetFor(getCollection(Aspect_BackOffice_Store_Directory_By_ID,true,\\quote\\\\quote\\,\\quote\\\\quote\\,\\quote\\,\\quote\\,\\quote\\value\\quote\\),\\quote\\vendor.bin\\quote\\),char(0x2C),char(0x3B)))+getToken(\\quote\\POSInterface_StoreID\\quote\\)" TaskState_Expression_Description="Executes when the hour changes, when a vendor file is updated and when the ID of the store with the pos interface enabled changes." TaskWidgetParams="" TaskWindowForExecution=0>
Preferences|toolboxx=81|toolboxy=160|aspectfuncx=100|aspectfuncy=100|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=false|aspectfuncVisible=false|PublishFtpFilename=Download Sysco Invoice.html|PublishToFtpSite=false|PublishFTPAccount=0|PublishFtpDirectory=/|PublishFtpPublicDirectory=/|PublishCopyFile=false|PublishCopyFilename=|PublishWysiwig=false|PublishIncludeAspectScript=false|PublishIncludeAspectStyleshet=false|PublishAsText=false|^
ID=top_bar|X=0|Y=0|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=left_bar|X=0|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=|AlignLeft=top_bar|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=code|X=300|Y=100|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'531121')\\quot\\>Javascript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'AspectScript')\\quot\\>AspectScript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'sensor_list')\\quot\\>Sensors</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'action_list')\\quot\\>Actions</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'debug_console')\\quot\\>Console</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'570024')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=531121|X=300|Y=125|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Javascript|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AspectScript|X=300|Y=125|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=sensor_list|X=300|Y=125|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__SensorExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download Sysco Invoice.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__sensor_list__\\quot\\=\\quot\\true\\quot\\)>//crlf//</conditional>//crlf////crlf//^
ID=action_list|X=300|Y=125|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=Aspect_Script|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download Sysco Invoice.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Download Sysco Invoice\\comma\\evaluateSyscoTaskCondition\\comma\\action_list\\comma\\Action=evaluateSyscoTaskCondition\\comma\\private//crlf////tab//Download Sysco Invoice\\comma\\downloadSyscoInvoices\\comma\\action_list\\comma\\Action=downloadSyscoInvoices\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//evaluateSyscoTaskCondition//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\evaluateSyscoTaskCondition\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//This action is used to debug the conditional expression used to execute this agent.//crlf////tab////tab//It can be deleted.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//none//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Information about the conditional expression//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\evaluateSyscoTaskCondition\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//s1=\\quot\\POSInterface_StoreID=\\quot\\\\plus\\getToken(\\quot\\POSInterface_StoreID\\quot\\)//crlf////tab////tab////tab//s2=\\quot\\Lookup VendorID=\\quot\\\\plus\\lookup(Aspect_BackOffice_Vendor_ID_by_EDI_Selection\\comma\\\\quot\\Sysco\\quot\\\\comma\\0\\comma\\\\quot\\StoreID=\\quot\\\\plus\\getToken(\\quot\\POSInterface_StoreID\\quot\\))//crlf////tab////tab////tab//b=(getToken(\\quot\\POSInterface_StoreID\\quot\\)<>\\quot\\Undefined\\quot\\) and (len(lookup(Aspect_BackOffice_Vendor_ID_by_EDI_Selection\\comma\\\\quot\\Sysco\\quot\\\\comma\\0\\comma\\\\quot\\StoreID=\\quot\\\\plus\\getToken(\\quot\\POSInterface_StoreID\\quot\\)))>0)//crlf////tab////tab////tab//return(s1\\plus\\getToken(\\quot\\br\\quot\\)\\plus\\s2\\plus\\getToken(br)\\plus\\\\quot\\eval=\\quot\\\\plus\\b)//tab////tab////tab////crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//downloadSyscoInvoices//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadSyscoInvoices\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads any new invoices from the Sysco FTP site.  Invoices are downloaded to the //crlf////tab////tab//[homedir]invoices directory.  An invoice will not be downloaded if it already exists //crlf////tab////tab//in the [homedir]invoices or [homedir]invoices\archive directory.  Invoices are downloaded//crlf////tab////tab//for the store with the ID matching the token POSInterface_StoreID which is set by the //crlf////tab////tab//POS Interface agent.  This means that the pos interface must be enabled for a store to //crlf////tab////tab//download invoices.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//None//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Ok or Error//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\downloadSyscoInvoices\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Download Sysco Invoices\\quot\\)//crlf////crlf////tab////tab////tab////abort if POSInterface_StoreID if blank or equals Undefined//crlf////tab////tab////tab//s=getToken(\\quot\\POSInterface_StoreID\\quot\\)//crlf////tab////tab////tab//if((len(s)=0) or (s=\\quot\\Undefined\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Aborting because no store has POS interface enabled\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////open the store driver//crlf////tab////tab////tab//driverOpen(Aspect_BackOffice_Store\\comma\\dStore\\comma\\WRITE)\\comma\\//crlf////tab////tab////tab//driverSetFilter(dStore\\comma\\\\quot\\true\\quot\\\\comma\\true)//crlf////crlf////tab////tab////tab//cProcessed=0//crlf////tab////tab////tab//cDownload=0//crlf////tab////tab////tab//cError=0//crlf////tab////tab////tab//cSkipped=0//crlf////tab////tab////tab//cDeleted=0//crlf////tab////tab////tab//cCredentialError=0//crlf////tab////tab////tab//cStore=driverGetRecordCount(dStore)//crlf////tab////tab////tab//nStore=0//crlf////tab////tab////tab//while(nStore<cStore)//crlf////tab////tab////tab////tab//sStoreID=driverGetField(dStore\\comma\\\\quot\\ID\\quot\\\\comma\\nStore)//crlf////tab////tab////tab////tab//if(sStoreID=getToken(\\quot\\POSInterface_StoreID\\quot\\))//crlf////tab////tab////tab////tab////tab//sStoreName=driverGetField(dStore\\comma\\\\quot\\Store_Name\\quot\\\\comma\\nStore)//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Downloading Sysco invoices for \\quot\\\\plus\\sStoreName)//crlf////crlf////tab////tab////tab////tab////tab////open the vendor driver for the store//crlf////tab////tab////tab////tab////tab//driverOpen(Aspect_Back_Office_Vendor\\comma\\dVendor\\comma\\WRITE\\comma\\false\\comma\\\\quot\\StoreID=\\quot\\\\plus\\sStoreID)//crlf////tab////tab////tab////tab////tab//r=driverFindRecordAbsolute(dVendor\\comma\\0\\comma\\\\quot\\EDI_Vendor=\\quot\\\\plus\\quote(\\quot\\Sysco\\quot\\))//crlf////tab////tab////tab////tab////tab//if(r>=0)//crlf////tab////tab////tab////tab////tab////tab////increment the number of vendor records processed//crlf////tab////tab////tab////tab////tab////tab//cProcessed\\plus\\\\plus\\//crlf////crlf////tab////tab////tab////tab////tab////tab//sVendorID=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\ID\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sVendorName=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\Name\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Ftp_Site\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sEDIUserName=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_UserName\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sEDIPassword=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Password\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//bEDIDelete=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Delete_After_Download\\quot\\\\comma\\r)//crlf////crlf////tab////tab////tab////tab////tab////tab////update the time that a check was last made to download invoices //crlf////tab////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Check\\quot\\\\comma\\r\\comma\\now())//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Verify time last checked=\\quot\\\\plus\\driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Check\\quot\\\\comma\\r))//crlf////crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Downloading invoices for vendor: \\quot\\\\plus\\sVendorName\\plus\\\\quot\\ ID: \\quot\\\\plus\\sVendorID)//crlf////crlf////tab////tab////tab////tab////tab////tab//remove ftp:// and other slashes from host name//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\ftp:\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\\\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////crlf////tab////tab////tab////tab////tab////tab//if((len(sEDIFtpSite)>0) and (len(sEDIUserName)>0) and (len(sEDIPassword)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////connect to ftp server//crlf////tab////tab////tab////tab////tab////tab////tab//s=ftpConnect(ftp\\comma\\sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\true)//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Connect to \\quot\\\\plus\\sEDIFtpSite\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////change directory to /OUT//crlf////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpChangeDir(ftp\\comma\\\\quot\\/Outbound\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\chdir to /Outbound: \\quot\\\\plus\\s)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////get file list//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//arFiles=ftpListFiles(ftp)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//cFilesOnServer=getElementCount(arFiles\\comma\\char(10))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(cFilesOnServer=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\No files on server\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////download the files//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//n=0//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//while(n<cFilesOnServer)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////get the filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=getElement(arFiles\\comma\\n\\comma\\char(10))//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////the filename includes the size and time.  Get only the filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////The filename may use either a .txt or .csv extension//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//n1=pos(\\quot\\.txt\\quot\\\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(n1<0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//n1=pos(\\quot\\.csv\\quot\\\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(n1>=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=substring(sFtpFilename\\comma\\0\\comma\\n1\\plus\\4)//tab////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\sFtpFilename=\\quot\\\\plus\\sFtpFilename)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////get the local filename and archived filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\invoices\\\quot\\\\plus\\sFtpFilename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalArchiveFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\invoices\archive\\\quot\\\\plus\\sFtpFilename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\LocalFilename=\\quot\\\\plus\\sLocalFilename\\plus\\\\quot\\ Exists: \\quot\\\\plus\\fileExists(sLocalFilename)\\plus\\\\quot\\ Size: \\quot\\\\plus\\fileSize(sLocalFilename)\\plus\\\\quot\\ Modified: \\quot\\\\plus\\fileModified(sLocalFilename))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\LocalArchiveFilename=\\quot\\\\plus\\sLocalArchiveFilename\\plus\\\\quot\\ Exists: \\quot\\\\plus\\fileExists(sLocalArchiveFilename)\\plus\\\\quot\\ Size: \\quot\\\\plus\\fileSize(sLocalArchiveFilename)\\plus\\\\quot\\ Modified: \\quot\\\\plus\\fileModified(sLocalArchiveFilename))//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////see if the file already exists//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=false//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((fileExists(sLocalFilename)) and (fileSize(sLocalFilename)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=true//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//elseif((fileExists(sLocalArchiveFilename)) and (fileSize(sLocalArchiveFilename)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=true//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////download the file if it doesn\\apos\\t already exist//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(bExists))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpRetrieveFile(ftp\\comma\\sLocalFilename\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Retr \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExist=fileExists(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//iSize=fileSize(sLocalFilename)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////delete the file from the ftp server//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((bExist) and (iSize>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(bEDIDelete)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDeleteFile(ftp\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Delete \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDeleted\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDownload\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: File download failed.  Exists: \\quot\\\\plus\\bExist\\plus\\\\quot\\ Size: \\quot\\\\plus\\iSize)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(bExist)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//fileDelete(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cError\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////special handling for obw89i6vv.  They receive invoices for the store //crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////and catering.  Delete the catering invoices.//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(getToken(\\quot\\AspectHashID\\quot\\)=\\quot\\obw89i6vv\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Special handling for obw89i6vv\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\sLocalFilename=\\quot\\\\plus\\sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(pos(\\quot\\011_00552950\\quot\\\\comma\\sLocalFilename)>=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//fileDelete(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Deleted \\quot\\\\plus\\sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////update the time that an invoice was last downloaded//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Received\\quot\\\\comma\\r\\comma\\now())//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cError\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\File already exists: \\quot\\\\plus\\sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(bEDIDelete)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDeleteFile(ftp\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Delete \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDeleted\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cSkipped\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: Invalid filename: \\quot\\\\plus\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//n\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endwhile//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////disconnect//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDisconnect(ftp)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Disconnect: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////return an error.  Could not change to directory//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//ftpDisconnect(ftp)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//return(\\quot\\Error: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////return an error.  Could not connect//crlf////tab////tab////tab////tab////tab////tab////tab////tab//return(\\quot\\Error: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: MissingFTP credentials for StoreID=\\quot\\\\plus\\sStoreID)//crlf////tab////tab////tab////tab////tab////tab////tab//cCredentialError\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Could not locate vendor with Sysco EDI informaiton\\quot\\)//crlf////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//driverClose(dVendor)//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//nStore\\plus\\\\plus\\//crlf////tab////tab////tab//endwhile//crlf////crlf////tab////tab////tab//driverClose(dStore)//crlf////crlf////tab////tab////tab//if(cProcessed=0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: No Sysco vendors found for any stores\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//if(cCredentialErrpr?0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing FTP credentials for \\quot\\\\plus\\cCredentialErrpr\\plus\\\\quot\\ stores\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//return(\\quot\\Ok: Downloaded \\quot\\\\plus\\cDownload\\plus\\\\quot\\ invoices.  Skipped \\quot\\\\plus\\cSkipped\\plus\\\\quot\\ invoices already downloaded\\quot\\)//crlf////crlf////tab////tab////tab//return(\\quot\\Ok\\quot\\)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf//^
ID=debug_console|X=300|Y=125|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=debug_console|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=570024|X=300|Y=125|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStart|X=151|Y=40|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentStart|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=757443|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=true|AgentReport=onchange|AgentReportTo={AspectServerHashID}|^
ID=409056|X=151|Y=484|W=119|H=45|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=result|AgentNodeActionReturnValue=|AgentNodeComment=Ok|AgentNodeTermType=0|^
ID=AgentTabs|X=151|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStart');agentSetVisible(true)\\quot\\>Agent</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentDescription');agentSetVisible(false)\\quot\\>Description</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStatus');agentSetVisible(false)\\quot\\>Status</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentScript');agentSetVisible(false)\\quot\\>Script</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'ScriptText');agentSetVisible(false)\\quot\\>Script (Text)</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentChart');agentSetVisible(false);agentFormatNodes(document.getElementById('AgentChart'));agentDrawConnectors(document.getElementById('AgentChart'))\\quot\\>Chart</span></td>//crlf////tab//</tr>//crlf//</table>//crlf//^
ID=AgentScript|X=151|Y=40|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<conditional expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//<!include type:script; name:\\quot\\agent_Download Sysco Invoice\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Sysco Invoice\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 01-04-2018 19:05:39//crlf////crlf////tab////tab////Force reporting when the agent is executed manually//crlf////tab////tab//bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\) or (false))//crlf////crlf////tab////tab////Record the starting time//crlf////tab////tab//tAgentStart=now()//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Sysco Invoice\\comma\\AgentAction\\comma\\757443\\comma\\0\\comma\\Download Sysco Invoices//crlf////crlf////tab////tab////Download Sysco Invoices//crlf////tab////tab//result=execAgentAction(\\quot\\downloadSyscoInvoices\\quot\\)//crlf////tab////tab//appendToLog(\\quot\\downloadSyscoInvoices ()=\\quot\\+left(result\\comma\\128))//crlf////crlf////tab////tab////Result Ok?//crlf////tab////tab//appendToLog(\\quot\\(startsWith(result\\comma\\'ok'))=\\quot\\+(startsWith(result\\comma\\\\quot\\ok\\quot\\)))//crlf////tab////tab//if(startsWith(result\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Sysco Invoice\\comma\\AgentTerminate\\comma\\409056\\comma\\0\\comma\\Ok//crlf////tab////tab////tab//agentReportStatus(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Download Sysco Invoice\\quot\\\\comma\\\\quot\\409056\\quot\\\\comma\\0\\comma\\{AspectServerHashID}\\comma\\\\quot\\Ok\\quot\\\\comma\\result\\comma\\bForceReport\\comma\\now()-tAgentStart\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Sysco Invoice\\comma\\AgentTerminate\\comma\\937990\\comma\\2\\comma\\Error//crlf////tab////tab////tab//agentReportStatus(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Download Sysco Invoice\\quot\\\\comma\\\\quot\\937990\\quot\\\\comma\\2\\comma\\{AspectServerHashID}\\comma\\\\quot\\Error\\quot\\\\comma\\result\\comma\\bForceReport\\comma\\now()-tAgentStart\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//endif//crlf////tab//\\quot\\>//crlf//</conditional>^
ID=ScriptText|X=151|Y=40|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<span style='font:8pt tahoma;color:black'>//amp//lt;state//amp//gt;01042018//amp//nbsp;190539//amp//lt;/state//amp//gt;<br>//amp//lt;<span class='includecontrol'>conditional</span>//amp//nbsp;expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)//amp//gt;<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//lt;!<span class='includecontrol'>include</span>//amp//nbsp;type:script;//amp//nbsp;name:\\quot\\agent_Download//amp//nbsp;Sysco//amp//nbsp;Invoice\\quot\\;//amp//nbsp;commands:\\quot\\<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Created//amp//nbsp;01-04-2018//amp//nbsp;19:05:39</span><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Force//amp//nbsp;reporting//amp//nbsp;when//amp//nbsp;the//amp//nbsp;agent//amp//nbsp;is//amp//nbsp;executed//amp//nbsp;manually</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\)//amp//nbsp;or//amp//nbsp;(false))<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Record//amp//nbsp;the//amp//nbsp;starting//amp//nbsp;time</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;tAgentStart=<span class='keyword'>now</span>()<br><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Download//amp//nbsp;Sysco//amp//nbsp;Invoices</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;result=<span class='keyword'>execAgentAction</span>(\\quot\\downloadSyscoInvoices\\quot\\)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>appendToLog</span>(\\quot\\downloadSyscoInvoices//amp//nbsp;()=\\quot\\+<span class='keyword'>left</span>(result\\comma\\128))<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Result//amp//nbsp;Ok?</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>appendToLog</span>(\\quot\\(<span class='keyword'>startsWith</span>(result\\comma\\'ok'))=\\quot\\+(<span class='keyword'>startsWith</span>(result\\comma\\\\quot\\ok\\quot\\)))<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'><span class='keyword'>if</span>(</span><span class='keyword'>startsWith</span>(result\\comma\\\\quot\\ok\\quot\\))<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>agentReportStatus</span>(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Download//amp//nbsp;Sysco//amp//nbsp;Invoice\\quot\\\\comma\\\\quot\\409056\\quot\\\\comma\\0\\comma\\{AspectServerHashID}\\comma\\\\quot\\Ok\\quot\\\\comma\\result\\comma\\bForceReport\\comma\\<span class='keyword'>now</span>()-tAgentStart\\comma\\\\quot\\\\quot\\)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>else</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>agentReportStatus</span>(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Download//amp//nbsp;Sysco//amp//nbsp;Invoice\\quot\\\\comma\\\\quot\\937990\\quot\\\\comma\\2\\comma\\{AspectServerHashID}\\comma\\\\quot\\Error\\quot\\\\comma\\result\\comma\\bForceReport\\comma\\<span class='keyword'>now</span>()-tAgentStart\\comma\\\\quot\\\\quot\\)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>endif</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;\\quot\\//amp//gt;<br>//amp//lt;/<span class='includecontrol'>conditional</span>//amp//gt;<br><br></span>^
ID=AgentDescription|X=151|Y=40|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStatus|X=151|Y=40|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentChart|X=151|Y=40|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>01042018 190539</state>//crlf//<canvas id=\\quot\\agent_doc_canvas\\quot\\ width=\\quot\\100\\quot\\ height=\\quot\\100\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 100px; height: 100px; border-style: none; z-index: 2;\\quot\\></canvas><div id=\\quot\\chartAgentStart\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart757443\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\137\\quot\\ style=\\quot\\width: 120px; height: 137px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Download Sysco Invoice</b><br><span style=\\quot\\font-weight:normal;color:green\\quot\\>Active</span><br><span style=\\quot\\font-weight:normal;color:black\\quot\\>Debugging Is On</span><br>Report Status: onchange<br>Report To: {AspectServerHashID}<br>Name Params: </div></div><div id=\\quot\\chart409056\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 439px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Ok<hr><span style=\\quot\\color:green\\quot\\>Success</span></div></div><div id=\\quot\\chart757443\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart231456\\quot\\ style=\\quot\\position: absolute; top: 189px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\95\\quot\\ style=\\quot\\width: 150px; height: 82px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentaction\\quot\\>Download Sysco Invoices<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>downloadSyscoInvoices<br></td></tr><tr><td><u>Return</u></td><td>result</td></tr></tbody></table></div></div><div id=\\quot\\chart231456\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart409056\\quot\\ agentchildnonode=\\quot\\chart937990\\quot\\ style=\\quot\\position: absolute; top: 323px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\64\\quot\\ style=\\quot\\width: 150px; height: 64px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentdecision\\quot\\>Result Ok?<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Sensor</u></td><td>Expression<br></td></tr></tbody></table></div></div><div id=\\quot\\chart937990\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 323px; left: 190px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Error<hr><span style=\\quot\\color:black\\quot\\>Other</span></div></div>^
ID=757443|X=151|Y=234|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentAction|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=231456|AgentChildNoNode=|AgentSensor=|AgentAction=downloadSyscoInvoices|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=result|AgentNodeComment=Download Sysco Invoices|AgentNodeTermType=|^
ID=231456|X=151|Y=368|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentDecision|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=409056|AgentChildNoNode=937990|AgentSensor=1|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=startsWith(result//comma//\\quot\\ok\\quot\\)|AgentNodeActionReturnValue=|AgentNodeComment=Result Ok?|AgentNodeTermType=|^
ID=937990|X=341|Y=368|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=result|AgentNodeActionReturnValue=|AgentNodeComment=Error|AgentNodeTermType=|
</widget><widget name="Download GFS Invoice" group="Inventory" category="Invoice Downloads" description="Downloads invoices to a customer's computer from GFS. 
 Includes an agent action to process a GFS invoice into a readable file." type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Download Gfs Invoice" modified="11-10-2019 14:16:10" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=03-08-2019 00:00:00:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=0 TaskMinutesBetweenExecution=1 TaskSecondsBetweenExecution=0 TaskExecuteSun=true TaskExecuteMon=true TaskExecuteTue=true TaskExecuteWed=true TaskExecuteThu=true TaskExecuteFri=true TaskExecuteSat=true TaskConditional_Expression="(getToken(\\quote\\POSInterface_StoreID\\quote\\)\\lt\\\\gt\\\\quote\\Undefined\\quote\\) and (len(lookup(Aspect_BackOffice_Vendor_ID_by_EDI_Selection,\\quote\\Gordon\\quote\\,0,\\quote\\StoreID=\\quote\\+getToken(\\quote\\POSInterface_StoreID\\quote\\)))\\gt\\0)" TaskConditional_Expression_Description="Executes when GFS EDI information is defined for a vendor in the store with the pos interface enabled" TaskState_Function="hour(now())+gfs(replaceSubstring(getSetFor(getCollection(Aspect_BackOffice_Store_Directory_By_ID,true,\\quote\\\\quote\\,\\quote\\\\quote\\,\\quote\\,\\quote\\,\\quote\\value\\quote\\),\\quote\\vendor.bin\\quote\\),char(0x2C),char(0x3B)))+getToken(\\quote\\POSInterface_StoreID\\quote\\)" TaskState_Expression_Description="Executes when the hour changes, when a vendor file is updated and when the ID of the store with the pos interface enabled changes." TaskWidgetParams="" TaskWindowForExecution=0>
Preferences|toolboxx=57|toolboxy=208|aspectfuncx=100|aspectfuncy=100|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=false|aspectfuncVisible=false|PublishFtpFilename=Download GFS Invoice.html|PublishToFtpSite=false|PublishFTPAccount=0|PublishFtpDirectory=/|PublishFtpPublicDirectory=/|PublishCopyFile=false|PublishCopyFilename=|PublishWysiwig=false|PublishIncludeAspectScript=false|PublishIncludeAspectStyleshet=false|PublishAsText=false|^
ID=top_bar|X=0|Y=0|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=left_bar|X=0|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=|AlignLeft=top_bar|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=code|X=300|Y=100|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'224686')\\quot\\>Javascript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'AspectScript')\\quot\\>AspectScript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'sensor_list')\\quot\\>Sensors</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'action_list')\\quot\\>Actions</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'debug_console')\\quot\\>Console</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'859049')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=224686|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Javascript|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AspectScript|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=sensor_list|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__SensorExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download GFS Invoice.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__sensor_list__\\quot\\=\\quot\\true\\quot\\)>//crlf//</conditional>//crlf////crlf//^
ID=action_list|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=Aspect_Script|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\cache~~backslash~~WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download GFS Invoice.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Download GFS Invoice\\comma\\downloadGFSInvoices\\comma\\action_list\\comma\\Action=downloadGFSInvoices\\comma\\private//crlf////tab//Download GFS Invoice\\comma\\processGFSInvoice\\comma\\action_list\\comma\\Action=processGFSInvoice\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//downloadGFSInvoices//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadGFSInvoices\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads any new invoices from the Gordons FTP site.  Invoices are downloaded to the //crlf////tab////tab//[homedir]invoices directory.  An invoice will not be downloaded if it already exists //crlf////tab////tab//in the [homedir]invoices or [homedir]invoices~~backslash~~archive directory.  Invoices are downloaded//crlf////tab////tab//for the store with the ID matching the token POSInterface_StoreID which is set by the //crlf////tab////tab//POS Interface agent.  This means that the pos interface must be enabled for a store to //crlf////tab////tab//download invoices.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//None//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Ok or Error//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\downloadGFSInvoices\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Download Gordons Invoices\\quot\\)//crlf////crlf////tab////tab////tab////abort if POSInterface_StoreID if blank or equals Undefined//crlf////tab////tab////tab//if(getToken(\\quot\\AspectHashID\\quot\\)<>\\quot\\4idczse69\\quot\\)//crlf////tab////tab////tab////tab//s=getToken(\\quot\\POSInterface_StoreID\\quot\\)//crlf////tab////tab////tab////tab//if((len(s)=0) or (s=\\quot\\Undefined\\quot\\))//crlf////tab////tab////tab////tab////tab//return(\\quot\\Error: Aborting because no store has POS interface enabled\\quot\\)//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////open the store driver//crlf////tab////tab////tab//driverOpen(Aspect_BackOffice_Store\\comma\\dStore\\comma\\WRITE)\\comma\\//crlf////tab////tab////tab//driverSetFilter(dStore\\comma\\\\quot\\true\\quot\\\\comma\\true)//crlf////crlf////tab////tab////tab//cProcessed=0//crlf////tab////tab////tab//cDownload=0//crlf////tab////tab////tab//cError=0//crlf////tab////tab////tab//cSkipped=0//crlf////tab////tab////tab//cDeleted=0//crlf////tab////tab////tab//cCredentialError=0//crlf////tab////tab////tab//cStore=driverGetRecordCount(dStore)//crlf////tab////tab////tab//nStore=0//crlf////tab////tab////tab//while(nStore<cStore)//crlf////tab////tab////tab////tab//sStoreID=driverGetField(dStore\\comma\\\\quot\\ID\\quot\\\\comma\\nStore)//crlf////tab////tab////tab////tab////For testing: //crlf////tab////tab////tab////tab////Halls On The River: Ak85zY9qXtSZpYaVTw2gWGtC//crlf////tab////tab////tab////tab////Troll Pub - Under the Bridge: Egdgpsa0JYzUTHyeVDEGbeAz//crlf////tab////tab////tab////tab//if((sStoreID=getToken(\\quot\\POSInterface_StoreID\\quot\\)) or (sStoreID=\\quot\\Egdgpsa0JYzUTHyeVDEGbeAz\\quot\\))//crlf////tab////tab////tab////tab////tab//sStoreName=driverGetField(dStore\\comma\\\\quot\\Store_Name\\quot\\\\comma\\nStore)//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Downloading Gordons invoices for \\quot\\\\plus\\sStoreName)//crlf////crlf////tab////tab////tab////tab////tab////open the vendor driver for the store//crlf////tab////tab////tab////tab////tab//driverOpen(Aspect_Back_Office_Vendor\\comma\\dVendor\\comma\\WRITE\\comma\\false\\comma\\\\quot\\StoreID=\\quot\\\\plus\\sStoreID)//crlf////tab////tab////tab////tab////tab//r=driverFindRecordAbsolute(dVendor\\comma\\0\\comma\\\\quot\\EDI_Vendor=\\quot\\\\plus\\quote(\\quot\\Gordon\\quot\\))//crlf////tab////tab////tab////tab////tab//if(r>=0)//crlf////tab////tab////tab////tab////tab////tab////increment the number of vendor records processed//crlf////tab////tab////tab////tab////tab////tab//cProcessed\\plus\\\\plus\\//crlf////crlf////tab////tab////tab////tab////tab////tab//sVendorID=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\ID\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sVendorName=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\Name\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Ftp_Site\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sEDIUserName=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_UserName\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sEDIPassword=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Password\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sEDICustomerNumber=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Customer_Number\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//bEDIDelete=true//crlf////crlf////tab////tab////tab////tab////tab////tab////update the time that a check was last made to download invoices //crlf////tab////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Check\\quot\\\\comma\\r\\comma\\now())//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Verify time last checked=\\quot\\\\plus\\driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Check\\quot\\\\comma\\r))//crlf////crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Downloading invoices for vendor: \\quot\\\\plus\\sVendorName\\plus\\\\quot\\ ID: \\quot\\\\plus\\sVendorID)//crlf////crlf////tab////tab////tab////tab////tab////tab//remove ftp:// and other slashes from host name//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\ftp:\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\~~backslash~~\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////crlf////tab////tab////tab////tab////tab////tab//if((len(sEDIFtpSite)>0) and (len(sEDIUserName)>0) and (len(sEDIPassword)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////connect to ftp server//crlf////tab////tab////tab////tab////tab////tab////tab//s=ftpConnect(ftp\\comma\\sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\true)//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Connect to \\quot\\\\plus\\sEDIFtpSite\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////change directory to /OUT//crlf////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpChangeDir(ftp\\comma\\\\quot\\/\\quot\\\\plus\\sEDICustomerNumber)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\chdir to /\\quot\\\\plus\\sEDICustomerNumber\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////get file list//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//arFiles=ftpListFiles(ftp)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//cFilesOnServer=getElementCount(arFiles\\comma\\char(10))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(cFilesOnServer=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\No files on server\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////download the files//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//n=0//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//while(n<cFilesOnServer)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////get the filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=getElement(arFiles\\comma\\n\\comma\\char(10))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\sFtpFilename1=\\quot\\\\plus\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////the filename includes the size and time.  Get only the filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//n1=pos(\\quot\\.\\quot\\\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(n1>=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=substring(sFtpFilename\\comma\\0\\comma\\n1\\plus\\4)//tab////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\sFtpFilename2=\\quot\\\\plus\\sFtpFilename)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////get the local filename and archived filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\invoices~~backslash~~\\quot\\\\plus\\sFtpFilename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalArchiveFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\invoices~~backslash~~archive~~backslash~~\\quot\\\\plus\\sFtpFilename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\LocalFilename=\\quot\\\\plus\\sLocalFilename\\plus\\\\quot\\ Exists: \\quot\\\\plus\\fileExists(sLocalFilename)\\plus\\\\quot\\ Size: \\quot\\\\plus\\fileSize(sLocalFilename)\\plus\\\\quot\\ Modified: \\quot\\\\plus\\fileModified(sLocalFilename))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\LocalArchiveFilename=\\quot\\\\plus\\sLocalArchiveFilename\\plus\\\\quot\\ Exists: \\quot\\\\plus\\fileExists(sLocalArchiveFilename)\\plus\\\\quot\\ Size: \\quot\\\\plus\\fileSize(sLocalArchiveFilename)\\plus\\\\quot\\ Modified: \\quot\\\\plus\\fileModified(sLocalArchiveFilename))//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////see if the file already exists//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=false//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((fileExists(sLocalFilename)) and (fileSize(sLocalFilename)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=true//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//elseif((fileExists(sLocalArchiveFilename)) and (fileSize(sLocalArchiveFilename)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=true//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////download the file if it doesn\\apos\\t already exist//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(bExists))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpRetrieveFile(ftp\\comma\\sLocalFilename\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Retr \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExist=fileExists(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//iSize=fileSize(sLocalFilename)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////delete the file from the ftp server//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((bExist) and (iSize>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(bEDIDelete)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDeleteFile(ftp\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Delete \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDeleted\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDownload\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: File download failed.  Exists: \\quot\\\\plus\\bExist\\plus\\\\quot\\ Size: \\quot\\\\plus\\iSize)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(bExist)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//fileDelete(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cError\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////update the time that an invoice was last downloaded//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Received\\quot\\\\comma\\r\\comma\\now())//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cError\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\File already exists: \\quot\\\\plus\\sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(bEDIDelete)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDeleteFile(ftp\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Delete \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDeleted\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cSkipped\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: Invalid filename: \\quot\\\\plus\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//n\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endwhile//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////disconnect//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDisconnect(ftp)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Disconnect: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////return an error.  Could not change to directory//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//ftpDisconnect(ftp)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//return(\\quot\\Error: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////return an error.  Could not connect//crlf////tab////tab////tab////tab////tab////tab////tab////tab//return(\\quot\\Error: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: MissingFTP credentials for StoreID=\\quot\\\\plus\\sStoreID)//crlf////tab////tab////tab////tab////tab////tab////tab//cCredentialError\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Could not locate vendor with Gordons EDI informaiton\\quot\\)//crlf////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//driverClose(dVendor)//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//nStore\\plus\\\\plus\\//crlf////tab////tab////tab//endwhile//crlf////crlf////tab////tab////tab//driverClose(dStore)//crlf////crlf////tab////tab////tab//if(cProcessed=0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: No Gordons vendors found for any stores\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//if(cCredentialErrpr?0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing FTP credentials for \\quot\\\\plus\\cCredentialErrpr\\plus\\\\quot\\ stores\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//return(\\quot\\Ok: Downloaded \\quot\\\\plus\\cDownload\\plus\\\\quot\\ invoices.  Skipped \\quot\\\\plus\\cSkipped\\plus\\\\quot\\ invoices already downloaded\\quot\\)//crlf////crlf////tab////tab////tab//return(\\quot\\Ok\\quot\\)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//processGFSInvoice//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\processGFSInvoice\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Processes a GFS text file into a readable table.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//InputFilename - Name of the input file//crlf////tab////tab//OutputFilename - Name of the output file//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Ok or Error//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\processGFSInvoice\\quot\\; commands:\\quot\\//crlf////tab////tab////tab////abort if missing InputFilename//crlf////tab////tab////tab//if(undefined(\\quot\\__InputFilename__\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing InpuFilename\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////abort if missing OutputFilename//crlf////tab////tab////tab//if(undefined(\\quot\\__OutputFilename__\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing OutputFilename\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////abort if the input file does not exist//crlf////tab////tab////tab//if(not(fileExists(\\quot\\__InputFilename__\\quot\\)))//crlf////tab////tab////tab////tab//return(\\quot\\Error: File does not exist: __InputFilename__\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////get the input//crlf////tab////tab////tab//sAllInput=fileGetContent(\\quot\\__InputFilename__\\quot\\)//crlf////crlf////tab////tab////tab////initialize the final output//crlf////tab////tab////tab//sFinalOutput=\\quot\\\\quot\\//crlf////crlf////tab////tab////tab////get rid of any quotes//crlf////tab////tab////tab//sAllInput=replaceSubstring(sAllInput\\comma\\char(0x22)\\comma\\char(0x27))//crlf////crlf////tab////tab////tab////replace ~BIG with ~~backslash~~nBIG so the file can be broken down into separate invoices.  BIG//crlf////tab////tab////tab////indicates the start of an invoice//crlf////tab////tab////tab//sAllInput=replaceSubstring(sAllInput\\comma\\\\quot\\~BIG\\quot\\\\comma\\char(10)\\plus\\\\quot\\BIG\\quot\\)//crlf////crlf////tab////tab////tab//cBIG=getElementCount(sAllInput\\comma\\char(10))//crlf////tab////tab////tab//nBIG=0//crlf////tab////tab////tab//while(nBIG<cBIG)//crlf////tab////tab////tab////tab//sInput=getElement(sAllInput\\comma\\nBIG\\comma\\char(10))//crlf////tab////tab////tab////tab//if(startsWith(sInput\\comma\\\\quot\\BIG\\quot\\))//crlf////tab////tab////tab////tab////tab////Line looks like this: BIG~~pipe~~20190924~~pipe~~197256524~~pipe~~~~pipe~~~~pipe~~~~pipe~~~~pipe~~DI~//crlf////tab////tab////tab////tab////tab//sInvoiceDate=getElement(sInput\\comma\\1\\comma\\\\quot\\~~pipe~~\\quot\\)//crlf////tab////tab////tab////tab////tab//sInvoiceNumber=getElement(sInput\\comma\\2\\comma\\\\quot\\~~pipe~~\\quot\\)//crlf////tab////tab////tab////tab////tab//bIsCredit=startsWith(trim(getElement(sInput\\comma\\7\\comma\\\\quot\\~~pipe~~\\quot\\))\\comma\\\\quot\\CR\\quot\\)//crlf////crlf////tab////tab////tab////tab////tab////replace ~IT1 with ~~backslash~~nitm so the file can be broken into a series of records\\comma\\ all starting //crlf////tab////tab////tab////tab////tab////with IT1//crlf////tab////tab////tab////tab////tab//sInput=replaceSubstring(sInput\\comma\\\\quot\\~IT1\\quot\\\\comma\\char(10)\\plus\\\\quot\\IT1\\quot\\)//crlf////crlf////tab////tab////tab////tab////tab////initialize the output//crlf////tab////tab////tab////tab////tab//sOutput=\\quot\\\\quot\\//crlf////crlf////tab////tab////tab////tab////tab//c=getElementCount(sInput\\comma\\char(10))//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Processing GFS invoice (\\quot\\\\plus\\c\\plus\\\\quot\\ records)\\quot\\)//crlf////tab////tab////tab////tab////tab//n=0//crlf////tab////tab////tab////tab////tab//while(n<c)//crlf////tab////tab////tab////tab////tab////tab//sLine=getElement(sInput\\comma\\n\\comma\\char(10))//crlf////tab////tab////tab////tab////tab////tab//if(startsWith(sLine\\comma\\\\quot\\IT1\\quot\\))//crlf////tab////tab////tab////tab////tab////tab////tab////initialize new output line//crlf////tab////tab////tab////tab////tab////tab////tab//sNewLine=\\quot\\\\quot\\//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////each record will be delimited with ~//crlf////tab////tab////tab////tab////tab////tab////tab//cField=getElementCount(sLine\\comma\\\\quot\\~\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab//sTXI=\\quot\\TXI~~pipe~~~~pipe~~~~pipe~~0.00\\quot\\//crlf////tab////tab////tab////tab////tab////tab////tab//nField=0//crlf////tab////tab////tab////tab////tab////tab////tab//bEndOfInvoice=false//crlf////tab////tab////tab////tab////tab////tab////tab//while((nField<cField) and (not(bEndOfInvoice)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab//sField=getElement(sLine\\comma\\nField\\comma\\\\quot\\~\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//if(startsWith(sField\\comma\\\\quot\\TXI\\quot\\))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//sTXI=sField//crlf////tab////tab////tab////tab////tab////tab////tab////tab//elseif((startsWith(sField\\comma\\\\quot\\IT1\\quot\\)) or (startsWith(sField\\comma\\\\quot\\CTP\\quot\\)) or (startsWith(sField\\comma\\\\quot\\PID\\quot\\)) or (startsWith(sField\\comma\\\\quot\\PO4\\quot\\)) or (startsWith(sField\\comma\\\\quot\\REF\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(len(sNewLine)>0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sNewLine=sNewLine\\plus\\\\quot\\~~pipe~~\\quot\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//sNewLine=sNewLine\\plus\\sField//crlf////tab////tab////tab////tab////tab////tab////tab////tab//elseif(startsWith(sField\\comma\\\\quot\\TDS\\quot\\))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//bEndOfInvoice=true//crlf////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab//nField\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab//endwhile//crlf////tab////tab////tab////tab////tab////tab////tab//sNewLine=sNewLine\\plus\\\\quot\\~~pipe~~\\quot\\\\plus\\sTXI//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////add the invoice date and number//crlf////tab////tab////tab////tab////tab////tab////tab//sNewLine=sNewLine\\plus\\\\quot\\~~pipe~~\\quot\\\\plus\\sInvoiceDate\\plus\\\\quot\\~~pipe~~\\quot\\\\plus\\sInvoiceNumber//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////indicate if it\\apos\\s a credit invoice//crlf////tab////tab////tab////tab////tab////tab////tab//sNewLine=sNewLine\\plus\\\\quot\\~~pipe~~\\quot\\\\plus\\if(bIsCredit\\comma\\\\quot\\true\\quot\\\\comma\\\\quot\\false\\quot\\)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab//if(len(sOutput)>0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//sOutput=sOutput\\plus\\char(13)\\plus\\char(10)//crlf////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab//sOutput=sOutput\\plus\\sNewLine//crlf////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab//n\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab//endwhile//crlf////crlf////tab////tab////tab////tab////tab//if(len(sFinalOutput)>0)//crlf////tab////tab////tab////tab////tab////tab//sFinalOutput=sFinalOutput\\plus\\char(13)\\plus\\char(10)//crlf////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//sFinalOutput=sFinalOutput\\plus\\sOutput//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//nBIG\\plus\\\\plus\\//crlf////tab////tab////tab//endwhile//crlf////tab////crlf////tab////tab////tab//fileWriteContent(\\quot\\__OutputFilename__\\quot\\\\comma\\sFinalOutput)//crlf////tab////tab////tab//return(\\quot\\ok\\quot\\)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//This is the original processGFSInvoice script.  It was modified 11/8/2019 //crlf//to include the invoice date and number.  This allows for handling multiple //crlf//invoices in a single file.//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:false>//crlf////crlf////tab////tab////tab////abort if missing InputFilename//crlf////tab////tab////tab//if(undefined(\\quot\\__InputFilename__\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing InpuFilename\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////abort if missing OutputFilename//crlf////tab////tab////tab//if(undefined(\\quot\\__OutputFilename__\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing OutputFilename\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////abort if the input file does not exist//crlf////tab////tab////tab//if(not(fileExists(\\quot\\__InputFilename__\\quot\\)))//crlf////tab////tab////tab////tab//return(\\quot\\Error: File does not exist: __InputFilename__\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////get the input//crlf////tab////tab////tab//sInput=fileGetContent(\\quot\\__InputFilename__\\quot\\)//crlf////crlf////tab////tab////tab////replace ~IT1 with ~~backslash~~nitm so the file can be broken into a series of records\\comma\\ all starting //crlf////tab////tab////tab////with IT1//crlf////tab////tab////tab//sInput=replaceSubstring(sInput\\comma\\\\quot\\~IT1\\quot\\\\comma\\char(10)\\plus\\\\quot\\IT1\\quot\\)//crlf////crlf////tab////tab////tab////get rid of any quotes//crlf////tab////tab////tab//sInput=replaceSubstring(sInput\\comma\\char(0x22)\\comma\\char(0x27))//crlf////crlf////tab////tab////tab////initialize the output//crlf////tab////tab////tab//sOutput=\\quot\\\\quot\\//crlf////crlf////tab////tab////tab//c=getElementCount(sInput\\comma\\char(10))//crlf////tab////tab////tab//appendToLog(\\quot\\Processing GFS invoice (\\quot\\\\plus\\c\\plus\\\\quot\\ records)\\quot\\)//crlf////tab////tab////tab//n=0//crlf////tab////tab////tab//while(n<c)//crlf////tab////tab////tab////tab//sLine=getElement(sInput\\comma\\n\\comma\\char(10))//crlf////tab////tab////tab////tab//if(startsWith(sLine\\comma\\\\quot\\IT1\\quot\\))//crlf////tab////tab////tab////tab////tab////initialize new output line//crlf////tab////tab////tab////tab////tab//sNewLine=\\quot\\\\quot\\//crlf////crlf////tab////tab////tab////tab////tab////each record will be delimited with ~//crlf////tab////tab////tab////tab////tab//cField=getElementCount(sLine\\comma\\\\quot\\~\\quot\\)//crlf////tab////tab////tab////tab////tab//sTXI=\\quot\\\\quot\\//crlf////tab////tab////tab////tab////tab//nField=0//crlf////tab////tab////tab////tab////tab//while(nField<cField)//crlf////tab////tab////tab////tab////tab////tab//sField=getElement(sLine\\comma\\nField\\comma\\\\quot\\~\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//if(startsWith(sField\\comma\\\\quot\\TXI\\quot\\))//crlf////tab////tab////tab////tab////tab////tab////tab//sTXI=sField//crlf////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab//if(len(sNewLine)>0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//sNewLine=sNewLine\\plus\\\\quot\\~~pipe~~\\quot\\//crlf////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab//sNewLine=sNewLine\\plus\\sField//crlf////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab//nField\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab//endwhile//crlf////tab////tab////tab////tab////tab//sNewLine=sNewLine\\plus\\\\quot\\~~pipe~~\\quot\\\\plus\\sTXI//crlf////crlf////tab////tab////tab////tab////tab//if(len(sOutput)>0)//crlf////tab////tab////tab////tab////tab////tab//sOutput=sOutput\\plus\\char(13)\\plus\\char(10)//crlf////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//sOutput=sOutput\\plus\\sNewLine//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//n\\plus\\\\plus\\//crlf////tab////tab////tab//endwhile//crlf////tab////crlf////tab////tab////tab//fileWriteContent(\\quot\\__OutputFilename__\\quot\\\\comma\\sOutput)//crlf////tab////tab////tab//return(\\quot\\ok\\quot\\)//crlf//</conditional>//crlf////crlf//^
ID=debug_console|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=debug_console|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=859049|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStart|X=183|Y=41|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentStart|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=353985|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=true|AgentReport=onchange|AgentReportTo={AspectServerHashID}|^
ID=732655|X=183|Y=493|W=119|H=45|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=result|AgentNodeActionReturnValue=|AgentNodeComment=ok|AgentNodeTermType=0|^
ID=AgentTabs|X=183|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStart');agentSetVisible(true)\\quot\\>Agent</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentDescription');agentSetVisible(false)\\quot\\>Description</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStatus');agentSetVisible(false)\\quot\\>Status</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentScript');agentSetVisible(false)\\quot\\>Script</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'ScriptText');agentSetVisible(false)\\quot\\>Script (Text)</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentChart');agentSetVisible(false);agentFormatNodes(document.getElementById('AgentChart'));agentDrawConnectors(document.getElementById('AgentChart'))\\quot\\>Chart</span></td>//crlf////tab//</tr>//crlf//</table>//crlf//^
ID=AgentScript|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<conditional expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//<!include type:script; name:\\quot\\agent_Download GFS Invoice\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download GFS Invoice\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 09-11-2019 20:54:07//crlf////crlf////tab////tab////Force reporting when the agent is executed manually//crlf////tab////tab//bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\) or (false))//crlf////crlf////tab////tab////Record the starting time//crlf////tab////tab//tAgentStart=now()//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download GFS Invoice\\comma\\AgentAction\\comma\\353985\\comma\\0\\comma\\Download Gordons Invoices//crlf////crlf////tab////tab////Download Gordons Invoices//crlf////tab////tab//result=execAgentAction(\\quot\\downloadGFSInvoices\\quot\\)//crlf////tab////tab//appendToLog(\\quot\\downloadGFSInvoices ()=\\quot\\+left(result\\comma\\128))//crlf////crlf////tab////tab////Result Ok?//crlf////tab////tab//appendToLog(\\quot\\(startsWith(result\\comma\\'ok'))=\\quot\\+(startsWith(result\\comma\\\\quot\\ok\\quot\\)))//crlf////tab////tab//if(startsWith(result\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download GFS Invoice\\comma\\AgentTerminate\\comma\\732655\\comma\\0\\comma\\ok//crlf////tab////tab////tab//agentReportStatus(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Download GFS Invoice\\quot\\\\comma\\\\quot\\732655\\quot\\\\comma\\0\\comma\\{AspectServerHashID}\\comma\\\\quot\\ok\\quot\\\\comma\\result\\comma\\bForceReport\\comma\\now()-tAgentStart\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download GFS Invoice\\comma\\AgentTerminate\\comma\\225453\\comma\\1\\comma\\Error//crlf////tab////tab////tab//agentReportStatus(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Download GFS Invoice\\quot\\\\comma\\\\quot\\225453\\quot\\\\comma\\1\\comma\\{AspectServerHashID}\\comma\\\\quot\\Error\\quot\\\\comma\\result\\comma\\bForceReport\\comma\\now()-tAgentStart\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//endif//crlf////tab//\\quot\\>//crlf//</conditional>^
ID=ScriptText|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<span style='font:8pt tahoma;color:black'>//amp//lt;state//amp//gt;09112019//amp//nbsp;205407//amp//lt;/state//amp//gt;<br>//amp//lt;<span class='includecontrol'>conditional</span>//amp//nbsp;expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)//amp//gt;<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//lt;!<span class='includecontrol'>include</span>//amp//nbsp;type:script;//amp//nbsp;name:\\quot\\agent_Download//amp//nbsp;GFS//amp//nbsp;Invoice\\quot\\;//amp//nbsp;commands:\\quot\\<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Created//amp//nbsp;09-11-2019//amp//nbsp;20:54:07</span><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Force//amp//nbsp;reporting//amp//nbsp;when//amp//nbsp;the//amp//nbsp;agent//amp//nbsp;is//amp//nbsp;executed//amp//nbsp;manually</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\)//amp//nbsp;or//amp//nbsp;(false))<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Record//amp//nbsp;the//amp//nbsp;starting//amp//nbsp;time</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;tAgentStart=<span class='keyword'>now</span>()<br><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Download//amp//nbsp;Gordons//amp//nbsp;Invoices</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;result=<span class='keyword'>execAgentAction</span>(\\quot\\downloadGFSInvoices\\quot\\)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>appendToLog</span>(\\quot\\downloadGFSInvoices//amp//nbsp;()=\\quot\\+<span class='keyword'>left</span>(result\\comma\\128))<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Result//amp//nbsp;Ok?</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>appendToLog</span>(\\quot\\(<span class='keyword'>startsWith</span>(result\\comma\\'ok'))=\\quot\\+(<span class='keyword'>startsWith</span>(result\\comma\\\\quot\\ok\\quot\\)))<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'><span class='keyword'>if</span>(</span><span class='keyword'>startsWith</span>(result\\comma\\\\quot\\ok\\quot\\))<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>agentReportStatus</span>(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Download//amp//nbsp;GFS//amp//nbsp;Invoice\\quot\\\\comma\\\\quot\\732655\\quot\\\\comma\\0\\comma\\{AspectServerHashID}\\comma\\\\quot\\ok\\quot\\\\comma\\result\\comma\\bForceReport\\comma\\<span class='keyword'>now</span>()-tAgentStart\\comma\\\\quot\\\\quot\\)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>else</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>agentReportStatus</span>(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Download//amp//nbsp;GFS//amp//nbsp;Invoice\\quot\\\\comma\\\\quot\\225453\\quot\\\\comma\\1\\comma\\{AspectServerHashID}\\comma\\\\quot\\Error\\quot\\\\comma\\result\\comma\\bForceReport\\comma\\<span class='keyword'>now</span>()-tAgentStart\\comma\\\\quot\\\\quot\\)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>endif</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;\\quot\\//amp//gt;<br>//amp//lt;/<span class='includecontrol'>conditional</span>//amp//gt;<br><br></span>^
ID=AgentDescription|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStatus|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentChart|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>09112019 205407</state>//crlf//<canvas id=\\quot\\agent_doc_canvas\\quot\\ width=\\quot\\100\\quot\\ height=\\quot\\100\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 100px; height: 100px; border-style: none; z-index: 2;\\quot\\></canvas><div id=\\quot\\chartAgentStart\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart353985\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\137\\quot\\ style=\\quot\\width: 120px; height: 137px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Download GFS Invoice</b><br><span style=\\quot\\font-weight:normal;color:green\\quot\\>Active</span><br><span style=\\quot\\font-weight:normal;color:black\\quot\\>Debugging Is On</span><br>Report Status: onchange<br>Report To: {AspectServerHashID}<br>Name Params: </div></div><div id=\\quot\\chart732655\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 452px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>ok<hr><span style=\\quot\\color:green\\quot\\>Success</span></div></div><div id=\\quot\\chart353985\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart189810\\quot\\ style=\\quot\\position: absolute; top: 189px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\95\\quot\\ style=\\quot\\width: 150px; height: 95px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentaction\\quot\\>Download Gordons Invoices<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>downloadGFSInvoices<br></td></tr><tr><td><u>Return</u></td><td>result</td></tr></tbody></table></div></div><div id=\\quot\\chart189810\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart732655\\quot\\ agentchildnonode=\\quot\\chart225453\\quot\\ style=\\quot\\position: absolute; top: 336px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\64\\quot\\ style=\\quot\\width: 150px; height: 64px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentdecision\\quot\\>Result Ok?<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Sensor</u></td><td>Expression<br></td></tr></tbody></table></div></div><div id=\\quot\\chart225453\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 336px; left: 190px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Error<hr><span style=\\quot\\color:black\\quot\\>Other</span></div></div>^
ID=353985|X=183|Y=230|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentAction|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=189810|AgentChildNoNode=|AgentSensor=|AgentAction=downloadGFSInvoices|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=result|AgentNodeComment=Download Gordons Invoices|AgentNodeTermType=|^
ID=189810|X=183|Y=377|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentDecision|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=732655|AgentChildNoNode=225453|AgentSensor=1|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=startsWith(result//comma//~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~ok~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~)|AgentNodeActionReturnValue=|AgentNodeComment=Result Ok?|AgentNodeTermType=|^
ID=225453|X=373|Y=377|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=result|AgentNodeActionReturnValue=|AgentNodeComment=Error|AgentNodeTermType=1|
</widget><widget name="Distribute PFG Invoices" group="Inventory" category="EDI" description="Sends PFG invoices to customers after they have been downloaded from the PFG ftp site by the server." type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Distribute Pfg Invoices" modified="07-02-2019 20:47:39" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=01-07-2018 00:00:00:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=3 TaskMinutesBetweenExecution=0 TaskSecondsBetweenExecution=0 TaskExecuteSun=true TaskExecuteMon=true TaskExecuteTue=true TaskExecuteWed=true TaskExecuteThu=true TaskExecuteFri=true TaskExecuteSat=true TaskConditional_Expression="isServer()" TaskConditional_Expression_Description="" TaskState_Function="" TaskState_Expression_Description="" TaskWidgetParams="" TaskWindowForExecution=0>
Preferences|toolboxx=42|toolboxy=328|aspectfuncx=100|aspectfuncy=100|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=false|aspectfuncVisible=false|PublishFtpFilename=Distribute PFG Invoices.html|PublishToFtpSite=false|PublishFTPAccount=0|PublishFtpDirectory=/|PublishFtpPublicDirectory=/|PublishCopyFile=false|PublishCopyFilename=|PublishWysiwig=false|PublishIncludeAspectScript=false|PublishIncludeAspectStyleshet=false|PublishAsText=false|^
ID=top_bar|X=0|Y=0|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=left_bar|X=0|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=|AlignLeft=top_bar|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=code|X=300|Y=100|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'6881')\\quot\\>Javascript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AspectScript')\\quot\\>AspectScript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'sensor_list')\\quot\\>Sensors</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'action_list')\\quot\\>Actions</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'395540')\\quot\\>PFG Invoices On Server</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'debug_console')\\quot\\>Console</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'468599')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=6881|X=300|Y=125|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Javascript|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AspectScript|X=300|Y=125|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=sensor_list|X=300|Y=125|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__SensorExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Distribute PFG Invoices.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__sensor_list__\\quot\\=\\quot\\true\\quot\\)>//crlf//</conditional>//crlf////crlf//^
ID=action_list|X=300|Y=125|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=Aspect_Script|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\cache~~backslash~~WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Distribute PFG Invoices.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Distribute PFG Invoices\\comma\\sendPFGNotifications\\comma\\action_list\\comma\\Action=sendPFGNotifications\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//sendPFGNotifications//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\sendPFGNotifications\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Sends notifications to any customers with a PFG invoice available//crlf////tab////tab//in the pfg_invoices/pending folder.//crlf////tab////crlf////tab////tab//The notification consists of an argument named files in the format://crlf////tab////tab//files=filename1//power//size1~~pipe~~filename2//power//size2...  The size is used to verify//crlf////tab////tab//that the file was received fully.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//None//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Ok or Error//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\sendPFGNotifications\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Send PFG notifications started.  Updated 6/17/19\\quot\\)//crlf////tab////tab////tab//tStart=now()//crlf////crlf////tab////tab////tab////open the driver used to list PFG invoices//crlf////tab////tab////tab//sDriverName=getSalt(6)//crlf////tab////tab////tab//sDriverParams=\\quot\\filespec=\\quot\\\\plus\\getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\pfg_invoices/pending/*.txt\\quot\\//crlf////tab////tab////tab//sDriverParams=sDriverParams\\plus\\\\quot\\~~pipe~~DriverID=Aspect_Support_PFG_Invoice_Dir_List~~pipe~~recurse=false~~pipe~~DriverName=\\quot\\\\plus\\sDriverName//crlf////tab////tab////tab//driverOpen(Aspect_Support_PFG_Invoice_Dir_List\\comma\\dFiles\\comma\\READ\\comma\\false\\comma\\sDriverParams)//crlf////crlf////tab////tab////tab////sort by HashID so invoices are grouped by HashID//crlf////tab////tab////tab//driverSetFilter(dFiles\\comma\\\\quot\\gt(len(HashID)\\comma\\0\\comma\\n)\\quot\\\\comma\\false)//crlf////tab////tab////tab//driverSetSort(dFiles\\comma\\\\quot\\HashID\\quot\\\\comma\\true)//crlf////tab////tab////tab//c=driverGetRecordCount(dFiles)//crlf////tab////tab////tab//appendToLog(\\quot\\There are \\quot\\\\plus\\c\\plus\\\\quot\\ pending invoices\\quot\\)//crlf////tab////tab////tab////crlf////tab////tab////tab//dtEnableCutoff=parseTime(\\quot\\02192015\\quot\\\\comma\\\\quot\\MMddyyyy\\quot\\)//crlf////tab////tab////tab//dt60DaysAgo=incrementTime(now()\\comma\\-60)//crlf////tab////tab////tab////crlf////tab////tab////tab//n=0//crlf////tab////tab////tab//sLastHashID=\\quot\\\\quot\\//crlf////tab////tab////tab//arFiles=\\quot\\\\quot\\//crlf////tab////tab////tab//cSent=0//crlf////tab////tab////tab//cExpired=0//crlf////tab////tab////tab//cNotConnected=0//crlf////crlf////tab////tab////tab//while(n<c) //crlf////tab////tab////tab////tab//sHashID=trim(driverGetField(dFiles\\comma\\\\quot\\HashID\\quot\\\\comma\\n))//crlf////tab////tab////tab////tab//if(len(sHashID)>0)//crlf////tab////tab////tab////tab////tab////send notification if moving to the next HashID//crlf////tab////tab////tab////tab////tab//if((sLastHashID<>\\quot\\\\quot\\) and (sHashID<>sLastHashID))//crlf////tab////tab////tab////tab////tab////tab//if(isDirectSocketConnected(sLastHashID)<>\\quot\\Not connected\\quot\\)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab//if(_getAllowAccess(sLastHashID))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////send a notification to execute the agent on the customer\\apos\\s computer//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Sending PFG notification to \\quot\\\\plus\\sLastHashID\\plus\\\\quot\\ Data=\\quot\\\\plus\\arFiles)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//sData=\\quot\\DocumentID=L4HxWEciR8sT7E30IKVZXD70\\amp\\Widget=Receive PFG Invoices\\amp\\ContainerItemID=AgentScript\\amp\\ExecAgentScript=true\\quot\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab//sData=sData\\plus\\\\quot\\\\amp\\FileList=\\quot\\\\plus\\arFiles//crlf////tab////tab////tab////tab////tab////tab////tab////tab//sendNotification(sLastHashID\\comma\\13\\comma\\sData\\comma\\\\quot\\\\quot\\\\comma\\10\\comma\\\\quot\\\\quot\\\\comma\\\\quot\\\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//cSent=cSent \\plus\\ 1//crlf////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Not sending PFG notification to \\quot\\\\plus\\sLastHashID\\plus\\\\quot\\ because support expired\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//cExpired=cExpired \\plus\\ 1//crlf////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Not sending PFG notification to \\quot\\\\plus\\sLastHashID\\plus\\\\quot\\ because not conncted\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab//cNotConnected\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab//arFiles=\\quot\\\\quot\\//crlf////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab//sCustomerNo=trim(driverGetField(dFiles\\comma\\\\quot\\Customer_Number\\quot\\\\comma\\n))//crlf////tab////tab////tab////tab////tab//s=driverGetField(dFiles\\comma\\\\quot\\Filename\\quot\\\\comma\\n)//crlf////tab////tab////tab////tab////tab//sFilename=fileName(s)\\plus\\fileExt(s)//crlf////tab////tab////tab////tab////tab//iSize=driverGetField(dFiles\\comma\\\\quot\\size\\quot\\\\comma\\n)//crlf////tab////tab////tab////tab////tab//arFiles=addElement(arFiles\\comma\\sFilename\\plus\\\\quot\\//power//\\quot\\\\plus\\iSize\\comma\\\\quot\\~~pipe~~\\quot\\)//crlf////tab////tab////tab////tab////tab//sLastHashID=sHashID//crlf////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Could not get HashID for invoice: \\quot\\\\plus\\driverGetField(dFiles\\comma\\\\quot\\filename\\quot\\\\comma\\n))//crlf////tab////tab////tab////tab////tab//cMissingHashID=cMissingHashID\\plus\\1//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////crlf////tab////tab////tab////tab//n=n\\plus\\1//crlf////tab////tab////tab//endwhile//crlf////tab////tab////tab////crlf////tab////tab////tab////send the last notification//crlf////tab////tab////tab//if(sLastHashID<>\\quot\\\\quot\\) //crlf////tab////tab////tab////tab//if(isDirectSocketConnected(sLastHashID)<>\\quot\\Not connected\\quot\\)//crlf////tab////tab////tab////tab////tab//if(_getAllowAccess(sLastHashID))//crlf////tab////tab////tab////tab////tab////tab////send a notification to execute the agent on the customer\\apos\\s computer//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Sending PFG notification to \\quot\\\\plus\\sLastHashID\\plus\\\\quot\\ Data=\\quot\\\\plus\\arFiles)//crlf////tab////tab////tab////tab////tab////tab//sData=\\quot\\DocumentID=L4HxWEciR8sT7E30IKVZXD70\\amp\\Widget=Receive PFG Invoices\\amp\\ContainerItemID=AgentScript\\amp\\ExecAgentScript=true\\quot\\//crlf////tab////tab////tab////tab////tab////tab//sData=sData\\plus\\\\quot\\\\amp\\FileList=\\quot\\\\plus\\arFiles//crlf////tab////tab////tab////tab////tab////tab//sendNotification(sLastHashID\\comma\\13\\comma\\sData\\comma\\\\quot\\\\quot\\\\comma\\5\\comma\\\\quot\\\\quot\\\\comma\\\\quot\\\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//cSent=cSent \\plus\\ 1//crlf////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Not sending PFG notification to \\quot\\\\plus\\sLastHashID\\plus\\\\quot\\ because support expired\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//cExpired=cExpired \\plus\\ 1//crlf////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Not sending PFG notification to \\quot\\\\plus\\sLastHashID\\plus\\\\quot\\ because not conncted\\quot\\)//crlf////tab////tab////tab////tab////tab//cNotConnected\\plus\\\\plus\\//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab//endif//crlf////tab////tab////tab////crlf////tab////tab////tab////archive all files more than 30 days old//crlf////tab////tab////tab//dt=dateNumber(incrementTime(now()\\comma\\-14))//crlf////tab////tab////tab//sFilter=\\quot\\(lt(dateNumber(RemoteModified)\\comma\\\\quot\\\\plus\\dateNumber(dt)\\plus\\\\quot\\\\comma\\n)) and (gt(len(Customer_Number)\\comma\\0\\comma\\n))\\quot\\//crlf////tab////tab////tab////appendToLog(\\quot\\sFilter=\\quot\\\\plus\\sFilter)//crlf////tab////tab////tab//driverSetFilter(dFiles\\comma\\sFilter\\comma\\true)//crlf////tab////tab////tab//c=driverGetRecordCount(dFiles)//crlf////tab////tab////tab//appendToLog(\\quot\\Archiving \\quot\\\\plus\\c\\plus\\\\quot\\ of \\quot\\\\plus\\driverGetRecordCount(dFiles\\comma\\true)\\plus\\\\quot\\ files\\quot\\)//crlf////tab////tab////tab//n=0//crlf////tab////tab////tab//while(n<c)//crlf////tab////tab////tab////tab//s=driverGetField(dFiles\\comma\\\\quot\\Filename\\quot\\\\comma\\n)//crlf////tab////tab////tab////tab//appendToLog(\\quot\\Archiving \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab//fileMove(s\\comma\\getToken(\\quot\\PFGArchiveDir\\quot\\)\\plus\\fileName(s)\\plus\\fileExt(s)\\comma\\true)//crlf////tab////tab////tab////tab//n\\plus\\\\plus\\//crlf////tab////tab////tab//endwhile//crlf////crlf////tab////tab////tab//driverClose(dFiles)//crlf////crlf////tab////tab////tab//s=\\quot\\Ok: Sent: \\quot\\\\plus\\cSent\\plus\\\\quot\\ Expired Support: \\quot\\\\plus\\cExpired\\plus\\\\quot\\ Not connected: \\quot\\\\plus\\cNotConnected//crlf////tab////tab////tab//return(s)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf//^
ID=debug_console|X=300|Y=125|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=debug_console|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=468599|X=300|Y=125|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStart|X=151|Y=40|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentStart|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=829291|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=always|^
ID=1600|X=183|Y=432|W=119|H=45|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=result|AgentNodeActionReturnValue=|AgentNodeComment=Ok|AgentNodeTermType=0|^
ID=AgentTabs|X=151|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStart');agentSetVisible(true)\\quot\\>Agent</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentDescription');agentSetVisible(false)\\quot\\>Description</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStatus');agentSetVisible(false)\\quot\\>Status</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentScript');agentSetVisible(false)\\quot\\>Script</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'ScriptText');agentSetVisible(false)\\quot\\>Script (Text)</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentChart');agentSetVisible(false);agentFormatNodes(document.getElementById('AgentChart'));agentDrawConnectors(document.getElementById('AgentChart'))\\quot\\>Chart</span></td>//crlf////tab//</tr>//crlf//</table>//crlf//^
ID=AgentScript|X=151|Y=40|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<conditional expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//<!include type:script; name:\\quot\\agent_Distribute PFG Invoices\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Distribute PFG Invoices\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 01-18-2018 09:27:39//crlf////crlf////tab////tab////Force reporting when the agent is executed manually//crlf////tab////tab//bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\) or (true))//crlf////crlf////tab////tab////Record the starting time//crlf////tab////tab//tAgentStart=now()//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Distribute PFG Invoices\\comma\\AgentAction\\comma\\829291\\comma\\0\\comma\\sendPFGNotifications//crlf////tab////tab//result=execAgentAction(\\quot\\sendPFGNotifications\\quot\\)//crlf////crlf////tab////tab////Result Ok?//crlf////tab////tab//if(startsWith(result\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Distribute PFG Invoices\\comma\\AgentTerminate\\comma\\1600\\comma\\0\\comma\\Ok//crlf////tab////tab////tab//agentReportStatus(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Distribute PFG Invoices\\quot\\\\comma\\\\quot\\1600\\quot\\\\comma\\0\\comma\\getToken(\\quot\\AspectHashID\\quot\\)\\comma\\\\quot\\Ok\\quot\\\\comma\\result\\comma\\bForceReport\\comma\\now()-tAgentStart\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Distribute PFG Invoices\\comma\\AgentTerminate\\comma\\612189\\comma\\1\\comma\\Error//crlf////tab////tab////tab//agentReportStatus(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Distribute PFG Invoices\\quot\\\\comma\\\\quot\\612189\\quot\\\\comma\\1\\comma\\getToken(\\quot\\AspectHashID\\quot\\)\\comma\\\\quot\\Error\\quot\\\\comma\\result\\comma\\bForceReport\\comma\\now()-tAgentStart\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//endif//crlf////tab//\\quot\\>//crlf//</conditional>^
ID=ScriptText|X=151|Y=40|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<span style='font:8pt tahoma;color:black'>//amp//lt;state//amp//gt;01182018//amp//nbsp;092739//amp//lt;/state//amp//gt;<br>//amp//lt;<span class='includecontrol'>conditional</span>//amp//nbsp;expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)//amp//gt;<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//lt;!<span class='includecontrol'>include</span>//amp//nbsp;type:script;//amp//nbsp;name:\\quot\\agent_Distribute//amp//nbsp;PFG//amp//nbsp;Invoices\\quot\\;//amp//nbsp;commands:\\quot\\<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Created//amp//nbsp;01-18-2018//amp//nbsp;09:27:39</span><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Force//amp//nbsp;reporting//amp//nbsp;when//amp//nbsp;the//amp//nbsp;agent//amp//nbsp;is//amp//nbsp;executed//amp//nbsp;manually</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\)//amp//nbsp;or//amp//nbsp;(true))<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Record//amp//nbsp;the//amp//nbsp;starting//amp//nbsp;time</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;tAgentStart=<span class='keyword'>now</span>()<br><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;result=<span class='keyword'>execAgentAction</span>(\\quot\\sendPFGNotifications\\quot\\)<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Result//amp//nbsp;Ok?</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'><span class='keyword'>if</span>(</span><span class='keyword'>startsWith</span>(result\\comma\\\\quot\\ok\\quot\\))<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>agentReportStatus</span>(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Distribute//amp//nbsp;PFG//amp//nbsp;Invoices\\quot\\\\comma\\\\quot\\1600\\quot\\\\comma\\0\\comma\\<span class='keyword'>getToken</span>(\\quot\\AspectHashID\\quot\\)\\comma\\\\quot\\Ok\\quot\\\\comma\\result\\comma\\bForceReport\\comma\\<span class='keyword'>now</span>()-tAgentStart\\comma\\\\quot\\\\quot\\)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>else</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>agentReportStatus</span>(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Distribute//amp//nbsp;PFG//amp//nbsp;Invoices\\quot\\\\comma\\\\quot\\612189\\quot\\\\comma\\1\\comma\\<span class='keyword'>getToken</span>(\\quot\\AspectHashID\\quot\\)\\comma\\\\quot\\Error\\quot\\\\comma\\result\\comma\\bForceReport\\comma\\<span class='keyword'>now</span>()-tAgentStart\\comma\\\\quot\\\\quot\\)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>endif</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;\\quot\\//amp//gt;<br>//amp//lt;/<span class='includecontrol'>conditional</span>//amp//gt;<br><br></span>^
ID=AgentDescription|X=151|Y=40|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStatus|X=151|Y=40|W=1000|H=800|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<include //crlf////tab//type:widget; //crlf////tab//server:{AspectServerHashID}; //crlf////tab//secure:true; //crlf////tab//documentID:\\quot\\L4HxWEciR8sT7E30IKVZXD70\\quot\\; //crlf////tab//widget:\\quot\\Distribute PFG Invoices\\quot\\; //crlf////tab//containerItemID:\\quot\\395540\\quot\\; //crlf////tab//params:\\quot\\\\quot\\;>//crlf////crlf////crlf//<div style=\\quot\\width:100px;height:800px\\quot\\></div>//crlf////crlf//^
ID=AgentChart|X=151|Y=40|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>01182018 092739</state>//crlf//<canvas id=\\quot\\agent_doc_canvas\\quot\\ width=\\quot\\100\\quot\\ height=\\quot\\100\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 100px; height: 100px; border-style: none; z-index: 2;\\quot\\></canvas><div id=\\quot\\chartAgentStart\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart829291\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\124\\quot\\ style=\\quot\\width: 120px; height: 124px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Distribute PFG Invoices</b><br><span style=\\quot\\font-weight:normal;color:green\\quot\\>Active</span><br><span style=\\quot\\font-weight:normal;color:black\\quot\\>Debugging Is Off</span><br>Report Status: always<br>Report To: <br>Name Params: </div></div><div id=\\quot\\chart1600\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 387px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Ok<hr><span style=\\quot\\color:green\\quot\\>Success</span></div></div><div id=\\quot\\chart829291\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart529912\\quot\\ style=\\quot\\position: absolute; top: 163px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\56\\quot\\ style=\\quot\\width: 150px; height: 56px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentaction\\quot\\><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>sendPFGNotifications<br></td></tr><tr><td><u>Return</u></td><td>result</td></tr></tbody></table></div></div><div id=\\quot\\chart529912\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart1600\\quot\\ agentchildnonode=\\quot\\chart612189\\quot\\ style=\\quot\\position: absolute; top: 271px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\64\\quot\\ style=\\quot\\width: 150px; height: 64px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentdecision\\quot\\>Result Ok?<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Sensor</u></td><td>Expression<br></td></tr></tbody></table></div></div><div id=\\quot\\chart612189\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 271px; left: 190px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Error<hr><span style=\\quot\\color:red\\quot\\>Fail</span></div></div>^
ID=395540|X=300|Y=125|W=985|H=765|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<conditional expression:(true) or (\\quot\\__getContent__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//<include type:expression; expression:htmlConstant(\\quot\\salt\\quot\\\\comma\\\\quot\\__\\quot\\\\comma\\lowerCase(getSalt(4)))>//crlf////crlf////tab//[!------------------------------------------------------------------------//crlf////tab//Default filespec if none supplied//crlf////tab//--------------------------------------------------------------------------]//crlf////tab//<include type:expression; expression:htmlConstant(\\quot\\filespec\\quot\\\\comma\\\\quot\\__filespec__\\quot\\\\comma\\getToken(\\quot\\homedir\\quot\\)+\\quot\\pfg_invoices\pending\*.*\\quot\\)>//crlf////crlf////tab//[!------------------------------------------------------------------------//crlf////tab//Param: Select Pending or Archive//crlf////tab//--------------------------------------------------------------------------]//crlf////tab//<!include type:ExternalDriverParam;//crlf////tab////tab//InputType:\\quot\\select\\quot\\;//crlf////tab////tab//ID:\\quot\\__salt__ParamDirectorySelection\\quot\\;//crlf////tab////tab//Param:\\quot\\Filespec=c:\aspect7\pfg_invoices\$value$\\quot\\;//crlf////tab////tab//Tooltip:\\quot\\\\quot\\;//crlf////tab////tab//HtmlParams:\\quot\\\\quot\\;//crlf////tab////tab//CollectionID:\\quot\\Aspect_Support_Vendor_EDI_Directory_Selection\\quot\\;//crlf////tab////tab//Datalist:\\quot\\false\\quot\\;//crlf////tab////tab//Selected:\\quot\\\\quot\\;//crlf////tab////tab//DriverParams:\\quot\\\\quot\\;//crlf////tab////tab//Filter:\\quot\\\\quot\\;//crlf////tab////tab//SystemDriverName:\\quot\\\\quot\\;//crlf////tab//>//crlf////crlf////tab//[!------------------------------------------------------------------------//crlf////tab//Filter: Contains text//crlf////tab//--------------------------------------------------------------------------]//crlf////tab//<!include type:ExternalDriverFilter;//crlf////tab////tab//InputType:\\quot\\text\\quot\\;//crlf////tab////tab//ID:\\quot\\__salt__ContainsText\\quot\\;//crlf////tab////tab//Condition:\\quot\\not(len(trim('$value$'))=0)\\quot\\;//crlf////tab////tab//Expression:\\quot\\\\quot\\;//crlf////tab////tab//Tooltip:\\quot\\\\quot\\;//crlf////tab////tab//HtmlParams:\\quot\\placeholder='Contains text'\\quot\\;//crlf////tab////tab//CollectionID:\\quot\\\\quot\\;//crlf////tab////tab//Datalist:\\quot\\\\quot\\;//crlf////tab////tab//Selected:\\quot\\\\quot\\;//crlf////tab////tab//DriverParams:\\quot\\\\quot\\;//crlf////tab////tab//Filter:\\quot\\\\quot\\;//crlf////tab////tab//SystemDriverName:\\quot\\\\quot\\;//crlf////tab//>//crlf////crlf////tab//<!include type:driver;//crlf////tab////tab//ver: \\quot\\1.0\\quot\\;//crlf////tab////tab//title: \\quot\\\\quot\\;//crlf////tab////tab//ID: \\quot\\\\quot\\;//crlf////tab////tab//HashID: \\quot\\\\quot\\;//crlf////tab////tab//driver: \\quot\\ASPECT_SUPPORT_PFG_INVOICE_DIR_LIST\\quot\\;//crlf////tab////tab//name: \\quot\\\\quot\\;//crlf////tab////tab//systemdriver: \\quot\\false\\quot\\;//crlf////tab////tab//dispose: \\quot\\false\\quot\\;//crlf////tab////tab//state: \\quot\\\\quot\\;//crlf////tab////tab//params: \\quot\\filespec=__Filespec__~~pipe~~recurse=false~~pipe~~maxdir=1~~pipe~~metadata=Downloaded_PFG_Invoices~~pipe~~DriverID=Aspect_Support_PFG_Invoice_Dir_List~~pipe~~DriverName=__salt__~~pipe~~KeyExpression=filename~~pipe~~CacheTtl=0\\quot\\;//crlf////tab////tab//keyDescription: \\quot\\\\quot\\;//crlf////tab////tab//display: \\quot\\\\quot\\;//crlf////tab////tab//fields: \\quot\\\\quot\\;//crlf////tab////tab//IncludeFields: \\quot\\\\quot\\;//crlf////tab////tab//ExcludeFields: \\quot\\\\quot\\;//crlf////tab////tab//sort: \\quot\\ID\\quot\\;//crlf////tab////tab//filter: \\quot\\true\\quot\\;//crlf////tab////tab//BaseFilter: \\quot\\\\quot\\;//crlf////tab////tab//class: \\quot\\basic1\\quot\\;//crlf////tab////tab//maxrecords: \\quot\\250\\quot\\;//crlf////tab////tab//startrecord: \\quot\\0\\quot\\;//crlf////tab////tab//style: \\quot\\width:auto\\quot\\;//crlf////tab////tab//_style: \\quot\\float:left;width:100\\percent\\\\quot\\;//crlf////tab////tab//height:\\quot\\auto\\quot\\;//crlf////tab////tab//_maxheight:\\quot\\300px\\quot\\;//crlf////tab////tab//canSelect: \\quot\\false\\quot\\;//crlf////tab////tab//readOnly: \\quot\\false\\quot\\;//crlf////tab////tab//canEdit: \\quot\\false\\quot\\;//crlf////tab////tab//canAdd: \\quot\\false\\quot\\;//crlf////tab////tab//canDelete: \\quot\\false\\quot\\;//crlf////tab////tab//inspectMenu: \\quot\\\\quot\\;//crlf////tab////tab//EmbedValues: \\quot\\\\quot\\;//crlf////tab////tab//EditDialogID: \\quot\\ASPECT_SUPPORT_PFG_INVOICE_DIR_LISTDialog\\quot\\;//crlf////tab////tab//DialogHeader: \\quot\\false\\quot\\;//crlf////tab////tab//canCloseDialog: \\quot\\true\\quot\\;//crlf////tab////tab//ExternalParams: \\quot\\__salt__ParamDirectorySelection\\quot\\;//crlf////tab////tab//ExternalFilters: \\quot\\__salt__ContainsText\\quot\\;//crlf////tab////tab//TableControls: \\quot\\true\\quot\\;//crlf////tab////tab//TableHeader: \\quot\\true\\quot\\;//crlf////tab////tab//TableBorder: \\quot\\true\\quot\\;//crlf////tab////tab//RecordCount: \\quot\\true\\quot\\;//crlf////tab////tab//Timestamp: \\quot\\true\\quot\\;//crlf////tab////tab//SelectDisplay: \\quot\\true\\quot\\;//crlf////tab////tab//EditDisplay: \\quot\\true\\quot\\;//crlf////tab////tab//Menu: \\quot\\\\quot\\;//crlf////tab////tab//faq: \\quot\\4LWZhVR9\\quot\\;//crlf////tab////tab//procedure: \\quot\\\\quot\\;//crlf////tab////tab//video: \\quot\\\\quot\\;//crlf////tab////tab//Messages: \\quot\\true\\quot\\;//crlf////tab////tab//ChartType: \\quot\\\\quot\\;//crlf////tab////tab//ChartWidth: \\quot\\640\\quot\\;//crlf////tab////tab//ChartHeight: \\quot\\480\\quot\\;//crlf////tab////tab//ChartLabels: \\quot\\Down_45\\quot\\;//crlf////tab////tab//ChartTitle: \\quot\\\\quot\\;//crlf////tab////tab//ChartStyle: \\quot\\display:none\\quot\\;//crlf////tab////tab//RefreshInterval: \\quot\\0\\quot\\;//crlf////tab////tab//RefreshWhenHidden: \\quot\\true\\quot\\;//crlf////tab////tab//RefreshIntervalRemote: \\quot\\0\\quot\\;//crlf////tab////tab//RefreshWhenHiddenRemote: \\quot\\true\\quot\\;//crlf////tab////tab//_Javascript: \\quot\\DocumentID~~pipe~~Widget~~pipe~~ContainerItemID~~pipe~~Params\\quot\\;//crlf////tab////tab//debug: \\quot\\false\\quot\\;//crlf////tab//>//crlf//</conditional>^
ID=829291|X=183|Y=208|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentAction|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=529912|AgentChildNoNode=|AgentSensor=|AgentAction=sendPFGNotifications|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=result|AgentNodeComment=|AgentNodeTermType=|^
ID=529912|X=183|Y=316|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentDecision|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=1600|AgentChildNoNode=612189|AgentSensor=1|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=startsWith(result//comma//~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~ok~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~)|AgentNodeActionReturnValue=|AgentNodeComment=Result Ok?|AgentNodeTermType=|^
ID=612189|X=373|Y=316|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=result|AgentNodeActionReturnValue=|AgentNodeComment=Error|AgentNodeTermType=1|
</widget><widget name="Distribute McLane Invoices" group="Inventory" category="EDI" description="Sends McLane invoices to customers after they have been downloaded from the PFG ftp site by the server. (Not implemented yet.  Sending is still done using a scheduled task and a script in the notification queries)." type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Distribute Mclane Invoices" modified="03-01-2019 16:05:10" modifiedby="Thnikpad3" TaskEnabled=false IsAgent=false ContainsAgentSensors=false ContainsAgentActions=false TaskInitialStartTime=01-18-2019 20:20:04:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=0 TaskMinutesBetweenExecution=0 TaskSecondsBetweenExecution=0 TaskExecuteSun=true TaskExecuteMon=true TaskExecuteTue=true TaskExecuteWed=true TaskExecuteThu=true TaskExecuteFri=true TaskExecuteSat=true TaskConditional_Expression="" TaskConditional_Expression_Description="" TaskState_Function="" TaskState_Expression_Description="" TaskWidgetParams="" TaskWindowForExecution=0>
Preferences|toolboxx=102|toolboxy=235|aspectfuncx=100|aspectfuncy=100|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=false|aspectfuncVisible=false|PublishFtpFilename=Distribute McLane Invoices.html|PublishToFtpSite=false|PublishFTPAccount=0|PublishFtpDirectory=/|PublishFtpPublicDirectory=/|PublishCopyFile=false|PublishCopyFilename=|PublishWysiwig=false|PublishIncludeAspectScript=false|PublishIncludeAspectStyleshet=false|PublishAsText=false|^
ID=top_bar|X=0|Y=0|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=left_bar|X=0|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=|AlignLeft=top_bar|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=code|X=300|Y=100|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'95631')\\quot\\>Javascript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AspectScript')\\quot\\>AspectScript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'sensor_list')\\quot\\>Sensors</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'action_list')\\quot\\>Actions</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'365864')\\quot\\>McLane Invoices On Server</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'debug_console')\\quot\\>Console</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'15291')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=95631|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Javascript|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AspectScript|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=sensor_list|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__SensorExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Distribute McLane Invoices.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__sensor_list__\\quot\\=\\quot\\true\\quot\\)>//crlf//</conditional>//crlf////crlf//^
ID=action_list|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Distribute McLane Invoices.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf//</conditional>//crlf////crlf//^
ID=debug_console|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=debug_console|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=15291|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStart|X=151|Y=41|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentStart|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=527464|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=never|^
ID=527464|X=183|Y=206|W=119|H=45|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentTabs|X=151|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStart');agentSetVisible(true)\\quot\\>Agent</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentDescription');agentSetVisible(false)\\quot\\>Description</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStatus');agentSetVisible(false)\\quot\\>Status</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentScript');agentSetVisible(false)\\quot\\>Script</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'ScriptText');agentSetVisible(false)\\quot\\>Script (Text)</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentChart');agentSetVisible(false);agentFormatNodes(document.getElementById('AgentChart'));agentDrawConnectors(document.getElementById('AgentChart'))\\quot\\>Chart</span></td>//crlf////tab//</tr>//crlf//</table>//crlf//^
ID=AgentScript|X=151|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<conditional expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//<!include type:script; name:\\quot\\agent_Distribute McLane Invoices\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Distribute McLane Invoices\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 01-07-2018 22:46:38//crlf////crlf////tab////tab////Force reporting when the agent is executed manually//crlf////tab////tab//bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\) or (false))//crlf////crlf////tab////tab////Record the starting time//crlf////tab////tab//tAgentStart=now()//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Distribute McLane Invoices\\comma\\AgentTerminate\\comma\\527464\\comma\\2\\comma\\//crlf////tab////tab//scriptSetResult(2)//crlf////tab//\\quot\\>//crlf//</conditional>^
ID=ScriptText|X=151|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<span style='font:8pt tahoma;color:black'>//amp//lt;state//amp//gt;01072018//amp//nbsp;224638//amp//lt;/state//amp//gt;<br>//amp//lt;<span class='includecontrol'>conditional</span>//amp//nbsp;expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)//amp//gt;<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//lt;!<span class='includecontrol'>include</span>//amp//nbsp;type:script;//amp//nbsp;name:\\quot\\agent_Distribute//amp//nbsp;McLane//amp//nbsp;Invoices\\quot\\;//amp//nbsp;commands:\\quot\\<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Created//amp//nbsp;01-07-2018//amp//nbsp;22:46:38</span><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Force//amp//nbsp;reporting//amp//nbsp;when//amp//nbsp;the//amp//nbsp;agent//amp//nbsp;is//amp//nbsp;executed//amp//nbsp;manually</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\)//amp//nbsp;or//amp//nbsp;(false))<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Record//amp//nbsp;the//amp//nbsp;starting//amp//nbsp;time</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;tAgentStart=<span class='keyword'>now</span>()<br><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(2)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;\\quot\\//amp//gt;<br>//amp//lt;/<span class='includecontrol'>conditional</span>//amp//gt;<br><br></span>^
ID=AgentDescription|X=151|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStatus|X=151|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentChart|X=151|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>01072018 224638</state>//crlf//<canvas id=\\quot\\agent_doc_canvas\\quot\\ width=\\quot\\100\\quot\\ height=\\quot\\100\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 100px; height: 100px; border-style: none; z-index: 2;\\quot\\></canvas><div id=\\quot\\chartAgentStart\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart527464\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\111\\quot\\ style=\\quot\\width: 120px; height: 111px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Distribute McLane Invoices</b><br><span style=\\quot\\font-weight:normal;color:green\\quot\\>Active</span><br><span style=\\quot\\font-weight:normal;color:black\\quot\\>Debugging Is Off</span><br>Report Status: never<br>Report To: <br>Name Params: </div></div><div id=\\quot\\chart527464\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 93px; left: 115px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\46\\quot\\ style=\\quot\\width: 120px; height: 46px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><span style=\\quot\\color:black\\quot\\>Other</span></div></div>^
ID=365864|X=300|Y=126|W=896|H=767|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<conditional expression:(true) or (\\quot\\__getContent__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//<include type:expression; expression:htmlConstant(\\quot\\salt\\quot\\\\comma\\\\quot\\__\\quot\\\\comma\\lowerCase(getSalt(4)))>//crlf////crlf////tab//[!------------------------------------------------------------------------//crlf////tab//Default filespec if none supplied//crlf////tab//--------------------------------------------------------------------------]//crlf////tab//<include type:expression; expression:htmlConstant(\\quot\\filespec\\quot\\\\comma\\\\quot\\__filespec__\\quot\\\\comma\\getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\mclane_invoices~~backslash~~pending~~backslash~~*.*\\quot\\)>//crlf////crlf////tab//[!------------------------------------------------------------------------//crlf////tab//Param: Select Pending or Archive//crlf////tab//--------------------------------------------------------------------------]//crlf////tab//<!include type:ExternalDriverParam;//crlf////tab////tab//InputType:\\quot\\select\\quot\\;//crlf////tab////tab//ID:\\quot\\__salt__ParamDirectorySelection\\quot\\;//crlf////tab////tab//Param:\\quot\\Filespec=c:~~backslash~~aspect7~~backslash~~mclane_invoices~~backslash~~$value$\\quot\\;//crlf////tab////tab//Tooltip:\\quot\\\\quot\\;//crlf////tab////tab//HtmlParams:\\quot\\\\quot\\;//crlf////tab////tab//CollectionID:\\quot\\Aspect_Support_Vendor_EDI_Directory_Selection\\quot\\;//crlf////tab////tab//Datalist:\\quot\\false\\quot\\;//crlf////tab////tab//Selected:\\quot\\\\quot\\;//crlf////tab////tab//DriverParams:\\quot\\\\quot\\;//crlf////tab////tab//Filter:\\quot\\\\quot\\;//crlf////tab////tab//SystemDriverName:\\quot\\\\quot\\;//crlf////tab//>//crlf////crlf////tab//[!------------------------------------------------------------------------//crlf////tab//Filter: Contains text//crlf////tab//--------------------------------------------------------------------------]//crlf////tab//<!include type:ExternalDriverFilter;//crlf////tab////tab//InputType:\\quot\\text\\quot\\;//crlf////tab////tab//ID:\\quot\\__salt__ContainsText\\quot\\;//crlf////tab////tab//Condition:\\quot\\not(len(trim(\\apos\\$value$\\apos\\))=0)\\quot\\;//crlf////tab////tab//Expression:\\quot\\\\quot\\;//crlf////tab////tab//Tooltip:\\quot\\\\quot\\;//crlf////tab////tab//HtmlParams:\\quot\\placeholder=\\apos\\Contains text\\apos\\\\quot\\;//crlf////tab////tab//CollectionID:\\quot\\\\quot\\;//crlf////tab////tab//Datalist:\\quot\\\\quot\\;//crlf////tab////tab//Selected:\\quot\\\\quot\\;//crlf////tab////tab//DriverParams:\\quot\\\\quot\\;//crlf////tab////tab//Filter:\\quot\\\\quot\\;//crlf////tab////tab//SystemDriverName:\\quot\\\\quot\\;//crlf////tab//>//crlf////crlf////tab//<!include type:driver;//crlf////tab////tab//ver: \\quot\\1.0\\quot\\;//crlf////tab////tab//title: \\quot\\\\quot\\;//crlf////tab////tab//ID: \\quot\\__salt__\\quot\\;//crlf////tab////tab//HashID: \\quot\\\\quot\\;//crlf////tab////tab//driver: \\quot\\ASPECT_SUPPORT_MCLANE_INVOICE_DIR_LIST\\quot\\;//crlf////tab////tab//name: \\quot\\\\quot\\;//crlf////tab////tab//systemdriver: \\quot\\false\\quot\\;//crlf////tab////tab//dispose: \\quot\\false\\quot\\;//crlf////tab////tab//state: \\quot\\\\quot\\;//crlf////tab////tab//params: \\quot\\filespec=__Filespec__~~pipe~~recurse=false~~pipe~~maxdir=1~~pipe~~metadata=Downloaded_McLane_Invoices~~pipe~~DriverID=Aspect_Support_McLane_Invoice_Dir_List~~pipe~~DriverName=__salt__~~pipe~~KeyExpression=filename~~pipe~~CacheTtl=0\\quot\\;//crlf////tab////tab//keyDescription: \\quot\\\\quot\\;//crlf////tab////tab//display: \\quot\\\\quot\\;//crlf////tab////tab//fields: \\quot\\\\quot\\;//crlf////tab////tab//IncludeFields: \\quot\\\\quot\\;//crlf////tab////tab//ExcludeFields: \\quot\\\\quot\\;//crlf////tab////tab//sort: \\quot\\ID\\quot\\;//crlf////tab////tab//filter: \\quot\\true\\quot\\;//crlf////tab////tab//BaseFilter: \\quot\\\\quot\\;//crlf////tab////tab//class: \\quot\\basic1\\quot\\;//crlf////tab////tab//maxrecords: \\quot\\250\\quot\\;//crlf////tab////tab//startrecord: \\quot\\0\\quot\\;//crlf////tab////tab//style: \\quot\\width:auto\\quot\\;//crlf////tab////tab//_style: \\quot\\float:left;width:100\\percent\\\\quot\\;//crlf////tab////tab//height:\\quot\\auto\\quot\\;//crlf////tab////tab//_maxheight:\\quot\\300px\\quot\\;//crlf////tab////tab//canSelect: \\quot\\false\\quot\\;//crlf////tab////tab//readOnly: \\quot\\false\\quot\\;//crlf////tab////tab//canEdit: \\quot\\false\\quot\\;//crlf////tab////tab//canAdd: \\quot\\false\\quot\\;//crlf////tab////tab//canDelete: \\quot\\false\\quot\\;//crlf////tab////tab//inspectMenu: \\quot\\\\quot\\;//crlf////tab////tab//EmbedValues: \\quot\\\\quot\\;//crlf////tab////tab//EditDialogID: \\quot\\ASPECT_SUPPORT_PFG_INVOICE_DIR_LISTDialog\\quot\\;//crlf////tab////tab//DialogHeader: \\quot\\false\\quot\\;//crlf////tab////tab//canCloseDialog: \\quot\\true\\quot\\;//crlf////tab////tab//ExternalParams: \\quot\\__salt__ParamDirectorySelection\\quot\\;//crlf////tab////tab//ExternalFilters: \\quot\\__salt__ContainsText\\quot\\;//crlf////tab////tab//TableControls: \\quot\\true\\quot\\;//crlf////tab////tab//TableHeader: \\quot\\true\\quot\\;//crlf////tab////tab//TableBorder: \\quot\\true\\quot\\;//crlf////tab////tab//RecordCount: \\quot\\true\\quot\\;//crlf////tab////tab//Timestamp: \\quot\\true\\quot\\;//crlf////tab////tab//SelectDisplay: \\quot\\true\\quot\\;//crlf////tab////tab//EditDisplay: \\quot\\true\\quot\\;//crlf////tab////tab//Menu: \\quot\\\\quot\\;//crlf////tab////tab//faq: \\quot\\4LWZhVR9\\quot\\;//crlf////tab////tab//procedure: \\quot\\\\quot\\;//crlf////tab////tab//video: \\quot\\\\quot\\;//crlf////tab////tab//Messages: \\quot\\true\\quot\\;//crlf////tab////tab//ChartType: \\quot\\\\quot\\;//crlf////tab////tab//ChartWidth: \\quot\\640\\quot\\;//crlf////tab////tab//ChartHeight: \\quot\\480\\quot\\;//crlf////tab////tab//ChartLabels: \\quot\\Down_45\\quot\\;//crlf////tab////tab//ChartTitle: \\quot\\\\quot\\;//crlf////tab////tab//ChartStyle: \\quot\\display:none\\quot\\;//crlf////tab////tab//RefreshInterval: \\quot\\0\\quot\\;//crlf////tab////tab//RefreshWhenHidden: \\quot\\true\\quot\\;//crlf////tab////tab//RefreshIntervalRemote: \\quot\\0\\quot\\;//crlf////tab////tab//RefreshWhenHiddenRemote: \\quot\\true\\quot\\;//crlf////tab////tab//_Javascript: \\quot\\DocumentID~~pipe~~Widget~~pipe~~ContainerItemID~~pipe~~Params\\quot\\;//crlf////tab////tab//debug: \\quot\\false\\quot\\;//crlf////tab//>//crlf//</conditional>
</widget><widget name="Receive PFG Invoices" group="Inventory" category="EDI" description="This agent runs on the customer's computer and is invoked by a notification from the server to download PFG invoices from the server." type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Receive Pfg Invoices" modified="04-10-2018 23:30:36" modifiedby="Thnikpad3" TaskEnabled=false IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=03-05-2018 01:29:56:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=0 TaskMinutesBetweenExecution=0 TaskSecondsBetweenExecution=0 TaskExecuteSun=true TaskExecuteMon=true TaskExecuteTue=true TaskExecuteWed=true TaskExecuteThu=true TaskExecuteFri=true TaskExecuteSat=true TaskConditional_Expression="" TaskConditional_Expression_Description="" TaskState_Function="" TaskState_Expression_Description="" TaskWidgetParams="" TaskWindowForExecution=0>
Preferences|toolboxx=74|toolboxy=179|aspectfuncx=100|aspectfuncy=100|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=false|aspectfuncVisible=false|PublishFtpFilename=Receive PFG Invoices.html|PublishToFtpSite=false|PublishFTPAccount=0|PublishFtpDirectory=/|PublishFtpPublicDirectory=/|PublishCopyFile=false|PublishCopyFilename=|PublishWysiwig=false|PublishIncludeAspectScript=false|PublishIncludeAspectStyleshet=false|PublishAsText=false|^
ID=top_bar|X=0|Y=0|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=left_bar|X=0|Y=22|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=|AlignLeft=top_bar|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=code|X=300|Y=100|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'104992')\\quot\\>Javascript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'AspectScript')\\quot\\>AspectScript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'sensor_list')\\quot\\>Sensors</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'action_list')\\quot\\>Actions</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'debug_console')\\quot\\>Console</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'379455')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=104992|X=300|Y=123|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Javascript|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AspectScript|X=300|Y=123|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=sensor_list|X=300|Y=123|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__SensorExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Receive PFG Invoices.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__sensor_list__\\quot\\=\\quot\\true\\quot\\)>//crlf//</conditional>//crlf////crlf//^
ID=action_list|X=300|Y=123|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=Aspect_Script|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Receive PFG Invoices.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Receive PFG Invoices\\comma\\requestPFGInvoices\\comma\\action_list\\comma\\Action=requestPFGInvoices\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//requestPFGInvoices//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\requestPFGInvoices\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//This action is executed on the customer\\apos\\s side to request specific invoices //crlf////tab////tab//form the server.  The server invokes this action using a notification.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//FileList - List of files in the form filename//power//size~~pipe~~filename//power//size//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Ok or Error//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\requestPFGInvoices\\quot\\; commands:\\quot\\//crlf////tab////tab////tab////crlf////tab////tab////tab////abort if missing FileList//crlf////tab////tab////tab//if(undefined(\\quot\\__FileList__\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing FileList\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////abort if no files in list//crlf////tab////tab////tab//cFiles=getElementCount(\\quot\\__FileList__\\quot\\\\comma\\\\quot\\~~pipe~~\\quot\\)//crlf////tab////tab////tab//if(cFiles=0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: No files in list\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////get the server\\apos\\s IP address. if testing\\comma\\ use the local IP address//crlf////tab////tab////tab//sServerIP=getToken(\\quot\\aspectserverip1a\\quot\\)//crlf////crlf////tab////tab////tab//cReceived=0//crlf////tab////tab////tab//cError=0//crlf////tab////tab////tab////crlf////tab////tab////tab//n=0//crlf////tab////tab////tab//while(n<cFiles)//crlf////tab////tab////tab////tab//s=getElement(\\quot\\__FileList__\\quot\\\\comma\\n\\comma\\\\quot\\~~pipe~~\\quot\\)//crlf////tab////tab////tab////tab//sFilename=getElement(s\\comma\\0\\comma\\\\quot\\//power//\\quot\\)//crlf////tab////tab////tab////tab//iSize=value(getElement(s\\comma\\1\\comma\\\\quot\\//power//\\quot\\))//crlf////crlf////tab////tab////tab////tab////see if the file already exists//crlf////tab////tab////tab////tab//sLocalFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\invoices\\\quot\\\\plus\\sFilename//crlf////tab////tab////tab////tab//sLocalArchiveName=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\invoices\archive\\\quot\\\\plus\\sFilename//crlf////tab////tab////tab////tab//bExists=(fileExists(sLocalFilename)) or (fileExists(sLocalArchiveName))//crlf////crlf////tab////tab////tab////tab////if the file doesn\\apos\\t exist\\comma\\ get it from the server//crlf////tab////tab////tab////tab//if(not(bExists))//crlf////tab////tab////tab////tab////tab//sUrl=\\quot\\http://\\quot\\\\plus\\sServerIP\\plus\\\\quot\\:4446/?Network=Aspect_Support\\amp\\ID=getPFGInvoice\\amp\\Filename=\\quot\\\\plus\\sFilename//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Requesting \\quot\\\\plus\\sUrl)//crlf////tab////tab////tab////tab////tab//sContent=fileGetContent(sUrl)//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Got \\quot\\\\plus\\len(sContent)\\plus\\\\quot\\ bytes.  Size1=\\quot\\\\plus\\iSize)//crlf////tab////crlf////tab////tab////tab////tab////tab//bUseSecureServer=false//crlf////tab////tab////tab////tab////tab//if(len(sContent)<iSize)//crlf////tab////tab////tab////tab////tab////tab//sUrl2=\\quot\\https://\\quot\\\\plus\\sServerIP\\plus\\\\quot\\:4447/?Network=Aspect_Support\\amp\\ID=getPFGInvoice\\amp\\Filename=\\quot\\\\plus\\sFilename//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Requesting (secure) \\quot\\\\plus\\sUrl2)//crlf////tab////tab////tab////tab////tab////tab//sContent=fileGetContent(sUrl2)//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Got \\quot\\\\plus\\len(sContent)\\plus\\\\quot\\ bytes.  Size=\\quot\\\\plus\\iSize\\plus\\\\quot\\ using secure connection\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//bUseSecureServer=true//crlf////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab//if(len(sContent)=iSize) //crlf////tab////tab////tab////tab////tab////tab////save the file //crlf////tab////tab////tab////tab////tab////tab//fileWriteContent(sLocalFilename\\comma\\sContent)//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Saved invoice to \\quot\\\\plus\\sLocalFilename)//crlf////crlf////tab////tab////tab////tab////tab////tab////send a message to the server that the invoice hass been successfully downloaded//crlf////tab////tab////tab////tab////tab////tab//if(bUseSecureServer)//crlf////tab////tab////tab////tab////tab////tab////tab//sUrl=\\quot\\https://\\quot\\\\plus\\sServerIP\\plus\\\\quot\\:4447/?Network=Aspect_Support\\amp\\ID=confirmPFGInvoice\\amp\\Filename=\\quot\\\\plus\\sFilename//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Sending confirmation \\quot\\\\plus\\sUrl)//crlf////tab////tab////tab////tab////tab////tab////tab//s=fileGetContent(sUrl)//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Confirmed=\\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab//sUrl=\\quot\\http://\\quot\\\\plus\\sServerIP\\plus\\\\quot\\:4446/?Network=Aspect_Support\\amp\\ID=confirmPFGInvoice\\amp\\Filename=\\quot\\\\plus\\sFilename//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Sending confirmation \\quot\\\\plus\\sUrl)//crlf////tab////tab////tab////tab////tab////tab////tab//s=fileGetContent(sUrl)//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Confirmed=\\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab//cReceived\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error getting invoice: \\quot\\\\plus\\sFilename\\plus\\\\quot\\ Size=\\quot\\\\plus\\iSize\\plus\\\\quot\\ Received=\\quot\\\\plus\\len(sContent))//crlf////tab////tab////tab////tab////tab////tab//cError\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//else //crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\File already exists: \\quot\\\\plus\\sFilename)//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////crlf////tab////tab////tab////tab//n=n\\plus\\1//crlf////tab////tab////tab//endwhile//crlf////crlf////tab////tab////tab//s=\\quot\\Received: \\quot\\\\plus\\cReceived\\plus\\\\quot\\ Error: \\quot\\\\plus\\cError//crlf////tab////tab////tab//if(cError=0) //crlf////tab////tab////tab////tab//s=\\quot\\Ok: \\quot\\\\plus\\s//crlf////tab////tab////tab//else//crlf////tab////tab////tab////tab//s=\\quot\\Error: \\quot\\\\plus\\s//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//return(s)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//^
ID=debug_console|X=300|Y=123|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=debug_console|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=379455|X=300|Y=123|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStart|X=183|Y=45|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentStart|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=378409|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=never|^
ID=443677|X=183|Y=432|W=119|H=45|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=result|AgentNodeActionReturnValue=|AgentNodeComment=Ok|AgentNodeTermType=0|^
ID=AgentTabs|X=183|Y=22|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStart');agentSetVisible(true)\\quot\\>Agent</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentDescription');agentSetVisible(false)\\quot\\>Description</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStatus');agentSetVisible(false)\\quot\\>Status</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentScript');agentSetVisible(false)\\quot\\>Script</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'ScriptText');agentSetVisible(false)\\quot\\>Script (Text)</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentChart');agentSetVisible(false);agentFormatNodes(document.getElementById('AgentChart'));agentDrawConnectors(document.getElementById('AgentChart'))\\quot\\>Chart</span></td>//crlf////tab//</tr>//crlf//</table>//crlf//^
ID=AgentScript|X=183|Y=45|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<conditional expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//<!include type:script; name:\\quot\\agent_Receive PFG Invoices\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Receive PFG Invoices\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 01-08-2018 00:58:13//crlf////crlf////tab////tab////Force reporting when the agent is executed manually//crlf////tab////tab//bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\) or (false))//crlf////crlf////tab////tab////Record the starting time//crlf////tab////tab//tAgentStart=now()//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Receive PFG Invoices\\comma\\AgentAction\\comma\\378409\\comma\\0\\comma\\requestPFGInvoices//crlf////tab////tab//execAgentAction(\\quot\\requestPFGInvoices\\quot\\\\comma\\\\quot\\FileList=__FileList__\\quot\\)//crlf////crlf////tab////tab////Result Ok?//crlf////tab////tab//if(startsWith(result\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Receive PFG Invoices\\comma\\AgentTerminate\\comma\\443677\\comma\\0\\comma\\Ok//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Receive PFG Invoices\\comma\\AgentTerminate\\comma\\832139\\comma\\1\\comma\\Error//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//endif//crlf////tab//\\quot\\>//crlf//</conditional>^
ID=ScriptText|X=183|Y=45|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<span style='font:8pt tahoma;color:black'>//amp//lt;state//amp//gt;01082018//amp//nbsp;005813//amp//lt;/state//amp//gt;<br>//amp//lt;<span class='includecontrol'>conditional</span>//amp//nbsp;expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)//amp//gt;<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//lt;!<span class='includecontrol'>include</span>//amp//nbsp;type:script;//amp//nbsp;name:\\quot\\agent_Receive//amp//nbsp;PFG//amp//nbsp;Invoices\\quot\\;//amp//nbsp;commands:\\quot\\<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Created//amp//nbsp;01-08-2018//amp//nbsp;00:58:13</span><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Force//amp//nbsp;reporting//amp//nbsp;when//amp//nbsp;the//amp//nbsp;agent//amp//nbsp;is//amp//nbsp;executed//amp//nbsp;manually</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\)//amp//nbsp;or//amp//nbsp;(false))<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Record//amp//nbsp;the//amp//nbsp;starting//amp//nbsp;time</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;tAgentStart=<span class='keyword'>now</span>()<br><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>execAgentAction</span>(\\quot\\requestPFGInvoices\\quot\\\\comma\\\\quot\\FileList=__FileList__\\quot\\)<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Result//amp//nbsp;Ok?</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'><span class='keyword'>if</span>(</span><span class='keyword'>startsWith</span>(result\\comma\\\\quot\\ok\\quot\\))<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>else</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>endif</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;\\quot\\//amp//gt;<br>//amp//lt;/<span class='includecontrol'>conditional</span>//amp//gt;<br><br></span>^
ID=AgentDescription|X=183|Y=45|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStatus|X=183|Y=45|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentChart|X=183|Y=45|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>01082018 005813</state>//crlf//<canvas id=\\quot\\agent_doc_canvas\\quot\\ width=\\quot\\100\\quot\\ height=\\quot\\100\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 100px; height: 100px; border-style: none; z-index: 2;\\quot\\></canvas><div id=\\quot\\chartAgentStart\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart378409\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\111\\quot\\ style=\\quot\\width: 120px; height: 111px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Receive PFG Invoices</b><br><span style=\\quot\\font-weight:normal;color:green\\quot\\>Active</span><br><span style=\\quot\\font-weight:normal;color:black\\quot\\>Debugging Is Off</span><br>Report Status: never<br>Report To: <br>Name Params: </div></div><div id=\\quot\\chart443677\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 387px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Ok<hr><span style=\\quot\\color:green\\quot\\>Success</span></div></div><div id=\\quot\\chart378409\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart116661\\quot\\ style=\\quot\\position: absolute; top: 163px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\0\\quot\\ height=\\quot\\0\\quot\\ style=\\quot\\width: 0px; height: 0px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentaction\\quot\\><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>requestPFGInvoices<br></td></tr><tr><td><u>Return</u></td><td></td></tr></tbody></table></div></div><div id=\\quot\\chart116661\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart443677\\quot\\ agentchildnonode=\\quot\\chart832139\\quot\\ style=\\quot\\position: absolute; top: 271px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\64\\quot\\ style=\\quot\\width: 150px; height: 64px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentdecision\\quot\\>Result Ok?<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Sensor</u></td><td>Expression<br></td></tr></tbody></table></div></div><div id=\\quot\\chart832139\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 271px; left: 190px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Error<hr><span style=\\quot\\color:red\\quot\\>Fail</span></div></div>^
ID=378409|X=183|Y=208|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentAction|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=116661|AgentChildNoNode=|AgentSensor=|AgentAction=requestPFGInvoices|AgentNodeNotes=|AgentNodeParams=\\quot\\FileList\equals\__FileList__\\quot\\|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=116661|X=183|Y=316|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentDecision|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=443677|AgentChildNoNode=832139|AgentSensor=1|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=startsWith(result//comma//\\quot\\ok\\quot\\)|AgentNodeActionReturnValue=|AgentNodeComment=Result Ok?|AgentNodeTermType=|^
ID=832139|X=373|Y=316|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=result|AgentNodeActionReturnValue=|AgentNodeComment=Error|AgentNodeTermType=1|
</widget><widget name="Download HFM Invoice" group="Inventory" category="Invoice Downloads" description="" type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Download Hfm Invoice" modified="03-31-2018 00:09:50" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=03-27-2018 00:00:00:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=0 TaskMinutesBetweenExecution=1 TaskSecondsBetweenExecution=0 TaskExecuteSun=true TaskExecuteMon=true TaskExecuteTue=true TaskExecuteWed=true TaskExecuteThu=true TaskExecuteFri=true TaskExecuteSat=true TaskConditional_Expression="(getToken(\\quote\\POSInterface_StoreID\\quote\\)\\lt\\\\gt\\\\quote\\Undefined\\quote\\) and (len(lookup(Aspect_BackOffice_Vendor_ID_by_EDI_Selection,\\quote\\HFM\\quote\\,0,\\quote\\StoreID=\\quote\\+getToken(\\quote\\POSInterface_StoreID\\quote\\)))\\gt\\0)" TaskConditional_Expression_Description="Executes when HFM EDI information is defined for a vendor in the store with the pos interface enabled" TaskState_Function="hour(now())+gfs(replaceSubstring(getSetFor(getCollection(Aspect_BackOffice_Store_Directory_By_ID,true,\\quote\\\\quote\\,\\quote\\\\quote\\,\\quote\\,\\quote\\,\\quote\\value\\quote\\),\\quote\\vendor.bin\\quote\\),char(0x2C),char(0x3B)))+getToken(\\quote\\POSInterface_StoreID\\quote\\)" TaskState_Expression_Description="Executes when the hour changes, when a vendor file is updated and when the ID of the store with the pos interface enabled changes." TaskWidgetParams="" TaskWindowForExecution=0>
Preferences|toolboxx=107|toolboxy=66|aspectfuncx=100|aspectfuncy=100|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=false|aspectfuncVisible=false|PublishFtpFilename=Download HFM Invoice.html|PublishToFtpSite=false|PublishFTPAccount=0|PublishFtpDirectory=/|PublishFtpPublicDirectory=/|PublishCopyFile=false|PublishCopyFilename=|PublishWysiwig=false|PublishIncludeAspectScript=false|PublishIncludeAspectStyleshet=false|PublishAsText=false|^
ID=top_bar|X=0|Y=0|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=left_bar|X=0|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=|AlignLeft=top_bar|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=code|X=1500|Y=0|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'525186')\\quot\\>Javascript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'AspectScript')\\quot\\>AspectScript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'sensor_list')\\quot\\>Sensors</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'action_list')\\quot\\>Actions</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'debug_console')\\quot\\>Console</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'939204')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=525186|X=1500|Y=23|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Javascript|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AspectScript|X=1500|Y=23|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=sensor_list|X=1500|Y=23|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__SensorExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download HFM Invoice.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__sensor_list__\\quot\\=\\quot\\true\\quot\\)>//crlf//</conditional>//crlf////crlf//^
ID=action_list|X=1500|Y=23|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=Aspect_Script|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download HFM Invoice.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Download HFM Invoice\\comma\\processHFMInvoice\\comma\\action_list\\comma\\Action=processHFMInvoice\\comma\\private//crlf////tab//Download HFM Invoice\\comma\\downloadHFMInvoices\\comma\\action_list\\comma\\Action=downloadHFMInvoices\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//processHFMInvoice//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\processHFMInvoice\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Processes a HFM text file into a readable table.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//InputFilename - Name of the input file//crlf////tab////tab//OutputFilename - Name of the output file//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Ok or Error//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\processHFMInvoice\\quot\\; commands:\\quot\\//crlf////tab////tab////tab////abort if missing InputFilename//crlf////tab////tab////tab//if(undefined(\\quot\\__InputFilename__\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing InpuFilename\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////abort if missing OutputFilename//crlf////tab////tab////tab//if(undefined(\\quot\\__OutputFilename__\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing OutputFilename\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////abort if the input file does not exist//crlf////tab////tab////tab//if(not(fileExists(\\quot\\__InputFilename__\\quot\\)))//crlf////tab////tab////tab////tab//return(\\quot\\Error: File does not exist: __InputFilename__\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////get the input//crlf////tab////tab////tab//sInput=fileGetContent(\\quot\\__InputFilename__\\quot\\)//crlf////crlf////tab////tab////tab////Records are delimited with a tilde.  Records start with://crlf////tab////tab////tab//////crlf////tab////tab////tab////ISA//tab//- Interchange Control Header //crlf////tab////tab////tab////GS//tab//- Functional Group Header//crlf////tab////tab////tab////ST//tab//- Transaction Set Header//crlf////tab////tab////tab////BIG//tab//- Beginning Segment for Invoice//crlf////tab////tab////tab////N1//tab//-//tab//Name //crlf////tab////tab////tab////PO4//tab//-//tab//Item Physical Details//crlf////tab////tab////tab////IT1//tab//-//tab//Baseline Item Data //crlf////tab////tab////tab////PID//tab//- Product/Item Description//crlf////tab////tab////tab//////crlf////tab////tab////tab////The last three go together to give information for a single item//crlf////crlf////tab////tab////tab////all record types are moved to the start of a new line except for //crlf////tab////tab////tab////IT1 and PID which trail PO4 on the same line//crlf////tab////tab////tab//sInput=replaceSubstring(sInput\\comma\\\\quot\\~GS\\quot\\\\comma\\char(10)+\\quot\\GS\\quot\\)//crlf////tab////tab////tab//sInput=replaceSubstring(sInput\\comma\\\\quot\\~ST\\quot\\\\comma\\char(10)+\\quot\\ST\\quot\\)//crlf////tab////tab////tab//sInput=replaceSubstring(sInput\\comma\\\\quot\\~BIG\\quot\\\\comma\\char(10)+\\quot\\BIG\\quot\\)//crlf////tab////tab////tab//sInput=replaceSubstring(sInput\\comma\\\\quot\\~N1\\quot\\\\comma\\char(10)+\\quot\\N1\\quot\\)//crlf////tab////tab////tab//sInput=replaceSubstring(sInput\\comma\\\\quot\\~PO4\\quot\\\\comma\\char(10)+\\quot\\PO4\\quot\\)//crlf////crlf////tab////tab////tab////replace the tildes in front of IT1 and PID so they just look like additional//crlf////tab////tab////tab////fields on the PO4 line//crlf////tab////tab////tab//sInput=replaceSubstring(sInput\\comma\\\\quot\\~IT1\\quot\\\\comma\\\\quot\\*IT1\\quot\\)//crlf////tab////tab////tab//sInput=replaceSubstring(sInput\\comma\\\\quot\\~PID\\quot\\\\comma\\\\quot\\*PID\\quot\\)//crlf////crlf////tab////tab////tab////get rid of any quotes//crlf////tab////tab////tab//sInput=replaceSubstring(sInput\\comma\\char(0x22)\\comma\\char(0x27))//crlf////crlf////tab////tab////tab////replace all of the asterisks with tildes.  This should be safe since all of the tildes//crlf////tab////tab////tab////should be gone.  Don't use a comma because text fields may contain a comma//crlf////tab////tab////tab//sInput=replaceSubstring(sInput\\comma\\\\quot\\*\\quot\\\\comma\\\\quot\\~\\quot\\)//crlf////crlf////tab////tab////tab////record the invoice number and date at the end of each PO4 line//crlf////tab////tab////tab//sOutput=\\quot\\\\quot\\//crlf////tab////tab////tab//dt=now()//crlf////tab////tab////tab//sInvoiceNumber=\\quot\\\\quot\\//crlf////tab////tab////tab//c=getElementCount(sInput\\comma\\char(10))//crlf////tab////tab////tab//n=0//crlf////tab////tab////tab//while(n<c)//crlf////tab////tab////tab////tab//s=getElement(sInput\\comma\\n\\comma\\char(10))//crlf////tab////tab////tab////tab//if(startsWith(s\\comma\\\\quot\\BIG\\quot\\))//crlf////tab////tab////tab////tab////tab////Looks like this: BIG~20180326~2392276//crlf////tab////tab////tab////tab////tab//dt=parseTime(getElement(s\\comma\\1\\comma\\\\quot\\~\\quot\\)\\comma\\\\quot\\yyyyMMdd\\quot\\)//crlf////tab////tab////tab////tab////tab//sInvoiceNumber=getElement(s\\comma\\2\\comma\\\\quot\\~\\quot\\)//crlf//appendtoLog(\\quot\\debug s=\\quot\\+s+\\quot\\ dt=\\quot\\+dt)//crlf////tab////tab////tab////tab//elseif(startsWith(s\\comma\\\\quot\\PO4\\quot\\))//crlf////tab////tab////tab////tab////tab//s=s+\\quot\\~\\quot\\+formatDate(dt\\comma\\\\quot\\MM-dd-yyyy\\quot\\)+\\quot\\~\\quot\\+sInvoiceNumber//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//sOutput=addElement(sOutput\\comma\\s\\comma\\char(10))//crlf////tab////tab////tab////tab//n++//crlf////tab////tab////tab//endwhile//crlf////crlf////tab////tab////tab//fileWriteContent(\\quot\\__OutputFilename__\\quot\\\\comma\\sOutput)//crlf////crlf////tab////tab////tab//return(\\quot\\ok\\quot\\)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf////crlf//[!------------------------------------------------------------------------//crlf//downloadHFMInvoices//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadHFMInvoices\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads any new invoices from the HFM FTP site.  Invoices are downloaded to the //crlf////tab////tab//[homedir]invoices directory.  An invoice will not be downloaded if it already exists //crlf////tab////tab//in the [homedir]invoices or [homedir]invoices\archive directory.  Invoices are downloaded//crlf////tab////tab//for the store with the ID matching the token POSInterface_StoreID which is set by the //crlf////tab////tab//POS Interface agent.  This means that the pos interface must be enabled for a store to //crlf////tab////tab//download invoices.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//None//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Ok or Error//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\downloadHFMInvoices\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Download HFM Invoices\\quot\\)//crlf////crlf////tab////tab////tab////abort if POSInterface_StoreID if blank or equals Undefined//crlf////tab////tab////tab//s=getToken(\\quot\\POSInterface_StoreID\\quot\\)//crlf////tab////tab////tab//if((len(s)=0) or (s=\\quot\\Undefined\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Aborting because no store has POS interface enabled\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////open the store driver//crlf////tab////tab////tab//driverOpen(Aspect_BackOffice_Store\\comma\\dStore\\comma\\WRITE)\\comma\\//crlf////tab////tab////tab//driverSetFilter(dStore\\comma\\\\quot\\true\\quot\\\\comma\\true)//crlf////crlf////tab////tab////tab//cProcessed=0//crlf////tab////tab////tab//cDownload=0//crlf////tab////tab////tab//cError=0//crlf////tab////tab////tab//cSkipped=0//crlf////tab////tab////tab//cDeleted=0//crlf////tab////tab////tab//cCredentialError=0//crlf////tab////tab////tab//cStore=driverGetRecordCount(dStore)//crlf////tab////tab////tab//nStore=0//crlf////tab////tab////tab//while(nStore<cStore)//crlf////tab////tab////tab////tab//sStoreID=driverGetField(dStore\\comma\\\\quot\\ID\\quot\\\\comma\\nStore)//crlf////tab////tab////tab////tab//if(sStoreID=getToken(\\quot\\POSInterface_StoreID\\quot\\))//crlf////tab////tab////tab////tab////tab//sStoreName=driverGetField(dStore\\comma\\\\quot\\Store_Name\\quot\\\\comma\\nStore)//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Downloading HFM invoices for \\quot\\+sStoreName)//crlf////crlf////tab////tab////tab////tab////tab////open the vendor driver for the store//crlf////tab////tab////tab////tab////tab//driverOpen(Aspect_Back_Office_Vendor\\comma\\dVendor\\comma\\WRITE\\comma\\false\\comma\\\\quot\\StoreID=\\quot\\+sStoreID)//crlf////tab////tab////tab////tab////tab//r=driverFindRecordAbsolute(dVendor\\comma\\0\\comma\\\\quot\\EDI_Vendor=\\quot\\+quote(\\quot\\HFM\\quot\\))//crlf////tab////tab////tab////tab////tab//if(r>=0)//crlf////tab////tab////tab////tab////tab////tab////increment the number of vendor records processed//crlf////tab////tab////tab////tab////tab////tab//cProcessed++//crlf////crlf////tab////tab////tab////tab////tab////tab//sVendorID=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\ID\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sVendorName=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\Name\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Ftp_Site\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sEDIUserName=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_UserName\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sEDIPassword=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Password\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//bEDIDelete=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Delete_After_Download\\quot\\\\comma\\r)//crlf////crlf////tab////tab////tab////tab////tab////tab////update the time that a check was last made to download invoices //crlf////tab////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Check\\quot\\\\comma\\r\\comma\\now())//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Verify time last checked=\\quot\\+driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Check\\quot\\\\comma\\r))//crlf////crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Downloading invoices for vendor: \\quot\\+sVendorName+\\quot\\ ID: \\quot\\+sVendorID)//crlf////crlf////tab////tab////tab////tab////tab////tab//remove ftp:// and other slashes from host name//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\ftp:\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\\\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////crlf////tab////tab////tab////tab////tab////tab//if((len(sEDIFtpSite)>0) and (len(sEDIUserName)>0) and (len(sEDIPassword)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////connect to ftp server//crlf////tab////tab////tab////tab////tab////tab////tab//s=ftpConnect(ftp\\comma\\sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\true)//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Connect to \\quot\\+sEDIFtpSite+\\quot\\: \\quot\\+s)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////change directory to /OUT //crlf////tab////tab////tab////tab////tab////tab////tab////tab////Not necessary.  Files are in the root.//crlf////tab////tab////tab////tab////tab////tab////tab////tab////s=ftpChangeDir(ftp\\comma\\\\quot\\/out\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////appendToLog(\\quot\\chdir to /out: \\quot\\+s)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////get file list//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//arFiles=ftpListFiles(ftp)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//cFilesOnServer=getElementCount(arFiles\\comma\\char(10))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(cFilesOnServer=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\No files on server\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////download the files//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//n=0//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//while(n<cFilesOnServer)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////get the filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=getElement(arFiles\\comma\\n\\comma\\char(10))//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////the filename includes the size and time.  Get only the filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////The filename uses a .810 extension//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//n1=pos(\\quot\\.810\\quot\\\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(n1>=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=substring(sFtpFilename\\comma\\0\\comma\\n1+4)//tab////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\sFtpFilename=\\quot\\+sFtpFilename)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////get the local filename and archived filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalFilename=getToken(\\quot\\homedir\\quot\\)+\\quot\\invoices\\\quot\\+sFtpFilename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalArchiveFilename=getToken(\\quot\\homedir\\quot\\)+\\quot\\invoices\archive\\\quot\\+sFtpFilename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\LocalFilename=\\quot\\+sLocalFilename+\\quot\\ Exists: \\quot\\+fileExists(sLocalFilename)+\\quot\\ Size: \\quot\\+fileSize(sLocalFilename)+\\quot\\ Modified: \\quot\\+fileModified(sLocalFilename))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\LocalArchiveFilename=\\quot\\+sLocalArchiveFilename+\\quot\\ Exists: \\quot\\+fileExists(sLocalArchiveFilename)+\\quot\\ Size: \\quot\\+fileSize(sLocalArchiveFilename)+\\quot\\ Modified: \\quot\\+fileModified(sLocalArchiveFilename))//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////see if the file already exists//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=false//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((fileExists(sLocalFilename)) and (fileSize(sLocalFilename)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=true//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//elseif((fileExists(sLocalArchiveFilename)) and (fileSize(sLocalArchiveFilename)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=true//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////download the file if it doesn't already exist//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(bExists))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpRetrieveFile(ftp\\comma\\sLocalFilename\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Retr \\quot\\+sFtpFilename+\\quot\\: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExist=fileExists(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//iSize=fileSize(sLocalFilename)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////delete the file//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((bExist) and (iSize>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(bEDIDelete)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDeleteFile(ftp\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Delete \\quot\\+sFtpFilename+\\quot\\: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDeleted++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDownload++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: File download failed.  Exists: \\quot\\+bExist+\\quot\\ Size: \\quot\\+iSize)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(bExist)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//fileDelete(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cError++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////update the time that an invoice was last downloaded//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Received\\quot\\\\comma\\r\\comma\\now())//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cError++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\File already exists: \\quot\\+sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(bEDIDelete)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDeleteFile(ftp\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Delete \\quot\\+sFtpFilename+\\quot\\: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDeleted++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cSkipped++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: Invalid filename: \\quot\\+sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//n++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endwhile//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////disconnect//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDisconnect(ftp)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Disconnect: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////return an error.  Could not change to directory//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//ftpDisconnect(ftp)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//return(\\quot\\Error: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////return an error.  Could not connect//crlf////tab////tab////tab////tab////tab////tab////tab////tab//return(\\quot\\Error: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: MissingFTP credentials for StoreID=\\quot\\+sStoreID)//crlf////tab////tab////tab////tab////tab////tab////tab//cCredentialError++//crlf////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Could not locate vendor with HFM Foodservice EDI informaiton\\quot\\)//crlf////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//driverClose(dVendor)//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//nStore++//crlf////tab////tab////tab//endwhile//crlf////crlf////tab////tab////tab//driverClose(dStore)//crlf////crlf////tab////tab////tab//if(cProcessed=0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: No HFM Foodservice vendors found for any stores\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//if(cCredentialErrpr?0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing FTP credentials for \\quot\\+cCredentialErrpr+\\quot\\ stores\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//return(\\quot\\Ok: Downloaded \\quot\\+cDownload+\\quot\\ invoices.  Skipped \\quot\\+cSkipped+\\quot\\ invoices already downloaded\\quot\\)//crlf////crlf////tab////tab////tab//return(\\quot\\Ok\\quot\\)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//^
ID=debug_console|X=1500|Y=23|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=debug_console|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=939204|X=1500|Y=23|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStart|X=151|Y=38|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentStart|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=55622|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=true|AgentReport=onchange|AgentReportTo=getToken(AspectServerHashID)|^
ID=65373|X=183|Y=477|W=119|H=45|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=Result|AgentNodeActionReturnValue=|AgentNodeComment=Ok|AgentNodeTermType=0|^
ID=AgentTabs|X=151|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStart');agentSetVisible(true)\\quot\\>Agent</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentDescription');agentSetVisible(false)\\quot\\>Description</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStatus');agentSetVisible(false)\\quot\\>Status</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentScript');agentSetVisible(false)\\quot\\>Script</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'ScriptText');agentSetVisible(false)\\quot\\>Script (Text)</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentChart');agentSetVisible(false);agentFormatNodes(document.getElementById('AgentChart'));agentDrawConnectors(document.getElementById('AgentChart'))\\quot\\>Chart</span></td>//crlf////tab//</tr>//crlf//</table>//crlf//^
ID=AgentScript|X=151|Y=38|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<conditional expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//<!include type:script; name:\\quot\\agent_Download HFM Invoice\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download HFM Invoice\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 03-27-2018 23:09:04//crlf////crlf////tab////tab////Force reporting when the agent is executed manually//crlf////tab////tab//bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\) or (false))//crlf////crlf////tab////tab////Record the starting time//crlf////tab////tab//tAgentStart=now()//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download HFM Invoice\\comma\\AgentAction\\comma\\55622\\comma\\0\\comma\\Download invoices//crlf////crlf////tab////tab////Download invoices//crlf////tab////tab//Result=execAgentAction(\\quot\\downloadHFMInvoices\\quot\\)//crlf////tab////tab//appendToLog(\\quot\\downloadHFMInvoices ()=\\quot\\+left(Result\\comma\\128))//crlf////crlf////tab////tab////Ok?//crlf////tab////tab//appendToLog(\\quot\\(=startsWith(Result\\comma\\'ok'))=\\quot\\+(=startsWith(Result\\comma\\\\quot\\ok\\quot\\)))//crlf////tab////tab//if(=startsWith(Result\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download HFM Invoice\\comma\\AgentTerminate\\comma\\65373\\comma\\0\\comma\\Ok//crlf////tab////tab////tab//agentReportStatus(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Download HFM Invoice\\quot\\\\comma\\\\quot\\65373\\quot\\\\comma\\0\\comma\\getToken(AspectServerHashID)\\comma\\\\quot\\Ok\\quot\\\\comma\\Result\\comma\\bForceReport\\comma\\now()-tAgentStart\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab//scriptSetResult(Result)//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download HFM Invoice\\comma\\AgentTerminate\\comma\\431364\\comma\\1\\comma\\Error//crlf////tab////tab////tab//agentReportStatus(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Download HFM Invoice\\quot\\\\comma\\\\quot\\431364\\quot\\\\comma\\1\\comma\\getToken(AspectServerHashID)\\comma\\\\quot\\Error\\quot\\\\comma\\Result\\comma\\bForceReport\\comma\\now()-tAgentStart\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab//scriptSetResult(Result)//crlf////tab////tab//endif//crlf////tab//\\quot\\>//crlf//</conditional>^
ID=ScriptText|X=151|Y=38|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<span style='font:8pt tahoma;color:black'>//amp//lt;state//amp//gt;03272018//amp//nbsp;230904//amp//lt;/state//amp//gt;<br>//amp//lt;<span class='includecontrol'>conditional</span>//amp//nbsp;expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)//amp//gt;<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//lt;!<span class='includecontrol'>include</span>//amp//nbsp;type:script;//amp//nbsp;name:\\quot\\agent_Download//amp//nbsp;HFM//amp//nbsp;Invoice\\quot\\;//amp//nbsp;commands:\\quot\\<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Created//amp//nbsp;03-27-2018//amp//nbsp;23:09:04</span><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Force//amp//nbsp;reporting//amp//nbsp;when//amp//nbsp;the//amp//nbsp;agent//amp//nbsp;is//amp//nbsp;executed//amp//nbsp;manually</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\)//amp//nbsp;or//amp//nbsp;(false))<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Record//amp//nbsp;the//amp//nbsp;starting//amp//nbsp;time</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;tAgentStart=<span class='keyword'>now</span>()<br><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Download//amp//nbsp;invoices</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;Result=<span class='keyword'>execAgentAction</span>(\\quot\\downloadHFMInvoices\\quot\\)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>appendToLog</span>(\\quot\\downloadHFMInvoices//amp//nbsp;()=\\quot\\+<span class='keyword'>left</span>(Result\\comma\\128))<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Ok?</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>appendToLog</span>(\\quot\\(=<span class='keyword'>startsWith</span>(Result\\comma\\'ok'))=\\quot\\+(=<span class='keyword'>startsWith</span>(Result\\comma\\\\quot\\ok\\quot\\)))<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'><span class='keyword'>if</span>(</span>=<span class='keyword'>startsWith</span>(Result\\comma\\\\quot\\ok\\quot\\))<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>agentReportStatus</span>(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Download//amp//nbsp;HFM//amp//nbsp;Invoice\\quot\\\\comma\\\\quot\\65373\\quot\\\\comma\\0\\comma\\<span class='keyword'>getToken</span>(AspectServerHashID)\\comma\\\\quot\\Ok\\quot\\\\comma\\Result\\comma\\bForceReport\\comma\\<span class='keyword'>now</span>()-tAgentStart\\comma\\\\quot\\\\quot\\)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(Result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>else</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>agentReportStatus</span>(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Download//amp//nbsp;HFM//amp//nbsp;Invoice\\quot\\\\comma\\\\quot\\431364\\quot\\\\comma\\1\\comma\\<span class='keyword'>getToken</span>(AspectServerHashID)\\comma\\\\quot\\Error\\quot\\\\comma\\Result\\comma\\bForceReport\\comma\\<span class='keyword'>now</span>()-tAgentStart\\comma\\\\quot\\\\quot\\)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(Result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>endif</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;\\quot\\//amp//gt;<br>//amp//lt;/<span class='includecontrol'>conditional</span>//amp//gt;<br><br></span>^
ID=AgentDescription|X=151|Y=38|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStatus|X=151|Y=38|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentChart|X=151|Y=38|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>03272018 230904</state>//crlf//<canvas id=\\quot\\agent_doc_canvas\\quot\\ width=\\quot\\100\\quot\\ height=\\quot\\100\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 100px; height: 100px; border-style: none; z-index: 2;\\quot\\></canvas><div id=\\quot\\chartAgentStart\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart55622\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\137\\quot\\ style=\\quot\\width: 120px; height: 137px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Download HFM Invoice</b><br><span style=\\quot\\font-weight:normal;color:green\\quot\\>Active</span><br><span style=\\quot\\font-weight:normal;color:black\\quot\\>Debugging Is On</span><br>Report Status: onchange<br>Report To: getToken(AspectServerHashID)<br>Name Params: </div></div><div id=\\quot\\chart65373\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 439px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Ok<hr><span style=\\quot\\color:green\\quot\\>Success</span></div></div><div id=\\quot\\chart55622\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart497377\\quot\\ style=\\quot\\position: absolute; top: 189px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\82\\quot\\ style=\\quot\\width: 150px; height: 82px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentaction\\quot\\>Download invoices<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>downloadHFMInvoices<br></td></tr><tr><td><u>Return</u></td><td></td></tr></tbody></table></div></div><div id=\\quot\\chart497377\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart65373\\quot\\ agentchildnonode=\\quot\\chart431364\\quot\\ style=\\quot\\position: absolute; top: 323px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\64\\quot\\ style=\\quot\\width: 150px; height: 64px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentdecision\\quot\\>Ok?<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Sensor</u></td><td>Expression<br></td></tr></tbody></table></div></div><div id=\\quot\\chart431364\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 323px; left: 190px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Error<hr><span style=\\quot\\color:red\\quot\\>Fail</span></div></div>^
ID=55622|X=183|Y=227|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentAction|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=497377|AgentChildNoNode=|AgentSensor=|AgentAction=downloadHFMInvoices|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=Result|AgentNodeComment=Download invoices|AgentNodeTermType=|^
ID=497377|X=183|Y=361|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentDecision|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=65373|AgentChildNoNode=431364|AgentSensor=1|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=~~backslash~~equals~~backslash~~startsWith(Result//comma//~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~ok~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~)|AgentNodeActionReturnValue=|AgentNodeComment=Ok?|AgentNodeTermType=|^
ID=431364|X=373|Y=361|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=Result|AgentNodeActionReturnValue=|AgentNodeComment=Error|AgentNodeTermType=1|
</widget><widget name="Download Reinhart Invoices" group="Inventory" category="EDI" description="" type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Download Reinhart Invoices" modified="05-27-2020 12:28:11" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=true ContainsAgentActions=true TaskInitialStartTime=04-10-2018 00:00:00:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=2 TaskMinutesBetweenExecution=0 TaskSecondsBetweenExecution=0 TaskExecuteSun=true TaskExecuteMon=true TaskExecuteTue=true TaskExecuteWed=true TaskExecuteThu=true TaskExecuteFri=true TaskExecuteSat=true TaskConditional_Expression="(isServer()) and (getToken(\\quote\\AspectHashID\\quote\\)=\\quote\\v8k3ey5q1\\quote\\)" TaskConditional_Expression_Description="" TaskState_Function="" TaskState_Expression_Description="" TaskWidgetParams="" TaskWindowForExecution=0>
Preferences|toolboxx=72|toolboxy=157|aspectfuncx=100|aspectfuncy=100|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=false|aspectfuncVisible=false|PublishFtpFilename=Download Reinhart Invoices.html|PublishToFtpSite=false|PublishFTPAccount=0|PublishFtpDirectory=/|PublishFtpPublicDirectory=/|PublishCopyFile=false|PublishCopyFilename=|PublishWysiwig=false|PublishIncludeAspectScript=false|PublishIncludeAspectStyleshet=false|PublishAsText=false|^
ID=top_bar|X=0|Y=0|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=left_bar|X=0|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=|AlignLeft=top_bar|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=code|X=300|Y=100|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'813735')\\quot\\>Javascript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'AspectScript')\\quot\\>AspectScript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'sensor_list')\\quot\\>Sensors</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'action_list')\\quot\\>Actions</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'debug_console')\\quot\\>Console</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'903348')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=813735|X=300|Y=123|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Javascript|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AspectScript|X=300|Y=123|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=sensor_list|X=300|Y=123|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__SensorExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download Reinhart Invoices.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__sensor_list__\\quot\\=\\quot\\true\\quot\\)>//crlf//</conditional>//crlf////crlf//^
ID=action_list|X=300|Y=123|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=Aspect_Script|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download Reinhart Invoices.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Download Reinhart Invoices\\comma\\processReinhartInvoice\\comma\\action_list\\comma\\Action=processReinhartInvoice\\comma\\private//crlf////tab//Download Reinhart Invoices\\comma\\downloadReinhartInvoices\\comma\\action_list\\comma\\Action=downloadReinhartInvoices\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//processReinhartInvoice//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\processReinhartInvoice\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Processes a Reinhart invoice to remove quotes//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//InputFilename - Name of the input file//crlf////tab////tab//OutputFilename - Name of the output file//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Ok or Error//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\processReinhartInvoice\\quot\\; commands:\\quot\\//crlf////tab////tab////tab////abort if missing InputFilename//crlf////tab////tab////tab//if(undefined(\\quot\\__InputFilename__\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing InpuFilename\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////abort if missing OutputFilename//crlf////tab////tab////tab//if(undefined(\\quot\\__OutputFilename__\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing OutputFilename\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////abort if the input file does not exist//crlf////tab////tab////tab//if(not(fileExists(\\quot\\__InputFilename__\\quot\\)))//crlf////tab////tab////tab////tab//return(\\quot\\Error: File does not exist: __InputFilename__\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////get the input//crlf////tab////tab////tab//sInput=fileGetContent(\\quot\\__InputFilename__\\quot\\)//crlf////crlf////tab////tab////tab////get rid of any quotes//crlf////tab////tab////tab//sOutput=replaceSubstring(sInput\\comma\\char(0x22)\\comma\\\\quot\\\\quot\\)//crlf////crlf////tab////tab////tab//fileWriteContent(\\quot\\__OutputFilename__\\quot\\\\comma\\sOutput)//crlf////tab////tab////tab//return(\\quot\\ok\\quot\\)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//downloadReinhartInvoices//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadReinhartInvoices\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads invoices from the Reinhart server to the Aspect server.  This action //crlf////tab////tab//is called on the Aspect server.  Invoices are then distributed to stores //crlf////tab////tab//after they have been downloaded from Reinhart.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//None//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Ok or Error//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\downloadReinhartInvoices\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab////tab////count files on server and number downloaded//crlf////tab////tab////tab//cFilesOnServer=0//crlf////tab////tab////tab//cDownload=0//crlf////tab////tab////tab//cSkipped=0//crlf////tab////tab////tab//cError=0//crlf////tab////tab////tab//cDeleted=0//crlf////crlf////tab////tab////tab////directory to download to//crlf////tab////tab////tab//sReinhartPendingDir=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\reinhart_invoices\pending\\\quot\\//crlf////tab////tab////tab//if(not(fileExists(sReinhartPendingDir)))//crlf////tab////tab////tab////tab//appendToLog(\\quot\\Creating directory: \\quot\\\\plus\\sReinhartPendingDir)//crlf////tab////tab////tab////tab//fileMakeDirectory(sReinhartPendingDir)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//if((not(fileExists(sReinhartPendingDir))) or (not(fileIsDirectory(sReinhartPendingDir))))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Directory is invalid: \\quot\\\\plus\\sReinhartPendingDir)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////connect to ftp server//crlf////tab////tab////tab//s=ftpConnect(reinhart\\comma\\\\quot\\ftp.rfssales.com\\quot\\\\comma\\\\quot\\AspectSoftware\\quot\\\\comma\\\\quot\\vU3aZafRafRa\\quot\\\\comma\\true)//crlf////tab////tab////tab//appendToLog(\\quot\\Connect to ftp.rfssales.com: \\quot\\\\plus\\s)//crlf////crlf////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////change directory to /OUT//crlf////tab////tab////tab////tab//s=ftpChangeDir(reinhart\\comma\\\\quot\\/Other/AspectSoftware/Invoice\\quot\\)//crlf////tab////tab////tab////tab//appendToLog(\\quot\\chdir to /Other/AspectSoftware/Invoice: \\quot\\\\plus\\s)//crlf////crlf////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////get file list//crlf////tab////tab////tab////tab////tab//arFiles=ftpListFiles(reinhart)//crlf////tab////tab////tab////tab////tab//cFilesOnServer=getElementCount(arFiles\\comma\\char(10))//crlf////tab////tab////tab////tab////tab//if(cFilesOnServer=0)//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\No files on server\\quot\\)//crlf////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////doenload the files//crlf////tab////tab////tab////tab////tab////tab//n=0//crlf////tab////tab////tab////tab////tab////tab//while(n<cFilesOnServer)//crlf////tab////tab////tab////tab////tab////tab////tab////get the filename//crlf////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=trim(getElement(arFiles\\comma\\n\\comma\\char(10)))//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////the filename includes the size and time.  Get only the filename//crlf////tab////tab////tab////tab////tab////tab////tab//n1=pos(char(9)\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab//if(n1>=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\sFtpFilename=\\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\ n1=\\quot\\\\plus\\n1)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=substring(sFtpFilename\\comma\\0\\comma\\n1)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\sFtpFilename2=\\quot\\\\plus\\sFtpFilename)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////get the local filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab//sLocalFilename=sReinhartPendingDir\\plus\\sFtpFilename//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////download the file if it doesn\\apos\\t already exist//crlf////tab////tab////tab////tab////tab////tab////tab////tab//if((not(fileExists(sLocalFilename))) or (fileSize(sLocalFilename)=0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpRetrieveFile(reinhart\\comma\\sLocalFilename\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Retr \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExist=fileExists(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//iSize=fileSize(sLocalFilename)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////delete the file//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((bExist) and (iSize>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDeleteFile(reinhart\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Delete \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDeleted\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDownload\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: File download failed.  Exists: \\quot\\\\plus\\bExist\\plus\\\\quot\\ Size: \\quot\\\\plus\\iSize)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(bExist)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//fileDelete(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cError\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cError\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\File already exists: \\quot\\\\plus\\sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDeleteFile(reinhart\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Delete \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDeleted\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//cSkipped\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: Invalid filename: \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\ n1=\\quot\\\\plus\\n1)//crlf////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab//n\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab//endwhile//crlf////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////disconnect//crlf////tab////tab////tab////tab////tab//s=ftpDisconnect(reinhart)//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Disconnect: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////return an error.  Could not change to directory//crlf////tab////tab////tab////tab////tab//ftpDisconnect(reinhart)//crlf////tab////tab////tab////tab////tab//return(\\quot\\Error: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab//else//crlf////tab////tab////tab////tab////return an error.  Could not connect//crlf////tab////tab////tab////tab//return(\\quot\\Error: \\quot\\\\plus\\s)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//return(\\quot\\Ok: Files: \\quot\\\\plus\\cFilesOnServer\\plus\\\\quot\\ Downloaded: \\quot\\\\plus\\cDownload\\plus\\\\quot\\ Skipped: \\quot\\\\plus\\cSkipped\\plus\\\\quot\\ Errors: \\quot\\\\plus\\cError\\plus\\\\quot\\ Deleted: \\quot\\\\plus\\cDeleted)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//^
ID=debug_console|X=300|Y=123|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=debug_console|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=903348|X=300|Y=123|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStart|X=151|Y=38|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentStart|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=578831|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=never|^
ID=874086|X=151|Y=533|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=Result|AgentNodeActionReturnValue=|AgentNodeComment=Success|AgentNodeTermType=0|^
ID=AgentTabs|X=151|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStart');agentSetVisible(true)\\quot\\>Agent</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentDescription');agentSetVisible(false)\\quot\\>Description</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStatus');agentSetVisible(false)\\quot\\>Status</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentScript');agentSetVisible(false)\\quot\\>Script</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'ScriptText');agentSetVisible(false)\\quot\\>Script (Text)</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentChart');agentSetVisible(false);agentFormatNodes(document.getElementById('AgentChart'));agentDrawConnectors(document.getElementById('AgentChart'))\\quot\\>Chart</span></td>//crlf////tab//</tr>//crlf//</table>//crlf//^
ID=AgentScript|X=151|Y=38|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<conditional expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//<!include type:script; name:\\quot\\agent_Download Reinhart Invoices\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Reinhart Invoices\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 04-10-2018 23:16:00//crlf////crlf////tab////tab////Force reporting when the agent is executed manually//crlf////tab////tab//bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\) or (false))//crlf////crlf////tab////tab////Record the starting time//crlf////tab////tab//tAgentStart=now()//crlf////crlf////crlf////tab////tab////Running On Gambon?//crlf////tab////tab//if((getToken(\\quot\\AspectHashID\\quot\\)=\\quot\\v8k3ey5q1\\quot\\))//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Reinhart Invoices\\comma\\AgentAction\\comma\\92516\\comma\\0\\comma\\downloadReinhartInvoices//crlf////tab////tab////tab//Result=execAgentAction(\\quot\\downloadReinhartInvoices\\quot\\)//crlf////tab////tab////tab//if(startsWith(Result\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Reinhart Invoices\\comma\\AgentTerminate\\comma\\874086\\comma\\0\\comma\\Success//crlf////tab////tab////tab////tab//scriptSetResult(Result)//crlf////tab////tab////tab//else//crlf////tab////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Reinhart Invoices\\comma\\AgentTerminate\\comma\\650391\\comma\\1\\comma\\An error occurred//crlf////tab////tab////tab////tab//scriptSetResult(Result)//crlf////tab////tab////tab//endif//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Reinhart Invoices\\comma\\AgentTerminate\\comma\\16192\\comma\\1\\comma\\Error//crlf////tab////tab////tab//scriptSetResult(=\\quot\\Not running on server\\quot\\)//crlf////tab////tab//endif//crlf////tab//\\quot\\>//crlf//</conditional>^
ID=ScriptText|X=151|Y=38|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<span style='font:8pt tahoma;color:black'>//amp//lt;state//amp//gt;04102018//amp//nbsp;231600//amp//lt;/state//amp//gt;<br>//amp//lt;<span class='includecontrol'>conditional</span>//amp//nbsp;expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)//amp//gt;<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//lt;!<span class='includecontrol'>include</span>//amp//nbsp;type:script;//amp//nbsp;name:\\quot\\agent_Download//amp//nbsp;Reinhart//amp//nbsp;Invoices\\quot\\;//amp//nbsp;commands:\\quot\\<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Created//amp//nbsp;04-10-2018//amp//nbsp;23:16:00</span><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Force//amp//nbsp;reporting//amp//nbsp;when//amp//nbsp;the//amp//nbsp;agent//amp//nbsp;is//amp//nbsp;executed//amp//nbsp;manually</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\)//amp//nbsp;or//amp//nbsp;(false))<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Record//amp//nbsp;the//amp//nbsp;starting//amp//nbsp;time</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;tAgentStart=<span class='keyword'>now</span>()<br><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Running//amp//nbsp;On//amp//nbsp;Gambon?</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'><span class='keyword'>if</span>(</span>(<span class='keyword'>getToken</span>(\\quot\\AspectHashID\\quot\\)=\\quot\\v8k3ey5q1\\quot\\))<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;Result=<span class='keyword'>execAgentAction</span>(\\quot\\downloadReinhartInvoices\\quot\\)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'><span class='keyword'>if</span>(</span><span class='keyword'>startsWith</span>(Result\\comma\\\\quot\\ok\\quot\\))<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(Result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>else</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(Result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>endif</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>else</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(=\\quot\\Not//amp//nbsp;running//amp//nbsp;on//amp//nbsp;server\\quot\\)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>endif</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;\\quot\\//amp//gt;<br>//amp//lt;/<span class='includecontrol'>conditional</span>//amp//gt;<br><br></span>^
ID=AgentDescription|X=151|Y=38|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStatus|X=151|Y=38|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentChart|X=151|Y=38|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>04102018 231600</state>//crlf//<canvas id=\\quot\\agent_doc_canvas\\quot\\ width=\\quot\\100\\quot\\ height=\\quot\\100\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 100px; height: 100px; border-style: none; z-index: 2;\\quot\\></canvas><div id=\\quot\\chartAgentStart\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart578831\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\111\\quot\\ style=\\quot\\width: 120px; height: 111px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Download Reinhart Invoices</b><br><span style=\\quot\\font-weight:normal;color:green\\quot\\>Active</span><br><span style=\\quot\\font-weight:normal;color:black\\quot\\>Debugging Is Off</span><br>Report Status: never<br>Report To: <br>Name Params: </div></div><div id=\\quot\\chart874086\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 495px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Success<hr><span style=\\quot\\color:green\\quot\\>Success</span></div></div><div id=\\quot\\chart578831\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart92516\\quot\\ agentchildnonode=\\quot\\chart16192\\quot\\ style=\\quot\\position: absolute; top: 163px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\77\\quot\\ style=\\quot\\width: 150px; height: 64px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentdecision\\quot\\>Running On Gambon?<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Sensor</u></td><td>Expression<br></td></tr></tbody></table></div></div><div id=\\quot\\chart16192\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 163px; left: 190px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Error<hr><span style=\\quot\\color:red\\quot\\>Fail</span></div></div><div id=\\quot\\chart92516\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart276484\\quot\\ style=\\quot\\position: absolute; top: 279px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\56\\quot\\ style=\\quot\\width: 150px; height: 56px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentaction\\quot\\><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>downloadReinhartInvoices<br></td></tr><tr><td><u>Return</u></td><td>Result</td></tr></tbody></table></div></div><div id=\\quot\\chart276484\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart874086\\quot\\ agentchildnonode=\\quot\\chart650391\\quot\\ style=\\quot\\position: absolute; top: 387px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\38\\quot\\ style=\\quot\\width: 150px; height: 38px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentdecision\\quot\\><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Sensor</u></td><td>Expression<br></td></tr></tbody></table></div></div><div id=\\quot\\chart650391\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 387px; left: 190px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>An error occurred<hr><span style=\\quot\\color:red\\quot\\>Fail</span></div></div>^
ID=578831|X=151|Y=201|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentDecision|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=92516|AgentChildNoNode=16192|AgentSensor=1|AgentAction=0|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=(getToken(\\quot\\AspectHashID\\quot\\)\equals\\\quot\\v8k3ey5q1\\quot\\)|AgentNodeActionReturnValue=Result|AgentNodeComment=Running On Gambon?|AgentNodeTermType=|^
ID=16192|X=341|Y=201|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=\equals\\\quot\\Not running on server\\quot\\|AgentNodeActionReturnValue=|AgentNodeComment=Error|AgentNodeTermType=1|^
ID=92516|X=151|Y=317|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentAction|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=276484|AgentChildNoNode=|AgentSensor=|AgentAction=downloadReinhartInvoices|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=Result|AgentNodeComment=|AgentNodeTermType=|^
ID=276484|X=151|Y=425|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentDecision|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=874086|AgentChildNoNode=650391|AgentSensor=1|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=startsWith(Result//comma//\\quot\\ok\\quot\\)|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=650391|X=341|Y=425|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=Result|AgentNodeActionReturnValue=|AgentNodeComment=An error occurred|AgentNodeTermType=1|
</widget><widget name="Distribute Reinhart Invoices" group="Inventory" category="EDI" description="" type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Distribute Reinhart Invoices" modified="05-27-2020 12:28:00" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=04-10-2018 00:00:00:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=3 TaskMinutesBetweenExecution=0 TaskSecondsBetweenExecution=0 TaskExecuteSun=true TaskExecuteMon=true TaskExecuteTue=true TaskExecuteWed=true TaskExecuteThu=true TaskExecuteFri=true TaskExecuteSat=true TaskConditional_Expression="isServer()" TaskConditional_Expression_Description="" TaskState_Function="" TaskState_Expression_Description="" TaskWidgetParams="" TaskWindowForExecution=0>
Preferences|toolboxx=36|toolboxy=172|aspectfuncx=100|aspectfuncy=100|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=false|aspectfuncVisible=false|PublishFtpFilename=Distribute Reinhart Invoices.html|PublishToFtpSite=false|PublishFTPAccount=0|PublishFtpDirectory=/|PublishFtpPublicDirectory=/|PublishCopyFile=false|PublishCopyFilename=|PublishWysiwig=false|PublishIncludeAspectScript=false|PublishIncludeAspectStyleshet=false|PublishAsText=false|^
ID=top_bar|X=0|Y=0|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=left_bar|X=0|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=|AlignLeft=top_bar|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=code|X=300|Y=100|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'752876')\\quot\\>Javascript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AspectScript')\\quot\\>AspectScript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'sensor_list')\\quot\\>Sensors</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'action_list')\\quot\\>Actions</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'789993')\\quot\\>Reinhart Invoices On Server</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'debug_console')\\quot\\>Console</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'552440')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=752876|X=300|Y=125|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Javascript|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AspectScript|X=300|Y=125|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=sensor_list|X=300|Y=125|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__SensorExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Distribute Reinhart Invoices.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__sensor_list__\\quot\\=\\quot\\true\\quot\\)>//crlf//</conditional>//crlf////crlf//^
ID=action_list|X=300|Y=125|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=Aspect_Script|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Distribute Reinhart Invoices.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Distribute Reinhart Invoices\\comma\\sendReinhartNotifications\\comma\\action_list\\comma\\Action=sendReinhartNotifications\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//sendReinhartNotifications//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\sendReinhartNotifications\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Sends notifications to any customers with a Reinhart invoice available//crlf////tab////tab//in the reinhart_invoices/pending folder.//crlf////tab////crlf////tab////tab//The notification consists of an argument named files in the format://crlf////tab////tab//files=filename1//power//size1~~pipe~~filename2//power//size2...  The size is used to verify//crlf////tab////tab//that the file was received fully.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//None//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Ok or Error//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\sendReinhartNotifications\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Send Reinhart notifications started\\quot\\)//crlf////tab////tab////tab//tStart=now()//crlf////crlf////tab////tab////tab////open the driver used to list Reinhart invoices//crlf////tab////tab////tab//sDriverName=getSalt(6)//crlf////tab////tab////tab//sDriverParams=\\quot\\filespec=\\quot\\\\plus\\getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\reinhart_invoices/pending/*.edifact\\quot\\//crlf////tab////tab////tab//sDriverParams=sDriverParams\\plus\\\\quot\\~~pipe~~DriverID=Aspect_Support_Reinhart_Invoice_Dir_List~~pipe~~recurse=false~~pipe~~DriverName=\\quot\\\\plus\\sDriverName//crlf////tab////tab////tab//driverOpen(Aspect_Support_Reinhart_Invoice_Dir_List\\comma\\dFiles\\comma\\READ\\comma\\true\\comma\\sDriverParams)//crlf////crlf////tab////tab////tab////sort by HashID so invoices are grouped by HashID//crlf////tab////tab////tab//driverSetFilter(dFiles\\comma\\\\quot\\gt(len(HashID)\\comma\\0\\comma\\n)\\quot\\\\comma\\false)//crlf////tab////tab////tab//driverSetSort(dFiles\\comma\\\\quot\\HashID\\quot\\\\comma\\true)//crlf////tab////tab////tab//c=driverGetRecordCount(dFiles)//crlf////tab////tab////tab//appendToLog(\\quot\\There are \\quot\\\\plus\\c\\plus\\\\quot\\ pending invoices\\quot\\)//crlf////tab////tab////tab////crlf////tab////tab////tab//dtEnableCutoff=parseTime(\\quot\\02192015\\quot\\\\comma\\\\quot\\MMddyyyy\\quot\\)//crlf////tab////tab////tab//dt60DaysAgo=incrementTime(now()\\comma\\-60)//crlf////tab////tab////tab////crlf////tab////tab////tab//n=0//crlf////tab////tab////tab//sLastHashID=\\quot\\\\quot\\//crlf////tab////tab////tab//arFiles=\\quot\\\\quot\\//crlf////tab////tab////tab//cSent=0//crlf////tab////tab////tab//cExpired=0//crlf////tab////tab////tab//cNotConnected=0//crlf////crlf////tab////tab////tab//while(n<c) //crlf////tab////tab////tab////tab//sHashID=trim(driverGetField(dFiles\\comma\\\\quot\\HashID\\quot\\\\comma\\n))//crlf////tab////tab////tab////tab//if(len(sHashID)>0)//crlf////tab////tab////tab////tab////tab////send notification if moving to the next HashID//crlf////tab////tab////tab////tab////tab//if((sLastHashID<>\\quot\\\\quot\\) and (sHashID<>sLastHashID))//crlf////tab////tab////tab////tab////tab////tab//if(isDirectSocketConnected(sLastHashID)<>\\quot\\Not connected\\quot\\)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab//if(_getAllowAccess(sLastHashID))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////send a notification to execute the agent on the customer\\apos\\s computer//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Sending Reinhart notification to \\quot\\\\plus\\sLastHashID\\plus\\\\quot\\ Data=\\quot\\\\plus\\arFiles)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//sData=\\quot\\DocumentID=L4HxWEciR8sT7E30IKVZXD70\\amp\\Widget=Receive Reinhart Invoices\\amp\\ContainerItemID=AgentScript\\amp\\ExecAgentScript=true\\quot\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab//sData=sData\\plus\\\\quot\\\\amp\\FileList=\\quot\\\\plus\\arFiles//crlf////tab////tab////tab////tab////tab////tab////tab////tab//sendNotification(sLastHashID\\comma\\13\\comma\\sData\\comma\\\\quot\\\\quot\\\\comma\\10\\comma\\\\quot\\\\quot\\\\comma\\\\quot\\\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//cSent=cSent \\plus\\ 1//crlf////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Not sending Reinhart notification to \\quot\\\\plus\\sLastHashID\\plus\\\\quot\\ because support expired \\quot\\\\plus\\sSupportExpires)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//cExpired=cExpired \\plus\\ 1//crlf////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Not sending Reinhart notification to \\quot\\\\plus\\sLastHashID\\plus\\\\quot\\ because not conncted\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab//cNotConnected\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab//arFiles=\\quot\\\\quot\\//crlf////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab//sCustomerNo=trim(driverGetField(dFiles\\comma\\\\quot\\Customer_Number\\quot\\\\comma\\n))//crlf////tab////tab////tab////tab////tab//s=driverGetField(dFiles\\comma\\\\quot\\Filename\\quot\\\\comma\\n)//crlf////tab////tab////tab////tab////tab//sFilename=fileName(s)\\plus\\fileExt(s)//crlf////tab////tab////tab////tab////tab//iSize=driverGetField(dFiles\\comma\\\\quot\\size\\quot\\\\comma\\n)//crlf////tab////tab////tab////tab////tab//arFiles=addElement(arFiles\\comma\\sFilename\\plus\\\\quot\\//power//\\quot\\\\plus\\iSize\\comma\\\\quot\\~~pipe~~\\quot\\)//crlf////tab////tab////tab////tab////tab//sLastHashID=sHashID//crlf////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Could not get HashID for invoice: \\quot\\\\plus\\driverGetField(dFiles\\comma\\\\quot\\filename\\quot\\\\comma\\n))//crlf////tab////tab////tab////tab////tab//cMissingHashID=cMissingHashID\\plus\\1//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////crlf////tab////tab////tab////tab//n=n\\plus\\1//crlf////tab////tab////tab//endwhile//crlf////tab////tab////tab////crlf////tab////tab////tab////send the last notification//crlf////tab////tab////tab//if(sLastHashID<>\\quot\\\\quot\\) //crlf////tab////tab////tab////tab//if(isDirectSocketConnected(sLastHashID)<>\\quot\\Not connected\\quot\\)//crlf////tab////tab////tab////tab////tab//if(_getAllowAccess(sLastHashID))//crlf////tab////tab////tab////tab////tab////tab////send a notification to execute the agent on the customer\\apos\\s computer//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Sending Reinhart notification to \\quot\\\\plus\\sLastHashID\\plus\\\\quot\\ Data=\\quot\\\\plus\\arFiles)//crlf////tab////tab////tab////tab////tab////tab//sData=\\quot\\DocumentID=L4HxWEciR8sT7E30IKVZXD70\\amp\\Widget=Receive Reinhart Invoices\\amp\\ContainerItemID=AgentScript\\amp\\ExecAgentScript=true\\quot\\//crlf////tab////tab////tab////tab////tab////tab//sData=sData\\plus\\\\quot\\\\amp\\FileList=\\quot\\\\plus\\arFiles//crlf////tab////tab////tab////tab////tab////tab//sendNotification(sLastHashID\\comma\\13\\comma\\sData\\comma\\\\quot\\\\quot\\\\comma\\5\\comma\\\\quot\\\\quot\\\\comma\\\\quot\\\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//cSent=cSent \\plus\\ 1//crlf////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Not sending Reinhart notification to \\quot\\\\plus\\sLastHashID\\plus\\\\quot\\ because support expired \\quot\\\\plus\\sSupportExpires)//crlf////tab////tab////tab////tab////tab////tab//cExpired=cExpired \\plus\\ 1//crlf////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Not sending Reinhart notification to \\quot\\\\plus\\sLastHashID\\plus\\\\quot\\ because not conncted\\quot\\)//crlf////tab////tab////tab////tab////tab//cNotConnected\\plus\\\\plus\\//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab//endif//crlf////tab////tab////tab////crlf////tab////tab////tab////archive all files more than 30 days old//crlf////tab////tab////tab//dt=dateNumber(incrementTime(now()\\comma\\-14))//crlf////tab////tab////tab//sFilter=\\quot\\(lt(dateNumber(RemoteModified)\\comma\\\\quot\\\\plus\\dateNumber(dt)\\plus\\\\quot\\\\comma\\n)) and (gt(len(Customer_Number)\\comma\\0\\comma\\n))\\quot\\//crlf////tab////tab////tab////appendToLog(\\quot\\sFilter=\\quot\\\\plus\\sFilter)//crlf////tab////tab////tab//driverSetFilter(dFiles\\comma\\sFilter\\comma\\true)//crlf////tab////tab////tab//c=driverGetRecordCount(dFiles)//crlf////tab////tab////tab//appendToLog(\\quot\\Archiving \\quot\\\\plus\\c\\plus\\\\quot\\ of \\quot\\\\plus\\driverGetRecordCount(dFiles\\comma\\true)\\plus\\\\quot\\ files\\quot\\)//crlf////tab////tab////tab//n=0//crlf////tab////tab////tab//while(n<c)//crlf////tab////tab////tab////tab//s=driverGetField(dFiles\\comma\\\\quot\\Filename\\quot\\\\comma\\n)//crlf////tab////tab////tab////tab//appendToLog(\\quot\\Archiving \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab//fileMove(s\\comma\\getToken(\\quot\\ReinhartArchiveDir\\quot\\)\\plus\\fileName(s)\\plus\\fileExt(s)\\comma\\true)//crlf////tab////tab////tab////tab//n\\plus\\\\plus\\//crlf////tab////tab////tab//endwhile//crlf////crlf////tab////tab////tab//driverClose(dFiles)//crlf////crlf////tab////tab////tab//s=\\quot\\Ok: Sent: \\quot\\\\plus\\cSent\\plus\\\\quot\\ Expired Support: \\quot\\\\plus\\cExpired\\plus\\\\quot\\ Not connected: \\quot\\\\plus\\cNotConnected//crlf////tab////tab////tab//return(s)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//^
ID=debug_console|X=300|Y=125|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=debug_console|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=552440|X=300|Y=125|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStart|X=183|Y=40|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentStart|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=216539|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=never|^
ID=452541|X=183|Y=425|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=result|AgentNodeActionReturnValue=|AgentNodeComment=Ok|AgentNodeTermType=0|^
ID=AgentTabs|X=183|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStart');agentSetVisible(true)\\quot\\>Agent</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentDescription');agentSetVisible(false)\\quot\\>Description</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStatus');agentSetVisible(false)\\quot\\>Status</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentScript');agentSetVisible(false)\\quot\\>Script</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'ScriptText');agentSetVisible(false)\\quot\\>Script (Text)</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentChart');agentSetVisible(false);agentFormatNodes(document.getElementById('AgentChart'));agentDrawConnectors(document.getElementById('AgentChart'))\\quot\\>Chart</span></td>//crlf////tab//</tr>//crlf//</table>//crlf//^
ID=AgentScript|X=183|Y=40|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<conditional expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//<!include type:script; name:\\quot\\agent_Distribute Reinhart Invoices\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Distribute Reinhart Invoices\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 04-10-2018 23:14:43//crlf////crlf////tab////tab////Force reporting when the agent is executed manually//crlf////tab////tab//bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\) or (false))//crlf////crlf////tab////tab////Record the starting time//crlf////tab////tab//tAgentStart=now()//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Distribute Reinhart Invoices\\comma\\AgentAction\\comma\\216539\\comma\\0\\comma\\sendReinhartNotifications//crlf////tab////tab//result=execAgentAction(\\quot\\sendReinhartNotifications\\quot\\)//crlf////crlf////tab////tab////Result Ok?//crlf////tab////tab//if(startsWith(result\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Distribute Reinhart Invoices\\comma\\AgentTerminate\\comma\\452541\\comma\\0\\comma\\Ok//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Distribute Reinhart Invoices\\comma\\AgentTerminate\\comma\\752688\\comma\\1\\comma\\Error//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//endif//crlf////tab//\\quot\\>//crlf//</conditional>^
ID=ScriptText|X=183|Y=40|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<span style='font:8pt tahoma;color:black'>//amp//lt;state//amp//gt;04102018//amp//nbsp;231443//amp//lt;/state//amp//gt;<br>//amp//lt;<span class='includecontrol'>conditional</span>//amp//nbsp;expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)//amp//gt;<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//lt;!<span class='includecontrol'>include</span>//amp//nbsp;type:script;//amp//nbsp;name:\\quot\\agent_Distribute//amp//nbsp;Reinhart//amp//nbsp;Invoices\\quot\\;//amp//nbsp;commands:\\quot\\<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Created//amp//nbsp;04-10-2018//amp//nbsp;23:14:43</span><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Force//amp//nbsp;reporting//amp//nbsp;when//amp//nbsp;the//amp//nbsp;agent//amp//nbsp;is//amp//nbsp;executed//amp//nbsp;manually</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\)//amp//nbsp;or//amp//nbsp;(false))<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Record//amp//nbsp;the//amp//nbsp;starting//amp//nbsp;time</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;tAgentStart=<span class='keyword'>now</span>()<br><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;result=<span class='keyword'>execAgentAction</span>(\\quot\\sendReinhartNotifications\\quot\\)<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Result//amp//nbsp;Ok?</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'><span class='keyword'>if</span>(</span><span class='keyword'>startsWith</span>(result\\comma\\\\quot\\ok\\quot\\))<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>else</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>endif</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;\\quot\\//amp//gt;<br>//amp//lt;/<span class='includecontrol'>conditional</span>//amp//gt;<br><br></span>^
ID=AgentDescription|X=183|Y=40|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStatus|X=183|Y=40|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentChart|X=183|Y=40|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>04102018 231443</state>//crlf//<canvas id=\\quot\\agent_doc_canvas\\quot\\ width=\\quot\\100\\quot\\ height=\\quot\\100\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 100px; height: 100px; border-style: none; z-index: 2;\\quot\\></canvas><div id=\\quot\\chartAgentStart\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart216539\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\111\\quot\\ style=\\quot\\width: 120px; height: 111px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Distribute Reinhart Invoices</b><br><span style=\\quot\\font-weight:normal;color:green\\quot\\>Active</span><br><span style=\\quot\\font-weight:normal;color:black\\quot\\>Debugging Is Off</span><br>Report Status: never<br>Report To: <br>Name Params: </div></div><div id=\\quot\\chart452541\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 387px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\46\\quot\\ style=\\quot\\width: 120px; height: 46px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><span style=\\quot\\color:black\\quot\\>Other</span></div></div><div id=\\quot\\chart216539\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart586815\\quot\\ style=\\quot\\position: absolute; top: 163px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\56\\quot\\ style=\\quot\\width: 150px; height: 56px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentaction\\quot\\><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>sendReinhartNotifications<br></td></tr><tr><td><u>Return</u></td><td>result</td></tr></tbody></table></div></div><div id=\\quot\\chart586815\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart452541\\quot\\ agentchildnonode=\\quot\\chart752688\\quot\\ style=\\quot\\position: absolute; top: 271px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\64\\quot\\ style=\\quot\\width: 150px; height: 64px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentdecision\\quot\\>Result Ok?<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Sensor</u></td><td>Expression<br></td></tr></tbody></table></div></div><div id=\\quot\\chart752688\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 271px; left: 190px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Error<hr><span style=\\quot\\color:red\\quot\\>Fail</span></div></div>^
ID=789993|X=300|Y=125|W=863|H=775|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<conditional expression:(true) or (\\quot\\__getContent__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//<include type:expression; expression:htmlConstant(\\quot\\salt\\quot\\\\comma\\\\quot\\__\\quot\\\\comma\\lowerCase(getSalt(4)))>//crlf////crlf////tab//[!------------------------------------------------------------------------//crlf////tab//Default filespec if none supplied//crlf////tab//--------------------------------------------------------------------------]//crlf////tab//<include type:expression; expression:htmlConstant(\\quot\\filespec\\quot\\\\comma\\\\quot\\__filespec__\\quot\\\\comma\\getToken(\\quot\\homedir\\quot\\)+\\quot\\reinhart_invoices\pending\*.*\\quot\\)>//crlf////crlf////tab//[!------------------------------------------------------------------------//crlf////tab//Param: Select Pending or Archive//crlf////tab//--------------------------------------------------------------------------]//crlf////tab//<!include type:ExternalDriverParam;//crlf////tab////tab//InputType:\\quot\\select\\quot\\;//crlf////tab////tab//ID:\\quot\\__salt__ParamDirectorySelection\\quot\\;//crlf////tab////tab//Param:\\quot\\Filespec=c:\aspect7\reinhart_invoices\$value$\\quot\\;//crlf////tab////tab//Tooltip:\\quot\\\\quot\\;//crlf////tab////tab//HtmlParams:\\quot\\\\quot\\;//crlf////tab////tab//CollectionID:\\quot\\Aspect_Support_Vendor_EDI_Directory_Selection\\quot\\;//crlf////tab////tab//Datalist:\\quot\\false\\quot\\;//crlf////tab////tab//Selected:\\quot\\\\quot\\;//crlf////tab////tab//DriverParams:\\quot\\\\quot\\;//crlf////tab////tab//Filter:\\quot\\\\quot\\;//crlf////tab////tab//SystemDriverName:\\quot\\\\quot\\;//crlf////tab//>//crlf////crlf////tab//[!------------------------------------------------------------------------//crlf////tab//Filter: Contains text//crlf////tab//--------------------------------------------------------------------------]//crlf////tab//<!include type:ExternalDriverFilter;//crlf////tab////tab//InputType:\\quot\\text\\quot\\;//crlf////tab////tab//ID:\\quot\\__salt__ContainsText\\quot\\;//crlf////tab////tab//Condition:\\quot\\not(len(trim('$value$'))=0)\\quot\\;//crlf////tab////tab//Expression:\\quot\\\\quot\\;//crlf////tab////tab//Tooltip:\\quot\\\\quot\\;//crlf////tab////tab//HtmlParams:\\quot\\placeholder='Contains text'\\quot\\;//crlf////tab////tab//CollectionID:\\quot\\\\quot\\;//crlf////tab////tab//Datalist:\\quot\\\\quot\\;//crlf////tab////tab//Selected:\\quot\\\\quot\\;//crlf////tab////tab//DriverParams:\\quot\\\\quot\\;//crlf////tab////tab//Filter:\\quot\\\\quot\\;//crlf////tab////tab//SystemDriverName:\\quot\\\\quot\\;//crlf////tab//>//crlf////crlf////tab//<!include type:driver;//crlf////tab////tab//ver: \\quot\\1.0\\quot\\;//crlf////tab////tab//title: \\quot\\\\quot\\;//crlf////tab////tab//ID: \\quot\\\\quot\\;//crlf////tab////tab//HashID: \\quot\\\\quot\\;//crlf////tab////tab//driver: \\quot\\ASPECT_SUPPORT_REINHART_INVOICE_DIR_LIST\\quot\\;//crlf////tab////tab//name: \\quot\\\\quot\\;//crlf////tab////tab//systemdriver: \\quot\\false\\quot\\;//crlf////tab////tab//dispose: \\quot\\false\\quot\\;//crlf////tab////tab//state: \\quot\\\\quot\\;//crlf////tab////tab//params: \\quot\\filespec=__Filespec__~~pipe~~recurse=false~~pipe~~maxdir=1~~pipe~~metadata=Downloaded_REINHART_Invoices~~pipe~~DriverID=Aspect_Support_Reinhart_Invoice_Dir_List~~pipe~~DriverName=__salt__~~pipe~~KeyExpression=filename~~pipe~~CacheTtl=0\\quot\\;//crlf////tab////tab//keyDescription: \\quot\\\\quot\\;//crlf////tab////tab//display: \\quot\\\\quot\\;//crlf////tab////tab//fields: \\quot\\\\quot\\;//crlf////tab////tab//IncludeFields: \\quot\\\\quot\\;//crlf////tab////tab//ExcludeFields: \\quot\\\\quot\\;//crlf////tab////tab//sort: \\quot\\ID\\quot\\;//crlf////tab////tab//filter: \\quot\\true\\quot\\;//crlf////tab////tab//BaseFilter: \\quot\\\\quot\\;//crlf////tab////tab//class: \\quot\\basic1\\quot\\;//crlf////tab////tab//maxrecords: \\quot\\250\\quot\\;//crlf////tab////tab//startrecord: \\quot\\0\\quot\\;//crlf////tab////tab//style: \\quot\\width:auto\\quot\\;//crlf////tab////tab//_style: \\quot\\float:left;width:100\\percent\\\\quot\\;//crlf////tab////tab//height:\\quot\\auto\\quot\\;//crlf////tab////tab//_maxheight:\\quot\\300px\\quot\\;//crlf////tab////tab//canSelect: \\quot\\false\\quot\\;//crlf////tab////tab//readOnly: \\quot\\false\\quot\\;//crlf////tab////tab//canEdit: \\quot\\false\\quot\\;//crlf////tab////tab//canAdd: \\quot\\false\\quot\\;//crlf////tab////tab//canDelete: \\quot\\false\\quot\\;//crlf////tab////tab//inspectMenu: \\quot\\\\quot\\;//crlf////tab////tab//EmbedValues: \\quot\\\\quot\\;//crlf////tab////tab//EditDialogID: \\quot\\ASPECT_SUPPORT_REINHART_INVOICE_DIR_LISTDialog\\quot\\;//crlf////tab////tab//DialogHeader: \\quot\\false\\quot\\;//crlf////tab////tab//canCloseDialog: \\quot\\true\\quot\\;//crlf////tab////tab//ExternalParams: \\quot\\__salt__ParamDirectorySelection\\quot\\;//crlf////tab////tab//ExternalFilters: \\quot\\__salt__ContainsText\\quot\\;//crlf////tab////tab//TableControls: \\quot\\true\\quot\\;//crlf////tab////tab//TableHeader: \\quot\\true\\quot\\;//crlf////tab////tab//TableBorder: \\quot\\true\\quot\\;//crlf////tab////tab//RecordCount: \\quot\\true\\quot\\;//crlf////tab////tab//Timestamp: \\quot\\true\\quot\\;//crlf////tab////tab//SelectDisplay: \\quot\\true\\quot\\;//crlf////tab////tab//EditDisplay: \\quot\\true\\quot\\;//crlf////tab////tab//Menu: \\quot\\\\quot\\;//crlf////tab////tab//faq: \\quot\\4LWZhVR9\\quot\\;//crlf////tab////tab//procedure: \\quot\\\\quot\\;//crlf////tab////tab//video: \\quot\\\\quot\\;//crlf////tab////tab//Messages: \\quot\\true\\quot\\;//crlf////tab////tab//ChartType: \\quot\\\\quot\\;//crlf////tab////tab//ChartWidth: \\quot\\640\\quot\\;//crlf////tab////tab//ChartHeight: \\quot\\480\\quot\\;//crlf////tab////tab//ChartLabels: \\quot\\Down_45\\quot\\;//crlf////tab////tab//ChartTitle: \\quot\\\\quot\\;//crlf////tab////tab//ChartStyle: \\quot\\display:none\\quot\\;//crlf////tab////tab//RefreshInterval: \\quot\\0\\quot\\;//crlf////tab////tab//RefreshWhenHidden: \\quot\\true\\quot\\;//crlf////tab////tab//RefreshIntervalRemote: \\quot\\0\\quot\\;//crlf////tab////tab//RefreshWhenHiddenRemote: \\quot\\true\\quot\\;//crlf////tab////tab//_Javascript: \\quot\\DocumentID~~pipe~~Widget~~pipe~~ContainerItemID~~pipe~~Params\\quot\\;//crlf////tab////tab//debug: \\quot\\false\\quot\\;//crlf////tab//>//crlf//</conditional>^
ID=216539|X=183|Y=201|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentAction|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=586815|AgentChildNoNode=|AgentSensor=|AgentAction=sendReinhartNotifications|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=result|AgentNodeComment=|AgentNodeTermType=|^
ID=586815|X=183|Y=309|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentDecision|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=452541|AgentChildNoNode=752688|AgentSensor=1|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=startsWith(result//comma//\\quot\\ok\\quot\\)|AgentNodeActionReturnValue=|AgentNodeComment=Result Ok?|AgentNodeTermType=|^
ID=752688|X=373|Y=309|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=result|AgentNodeActionReturnValue=|AgentNodeComment=Error|AgentNodeTermType=1|
</widget><widget name="Receive Reinhart Invoices" group="Inventory" category="EDI" description="" type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Receive Reinhart Invoices" modified="04-10-2018 23:30:50" modifiedby="Thnikpad3" TaskEnabled=false IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=04-10-2018 22:33:18:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=0 TaskMinutesBetweenExecution=0 TaskSecondsBetweenExecution=0 TaskExecuteSun=true TaskExecuteMon=true TaskExecuteTue=true TaskExecuteWed=true TaskExecuteThu=true TaskExecuteFri=true TaskExecuteSat=true TaskConditional_Expression="" TaskConditional_Expression_Description="" TaskState_Function="" TaskState_Expression_Description="" TaskWidgetParams="" TaskWindowForExecution=0>
Preferences|toolboxx=29|toolboxy=180|aspectfuncx=50|aspectfuncy=50|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=null|aspectfuncVisible=false|PublishFtpFilename=Receive Reinhart Invoices.html|PublishToFtpSite=false|PublishFTPAccount=0|PublishFtpDirectory=/|PublishFtpPublicDirectory=/|PublishCopyFile=false|PublishCopyFilename=|PublishWysiwig=false|PublishIncludeAspectScript=false|PublishIncludeAspectStyleshet=false|PublishAsText=false|^
ID=top_bar|X=0|Y=0|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=left_bar|X=0|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=|AlignLeft=top_bar|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=code|X=300|Y=100|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'749378')\\quot\\>Javascript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'AspectScript')\\quot\\>AspectScript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'sensor_list')\\quot\\>Sensors</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'action_list')\\quot\\>Actions</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'debug_console')\\quot\\>Console</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'980366')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=749378|X=300|Y=123|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Javascript|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AspectScript|X=300|Y=123|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=sensor_list|X=300|Y=123|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__SensorExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Receive Reinhart Invoices.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__sensor_list__\\quot\\=\\quot\\true\\quot\\)>//crlf//</conditional>//crlf////crlf//^
ID=action_list|X=300|Y=123|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=Aspect_Script|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\cache~~backslash~~WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Receive Reinhart Invoices.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Receive Reinhart Invoices\\comma\\requestReinhartInvoices\\comma\\action_list\\comma\\Action=requestReinhartInvoices\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//requestReinhartInvoices//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\requestReinhartInvoices\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//This action is executed on the customer\\apos\\s side to request specific invoices //crlf////tab////tab//form the server.  The server invokes this action using a notification.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//FileList - List of files in the form filename//power//size~~pipe~~filename//power//size//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Ok or Error//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\requestReinhartInvoices\\quot\\; commands:\\quot\\//crlf////tab////tab////tab////crlf////tab////tab////tab////abort if missing FileList//crlf////tab////tab////tab//if(undefined(\\quot\\__FileList__\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing FileList\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////abort if no files in list//crlf////tab////tab////tab//cFiles=getElementCount(\\quot\\__FileList__\\quot\\\\comma\\\\quot\\~~pipe~~\\quot\\)//crlf////tab////tab////tab//if(cFiles=0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: No files in list\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////get the server\\apos\\s IP address. if testing\\comma\\ use the local IP address//crlf////tab////tab////tab//sServerIP=getToken(\\quot\\aspectserverip1a\\quot\\)//crlf////crlf////tab////tab////tab//cReceived=0//crlf////tab////tab////tab//cError=0//crlf////tab////tab////tab////crlf////tab////tab////tab//n=0//crlf////tab////tab////tab//while(n<cFiles)//crlf////tab////tab////tab////tab//s=getElement(\\quot\\__FileList__\\quot\\\\comma\\n\\comma\\\\quot\\~~pipe~~\\quot\\)//crlf////tab////tab////tab////tab//sFilename=getElement(s\\comma\\0\\comma\\\\quot\\//power//\\quot\\)//crlf////tab////tab////tab////tab//iSize=value(getElement(s\\comma\\1\\comma\\\\quot\\//power//\\quot\\))//crlf////crlf////tab////tab////tab////tab////see if the file already exists//crlf////tab////tab////tab////tab//sLocalFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\invoices~~backslash~~\\quot\\\\plus\\sFilename//crlf////tab////tab////tab////tab//sLocalArchiveName=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\invoices~~backslash~~archive~~backslash~~\\quot\\\\plus\\sFilename//crlf////tab////tab////tab////tab//bExists=(fileExists(sLocalFilename)) or (fileExists(sLocalArchiveName))//crlf////crlf////tab////tab////tab////tab////if the file doesn\\apos\\t exist\\comma\\ get it from the server//crlf////tab////tab////tab////tab//if(not(bExists))//crlf////tab////tab////tab////tab////tab//sUrl=\\quot\\http://\\quot\\\\plus\\sServerIP\\plus\\\\quot\\:4446/?Network=Aspect_Support\\amp\\ID=getReinhartInvoice\\amp\\Filename=\\quot\\\\plus\\sFilename//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Requesting \\quot\\\\plus\\sUrl)//crlf////tab////tab////tab////tab////tab//sContent=fileGetContent(sUrl)//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Got \\quot\\\\plus\\len(sContent)\\plus\\\\quot\\ bytes.  Size1=\\quot\\\\plus\\iSize)//crlf////tab////crlf////tab////tab////tab////tab////tab//bUseSecureServer=false//crlf////tab////tab////tab////tab////tab//if(len(sContent)<iSize)//crlf////tab////tab////tab////tab////tab////tab//sUrl2=\\quot\\https://\\quot\\\\plus\\sServerIP\\plus\\\\quot\\:4447/?Network=Aspect_Support\\amp\\ID=getReinhartInvoice\\amp\\Filename=\\quot\\\\plus\\sFilename//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Requesting (secure) \\quot\\\\plus\\sUrl2)//crlf////tab////tab////tab////tab////tab////tab//sContent=fileGetContent(sUrl2)//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Got \\quot\\\\plus\\len(sContent)\\plus\\\\quot\\ bytes.  Size=\\quot\\\\plus\\iSize\\plus\\\\quot\\ using secure connection\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//bUseSecureServer=true//crlf////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab//if(len(sContent)=iSize) //crlf////tab////tab////tab////tab////tab////tab////save the file //crlf////tab////tab////tab////tab////tab////tab//fileWriteContent(sLocalFilename\\comma\\sContent)//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Saved invoice to \\quot\\\\plus\\sLocalFilename)//crlf////crlf////tab////tab////tab////tab////tab////tab////send a message to the server that the invoice hass been successfully downloaded//crlf////tab////tab////tab////tab////tab////tab//if(bUseSecureServer)//crlf////tab////tab////tab////tab////tab////tab////tab//sUrl=\\quot\\https://\\quot\\\\plus\\sServerIP\\plus\\\\quot\\:4447/?Network=Aspect_Support\\amp\\ID=confirmReinhartInvoice\\amp\\Filename=\\quot\\\\plus\\sFilename//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Sending confirmation \\quot\\\\plus\\sUrl)//crlf////tab////tab////tab////tab////tab////tab////tab//s=fileGetContent(sUrl)//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Confirmed=\\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab//sUrl=\\quot\\http://\\quot\\\\plus\\sServerIP\\plus\\\\quot\\:4446/?Network=Aspect_Support\\amp\\ID=confirmReinhartInvoice\\amp\\Filename=\\quot\\\\plus\\sFilename//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Sending confirmation \\quot\\\\plus\\sUrl)//crlf////tab////tab////tab////tab////tab////tab////tab//s=fileGetContent(sUrl)//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Confirmed=\\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab//cReceived\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error getting invoice: \\quot\\\\plus\\sFilename\\plus\\\\quot\\ Size=\\quot\\\\plus\\iSize\\plus\\\\quot\\ Received=\\quot\\\\plus\\len(sContent))//crlf////tab////tab////tab////tab////tab////tab//cError\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//else //crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\File already exists: \\quot\\\\plus\\sFilename)//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////crlf////tab////tab////tab////tab//n=n\\plus\\1//crlf////tab////tab////tab//endwhile//crlf////crlf////tab////tab////tab//s=\\quot\\Received: \\quot\\\\plus\\cReceived\\plus\\\\quot\\ Error: \\quot\\\\plus\\cError//crlf////tab////tab////tab//if(cError=0) //crlf////tab////tab////tab////tab//s=\\quot\\Ok: \\quot\\\\plus\\s//crlf////tab////tab////tab//else//crlf////tab////tab////tab////tab//s=\\quot\\Error: \\quot\\\\plus\\s//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//return(s)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//^
ID=debug_console|X=300|Y=123|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=debug_console|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=980366|X=300|Y=123|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStart|X=183|Y=38|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentStart|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=288412|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=never|^
ID=479735|X=183|Y=425|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=result|AgentNodeActionReturnValue=|AgentNodeComment=Ok|AgentNodeTermType=0|^
ID=AgentTabs|X=183|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStart');agentSetVisible(true)\\quot\\>Agent</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentDescription');agentSetVisible(false)\\quot\\>Description</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStatus');agentSetVisible(false)\\quot\\>Status</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentScript');agentSetVisible(false)\\quot\\>Script</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'ScriptText');agentSetVisible(false)\\quot\\>Script (Text)</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentChart');agentSetVisible(false);agentFormatNodes(document.getElementById('AgentChart'));agentDrawConnectors(document.getElementById('AgentChart'))\\quot\\>Chart</span></td>//crlf////tab//</tr>//crlf//</table>//crlf//^
ID=AgentScript|X=183|Y=38|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<conditional expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//<!include type:script; name:\\quot\\agent_Receive Reinhart Invoices\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Receive Reinhart Invoices\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 04-10-2018 22:48:21//crlf////crlf////tab////tab////Force reporting when the agent is executed manually//crlf////tab////tab//bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\) or (false))//crlf////crlf////tab////tab////Record the starting time//crlf////tab////tab//tAgentStart=now()//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Receive Reinhart Invoices\\comma\\AgentAction\\comma\\288412\\comma\\0\\comma\\requestReinhartInvoices//crlf////tab////tab//execAgentAction(\\quot\\requestReinhartInvoices\\quot\\\\comma\\\\quot\\FileList=__FileList__\\quot\\)//crlf////crlf////tab////tab////Result Ok?//crlf////tab////tab//if(startsWith(result\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Receive Reinhart Invoices\\comma\\AgentTerminate\\comma\\479735\\comma\\0\\comma\\Ok//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Receive Reinhart Invoices\\comma\\AgentTerminate\\comma\\585697\\comma\\1\\comma\\Error//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//endif//crlf////tab//\\quot\\>//crlf//</conditional>^
ID=ScriptText|X=183|Y=38|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<span style='font:8pt tahoma;color:black'>//amp//lt;state//amp//gt;04102018//amp//nbsp;224821//amp//lt;/state//amp//gt;<br>//amp//lt;<span class='includecontrol'>conditional</span>//amp//nbsp;expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)//amp//gt;<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//lt;!<span class='includecontrol'>include</span>//amp//nbsp;type:script;//amp//nbsp;name:\\quot\\agent_Receive//amp//nbsp;Reinhart//amp//nbsp;Invoices\\quot\\;//amp//nbsp;commands:\\quot\\<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Created//amp//nbsp;04-10-2018//amp//nbsp;22:48:21</span><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Force//amp//nbsp;reporting//amp//nbsp;when//amp//nbsp;the//amp//nbsp;agent//amp//nbsp;is//amp//nbsp;executed//amp//nbsp;manually</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\)//amp//nbsp;or//amp//nbsp;(false))<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Record//amp//nbsp;the//amp//nbsp;starting//amp//nbsp;time</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;tAgentStart=<span class='keyword'>now</span>()<br><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>execAgentAction</span>(\\quot\\requestReinhartInvoices\\quot\\\\comma\\\\quot\\FileList=__FileList__\\quot\\)<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Result//amp//nbsp;Ok?</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'><span class='keyword'>if</span>(</span><span class='keyword'>startsWith</span>(result\\comma\\\\quot\\ok\\quot\\))<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>else</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>endif</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;\\quot\\//amp//gt;<br>//amp//lt;/<span class='includecontrol'>conditional</span>//amp//gt;<br><br></span>^
ID=AgentDescription|X=183|Y=38|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStatus|X=183|Y=38|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentChart|X=183|Y=38|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>04102018 224821</state>//crlf//<canvas id=\\quot\\agent_doc_canvas\\quot\\ width=\\quot\\100\\quot\\ height=\\quot\\100\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 100px; height: 100px; border-style: none; z-index: 2;\\quot\\></canvas><div id=\\quot\\chartAgentStart\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart288412\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\111\\quot\\ style=\\quot\\width: 120px; height: 111px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Receive Reinhart Invoices</b><br><span style=\\quot\\font-weight:normal;color:green\\quot\\>Active</span><br><span style=\\quot\\font-weight:normal;color:black\\quot\\>Debugging Is Off</span><br>Report Status: never<br>Report To: <br>Name Params: </div></div><div id=\\quot\\chart479735\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 387px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\46\\quot\\ style=\\quot\\width: 120px; height: 46px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><span style=\\quot\\color:black\\quot\\>Other</span></div></div><div id=\\quot\\chart288412\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart283265\\quot\\ style=\\quot\\position: absolute; top: 163px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\56\\quot\\ style=\\quot\\width: 150px; height: 56px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentaction\\quot\\><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>requestReinhartInvoices<br></td></tr><tr><td><u>Return</u></td><td></td></tr></tbody></table></div></div><div id=\\quot\\chart283265\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart479735\\quot\\ agentchildnonode=\\quot\\chart585697\\quot\\ style=\\quot\\position: absolute; top: 271px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\64\\quot\\ style=\\quot\\width: 150px; height: 64px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentdecision\\quot\\>Result Ok?<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Sensor</u></td><td>Expression<br></td></tr></tbody></table></div></div><div id=\\quot\\chart585697\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 271px; left: 190px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Error<hr><span style=\\quot\\color:red\\quot\\>Fail</span></div></div>^
ID=288412|X=183|Y=201|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentAction|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=283265|AgentChildNoNode=|AgentSensor=|AgentAction=requestReinhartInvoices|AgentNodeNotes=|AgentNodeParams=~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~FileList~~backslash~~equals~~backslash~~__FileList__~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=283265|X=183|Y=309|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentDecision|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=479735|AgentChildNoNode=585697|AgentSensor=1|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=startsWith(result//comma//~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~ok~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~)|AgentNodeActionReturnValue=|AgentNodeComment=Result Ok?|AgentNodeTermType=|^
ID=585697|X=373|Y=309|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=result|AgentNodeActionReturnValue=|AgentNodeComment=Error|AgentNodeTermType=1|
</widget><widget name="Download Labatt Invoice" group="Inventory" category="Invoice Downloads" description="" type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Download Labatt Invoice" modified="11-20-2019 17:48:42" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=11-08-2019 00:00:00:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=0 TaskMinutesBetweenExecution=1 TaskSecondsBetweenExecution=0 TaskExecuteSun=true TaskExecuteMon=true TaskExecuteTue=true TaskExecuteWed=true TaskExecuteThu=true TaskExecuteFri=true TaskExecuteSat=true TaskConditional_Expression="(getToken(\\quote\\POSInterface_StoreID\\quote\\)\\lt\\\\gt\\\\quote\\Undefined\\quote\\) and (len(lookup(Aspect_BackOffice_Vendor_ID_by_EDI_Selection,\\quote\\Labatt\\quote\\,0,\\quote\\StoreID=\\quote\\+getToken(\\quote\\POSInterface_StoreID\\quote\\)))\\gt\\0)" TaskConditional_Expression_Description="Executes when Labatt EDI information is defined for a vendor in the store with the pos interface enabled" TaskState_Function="hour(now())+gfs(replaceSubstring(getSetFor(getCollection(Aspect_BackOffice_Store_Directory_By_ID,true,\\quote\\\\quote\\,\\quote\\\\quote\\,\\quote\\,\\quote\\,\\quote\\value\\quote\\),\\quote\\vendor.bin\\quote\\),char(0x2C),char(0x3B)))+getToken(\\quote\\POSInterface_StoreID\\quote\\)" TaskState_Expression_Description="Executes when the hour changes, when a vendor file is updated and when the ID of the store with the pos interface enabled changes." TaskWidgetParams="" TaskWindowForExecution=0>
Preferences|toolboxx=47|toolboxy=110|aspectfuncx=100|aspectfuncy=100|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=false|aspectfuncVisible=false|PublishFtpFilename=Download Labatt Invoice.html|PublishToFtpSite=false|PublishFTPAccount=0|PublishFtpDirectory=/|PublishFtpPublicDirectory=/|PublishCopyFile=false|PublishCopyFilename=|PublishWysiwig=false|PublishIncludeAspectScript=false|PublishIncludeAspectStyleshet=false|PublishAsText=false|^
ID=top_bar|X=0|Y=0|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=left_bar|X=0|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=|AlignLeft=top_bar|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=code|X=1500|Y=0|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'124384')\\quot\\>Javascript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'AspectScript')\\quot\\>AspectScript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'sensor_list')\\quot\\>Sensors</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'action_list')\\quot\\>Actions</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'debug_console')\\quot\\>Console</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'776906')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=124384|X=1500|Y=26|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Javascript|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AspectScript|X=1500|Y=26|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=sensor_list|X=1500|Y=26|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__SensorExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download Labatt Invoice.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__sensor_list__\\quot\\=\\quot\\true\\quot\\)>//crlf//</conditional>//crlf////crlf//^
ID=action_list|X=1500|Y=26|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=Aspect_Script|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download Labatt Invoice.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Download Labatt Invoice\\comma\\evaluateLabattTaskCondition\\comma\\action_list\\comma\\Action=evaluateLabattTaskCondition\\comma\\private//crlf////tab//Download Labatt Invoice\\comma\\downloadLabattInvoices\\comma\\action_list\\comma\\Action=downloadLabattInvoices\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//evaluateLabattTaskCondition//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\evaluateLabattTaskCondition\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//This action is used to debug the conditional expression used to execute this agent.//crlf////tab////tab//It can be deleted.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//none//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Information about the conditional expression//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\evaluateLabattTaskCondition\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//s1=\\quot\\POSInterface_StoreID=\\quot\\+getToken(\\quot\\POSInterface_StoreID\\quot\\)//crlf////tab////tab////tab//s2=\\quot\\Lookup VendorID=\\quot\\+lookup(Aspect_BackOffice_Vendor_ID_by_EDI_Selection\\comma\\\\quot\\Labatt\\quot\\\\comma\\0\\comma\\\\quot\\StoreID=\\quot\\+getToken(\\quot\\POSInterface_StoreID\\quot\\))//crlf////tab////tab////tab//b=(getToken(\\quot\\POSInterface_StoreID\\quot\\)<>\\quot\\Undefined\\quot\\) and (len(lookup(Aspect_BackOffice_Vendor_ID_by_EDI_Selection\\comma\\\\quot\\Labatt\\quot\\\\comma\\0\\comma\\\\quot\\StoreID=\\quot\\+getToken(\\quot\\POSInterface_StoreID\\quot\\)))>0)//crlf////tab////tab////tab//return(s1+getToken(\\quot\\br\\quot\\)+s2+getToken(br)+\\quot\\eval=\\quot\\+b)//tab////tab////tab////crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//downloadLabattInvoices//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadLabattInvoices\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads any new invoices from the Labatt FTP site.  Invoices are downloaded to the //crlf////tab////tab//[homedir]invoices directory.  An invoice will not be downloaded if it already exists //crlf////tab////tab//in the [homedir]invoices or [homedir]invoices\archive directory.  Invoices are downloaded//crlf////tab////tab//for the store with the ID matching the token POSInterface_StoreID which is set by the //crlf////tab////tab//POS Interface agent.  This means that the pos interface must be enabled for a store to //crlf////tab////tab//download invoices.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//None//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Ok or Error//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\downloadLabattInvoices\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Download Labatt Invoices\\quot\\)//crlf////crlf////tab////tab////tab////abort if POSInterface_StoreID if blank or equals Undefined//crlf////tab////tab////tab//if(getSystemValue(\\quot\\DevelopmentMode\\quot\\))//crlf////tab////tab////tab////tab//setToken(\\quot\\POSInterface_StoreID\\quot\\\\comma\\\\quot\\fZcw1GYINpAKkHrCzx3QTjPW\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//s=getToken(\\quot\\POSInterface_StoreID\\quot\\)//crlf////tab////tab////tab//if((len(s)=0) or (s=\\quot\\Undefined\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Aborting because no store has POS interface enabled\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////open the store driver//crlf////tab////tab////tab//driverOpen(Aspect_BackOffice_Store\\comma\\dStore\\comma\\WRITE)\\comma\\//crlf////tab////tab////tab//driverSetFilter(dStore\\comma\\\\quot\\true\\quot\\\\comma\\true)//crlf////crlf////tab////tab////tab//cProcessed=0//crlf////tab////tab////tab//cDownload=0//crlf////tab////tab////tab//cError=0//crlf////tab////tab////tab//cSkipped=0//crlf////tab////tab////tab//cDeleted=0//crlf////tab////tab////tab//cCredentialError=0//crlf////tab////tab////tab//cStore=driverGetRecordCount(dStore)//crlf////tab////tab////tab//nStore=0//crlf////tab////tab////tab//while(nStore<cStore)//crlf////tab////tab////tab////tab//sStoreID=driverGetField(dStore\\comma\\\\quot\\ID\\quot\\\\comma\\nStore)//crlf////tab////tab////tab////tab//if(sStoreID=getToken(\\quot\\POSInterface_StoreID\\quot\\))//crlf////tab////tab////tab////tab////tab//sStoreName=driverGetField(dStore\\comma\\\\quot\\Store_Name\\quot\\\\comma\\nStore)//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Downloading Labatt invoices for \\quot\\+sStoreName)//crlf////crlf////tab////tab////tab////tab////tab////open the vendor driver for the store//crlf////tab////tab////tab////tab////tab//driverOpen(Aspect_Back_Office_Vendor\\comma\\dVendor\\comma\\WRITE\\comma\\false\\comma\\\\quot\\StoreID=\\quot\\+sStoreID)//crlf////tab////tab////tab////tab////tab//r=driverFindRecordAbsolute(dVendor\\comma\\0\\comma\\\\quot\\EDI_Vendor=\\quot\\+quote(\\quot\\Labatt\\quot\\))//crlf////tab////tab////tab////tab////tab//if(r>=0)//crlf////tab////tab////tab////tab////tab////tab////increment the number of vendor records processed//crlf////tab////tab////tab////tab////tab////tab//cProcessed++//crlf////crlf////tab////tab////tab////tab////tab////tab//sVendorID=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\ID\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sVendorName=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\Name\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Ftp_Site\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sEDIUserName=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_UserName\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sEDIPassword=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Password\\quot\\\\comma\\r)//crlf////crlf////tab////tab////tab////tab////tab////tab////this should be true.  It is set to false for testing.//crlf////tab////tab////tab////tab////tab////tab//if(getSystemValue(\\quot\\DevelopmentMode\\quot\\))//crlf////tab////tab////tab////tab////tab////tab////tab//bEDIDelete=false//crlf////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab//bEDIDelete=true//crlf////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////update the time that a check was last made to download invoices //crlf////tab////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Check\\quot\\\\comma\\r\\comma\\now())//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Verify time last checked=\\quot\\+driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Check\\quot\\\\comma\\r))//crlf////crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Downloading invoices for vendor: \\quot\\+sVendorName+\\quot\\ ID: \\quot\\+sVendorID)//crlf////crlf////tab////tab////tab////tab////tab////tab//remove ftp:// and other slashes from host name//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\ftp:\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\\\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////crlf////tab////tab////tab////tab////tab////tab//if((len(sEDIFtpSite)>0) and (len(sEDIUserName)>0) and (len(sEDIPassword)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////connect to ftp server//crlf////tab////tab////tab////tab////tab////tab////tab//s=ftpConnect(ftp\\comma\\sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\true)//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Connect to \\quot\\+sEDIFtpSite+\\quot\\: \\quot\\+s)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////get file list//crlf////tab////tab////tab////tab////tab////tab////tab////tab//arFiles=ftpListFiles(ftp)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//cFilesOnServer=getElementCount(arFiles\\comma\\char(10))//crlf////tab////tab////tab////tab////tab////tab////tab////tab//if(cFilesOnServer=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\No files on server\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////download the files//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//n=0//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//while(n<cFilesOnServer)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////get the filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=getElement(arFiles\\comma\\n\\comma\\char(10))//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////the filename includes the size and time.  Get only the filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////The filename may use either a .txt or .csv extension//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//n1=pos(\\quot\\.txt\\quot\\\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(n1<0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//n1=pos(\\quot\\.csv\\quot\\\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(n1>=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=substring(sFtpFilename\\comma\\0\\comma\\n1+4)//tab////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\sFtpFilename=\\quot\\+sFtpFilename)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////get the local filename and archived filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalFilename=getToken(\\quot\\homedir\\quot\\)+\\quot\\invoices\\\quot\\+sFtpFilename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalArchiveFilename=getToken(\\quot\\homedir\\quot\\)+\\quot\\invoices\archive\\\quot\\+sFtpFilename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\LocalFilename=\\quot\\+sLocalFilename+\\quot\\ Exists: \\quot\\+fileExists(sLocalFilename)+\\quot\\ Size: \\quot\\+fileSize(sLocalFilename)+\\quot\\ Modified: \\quot\\+fileModified(sLocalFilename))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\LocalArchiveFilename=\\quot\\+sLocalArchiveFilename+\\quot\\ Exists: \\quot\\+fileExists(sLocalArchiveFilename)+\\quot\\ Size: \\quot\\+fileSize(sLocalArchiveFilename)+\\quot\\ Modified: \\quot\\+fileModified(sLocalArchiveFilename))//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////see if the file already exists//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=false//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((fileExists(sLocalFilename)) and (fileSize(sLocalFilename)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=true//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//elseif((fileExists(sLocalArchiveFilename)) and (fileSize(sLocalArchiveFilename)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=true//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////download the file if it doesn't already exist//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(bExists))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpRetrieveFile(ftp\\comma\\sLocalFilename\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Retr \\quot\\+sFtpFilename+\\quot\\: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExist=fileExists(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//iSize=fileSize(sLocalFilename)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////delete the file from the ftp server//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((bExist) and (iSize>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////add the word Labatt as the first line.  This is used by the //crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////getInvoiceFormatID action to identify the invoice//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=fileGetContent(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=\\quot\\Labatt\\quot\\+char(13)+char(10)+s//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//fileWriteContent(sLocalFilename\\comma\\s)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(bEDIDelete)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDeleteFile(ftp\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Delete \\quot\\+sFtpFilename+\\quot\\: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDeleted++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDownload++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: File download failed.  Exists: \\quot\\+bExist+\\quot\\ Size: \\quot\\+iSize)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(bExist)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//fileDelete(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cError++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////update the time that an invoice was last downloaded//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Received\\quot\\\\comma\\r\\comma\\now())//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cError++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\File already exists: \\quot\\+sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(bEDIDelete)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDeleteFile(ftp\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Delete \\quot\\+sFtpFilename+\\quot\\: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDeleted++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cSkipped++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: Invalid filename: \\quot\\+sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//n++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//endwhile//crlf////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////disconnect//crlf////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDisconnect(ftp)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Disconnect: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////return an error.  Could not connect//crlf////tab////tab////tab////tab////tab////tab////tab////tab//return(\\quot\\Error: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: MissingFTP credentials for StoreID=\\quot\\+sStoreID)//crlf////tab////tab////tab////tab////tab////tab////tab//cCredentialError++//crlf////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Could not locate vendor with Labatt EDI informaiton\\quot\\)//crlf////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//driverClose(dVendor)//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//nStore++//crlf////tab////tab////tab//endwhile//crlf////crlf////tab////tab////tab//driverClose(dStore)//crlf////crlf////tab////tab////tab//if(cProcessed=0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: No Labatt vendors found for any stores\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//if(cCredentialErrpr?0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing FTP credentials for \\quot\\+cCredentialErrpr+\\quot\\ stores\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//return(\\quot\\Ok: Downloaded \\quot\\+cDownload+\\quot\\ invoices.  Skipped \\quot\\+cSkipped+\\quot\\ invoices already downloaded\\quot\\)//crlf////crlf////tab////tab////tab//return(\\quot\\Ok\\quot\\)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//^
ID=debug_console|X=1500|Y=26|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=debug_console|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=776906|X=1500|Y=26|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStart|X=183|Y=41|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentStart|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=467408|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=true|AgentReport=onchange|AgentReportTo={AspectServerHashID}|^
ID=916975|X=183|Y=480|W=119|H=45|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=result|AgentNodeActionReturnValue=|AgentNodeComment=Ok|AgentNodeTermType=0|^
ID=AgentTabs|X=183|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStart');agentSetVisible(true)\\quot\\>Agent</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentDescription');agentSetVisible(false)\\quot\\>Description</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStatus');agentSetVisible(false)\\quot\\>Status</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentScript');agentSetVisible(false)\\quot\\>Script</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'ScriptText');agentSetVisible(false)\\quot\\>Script (Text)</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentChart');agentSetVisible(false);agentFormatNodes(document.getElementById('AgentChart'));agentDrawConnectors(document.getElementById('AgentChart'))\\quot\\>Chart</span></td>//crlf////tab//</tr>//crlf//</table>//crlf//^
ID=AgentScript|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<conditional expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//<!include type:script; name:\\quot\\agent_Download Labatt Invoice\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Labatt Invoice\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 11-20-2019 17:48:07//crlf////crlf////tab////tab////Force reporting when the agent is executed manually//crlf////tab////tab//bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\) or (false))//crlf////crlf////tab////tab////Record the starting time//crlf////tab////tab//tAgentStart=now()//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Labatt Invoice\\comma\\AgentAction\\comma\\467408\\comma\\0\\comma\\Download Labatt Invoices//crlf////crlf////tab////tab////Download Labatt Invoices//crlf////tab////tab//result=execAgentAction(\\quot\\downloadLabattInvoices\\quot\\)//crlf////tab////tab//appendToLog(\\quot\\downloadLabattInvoices ()=\\quot\\\\plus\\left(result\\comma\\128))//crlf////crlf////tab////tab////Result Ok?//crlf////tab////tab//appendToLog(\\quot\\(startsWith(result\\comma\\\\apos\\ok\\apos\\))=\\quot\\\\plus\\(startsWith(result\\comma\\\\quot\\ok\\quot\\)))//crlf////tab////tab//if(startsWith(result\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Labatt Invoice\\comma\\AgentTerminate\\comma\\916975\\comma\\0\\comma\\Ok//crlf////tab////tab////tab//agentReportStatus(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Download Labatt Invoice\\quot\\\\comma\\\\quot\\916975\\quot\\\\comma\\0\\comma\\{AspectServerHashID}\\comma\\\\quot\\Ok\\quot\\\\comma\\result\\comma\\bForceReport\\comma\\now()-tAgentStart\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Labatt Invoice\\comma\\AgentTerminate\\comma\\2461\\comma\\1\\comma\\Error//crlf////tab////tab////tab//agentReportStatus(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Download Labatt Invoice\\quot\\\\comma\\\\quot\\2461\\quot\\\\comma\\1\\comma\\{AspectServerHashID}\\comma\\\\quot\\Error\\quot\\\\comma\\result\\comma\\bForceReport\\comma\\now()-tAgentStart\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//endif//crlf////tab//\\quot\\>//crlf//</conditional>^
ID=ScriptText|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<span style='font:8pt tahoma;color:black'>//amp//lt;state//amp//gt;11202019//amp//nbsp;174807//amp//lt;/state//amp//gt;<br>//amp//lt;<span class='includecontrol'>conditional</span>//amp//nbsp;expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)//amp//gt;<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//lt;!<span class='includecontrol'>include</span>//amp//nbsp;type:script;//amp//nbsp;name:\\quot\\agent_Download//amp//nbsp;Labatt//amp//nbsp;Invoice\\quot\\;//amp//nbsp;commands:\\quot\\<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Created//amp//nbsp;11-20-2019//amp//nbsp;17:48:07</span><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Force//amp//nbsp;reporting//amp//nbsp;when//amp//nbsp;the//amp//nbsp;agent//amp//nbsp;is//amp//nbsp;executed//amp//nbsp;manually</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\)//amp//nbsp;or//amp//nbsp;(false))<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Record//amp//nbsp;the//amp//nbsp;starting//amp//nbsp;time</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;tAgentStart=<span class='keyword'>now</span>()<br><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Download//amp//nbsp;Labatt//amp//nbsp;Invoices</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;result=<span class='keyword'>execAgentAction</span>(\\quot\\downloadLabattInvoices\\quot\\)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>appendToLog</span>(\\quot\\downloadLabattInvoices//amp//nbsp;()=\\quot\\\\plus\\<span class='keyword'>left</span>(result\\comma\\128))<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Result//amp//nbsp;Ok?</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>appendToLog</span>(\\quot\\(<span class='keyword'>startsWith</span>(result\\comma\\\\apos\\ok\\apos\\))=\\quot\\\\plus\\(<span class='keyword'>startsWith</span>(result\\comma\\\\quot\\ok\\quot\\)))<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'><span class='keyword'>if</span>(</span><span class='keyword'>startsWith</span>(result\\comma\\\\quot\\ok\\quot\\))<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>agentReportStatus</span>(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Download//amp//nbsp;Labatt//amp//nbsp;Invoice\\quot\\\\comma\\\\quot\\916975\\quot\\\\comma\\0\\comma\\{AspectServerHashID}\\comma\\\\quot\\Ok\\quot\\\\comma\\result\\comma\\bForceReport\\comma\\<span class='keyword'>now</span>()-tAgentStart\\comma\\\\quot\\\\quot\\)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>else</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>agentReportStatus</span>(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Download//amp//nbsp;Labatt//amp//nbsp;Invoice\\quot\\\\comma\\\\quot\\2461\\quot\\\\comma\\1\\comma\\{AspectServerHashID}\\comma\\\\quot\\Error\\quot\\\\comma\\result\\comma\\bForceReport\\comma\\<span class='keyword'>now</span>()-tAgentStart\\comma\\\\quot\\\\quot\\)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>endif</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;\\quot\\//amp//gt;<br>//amp//lt;/<span class='includecontrol'>conditional</span>//amp//gt;<br><br></span>^
ID=AgentDescription|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStatus|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentChart|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>11202019 174807</state>//crlf//<canvas id=\\quot\\agent_doc_canvas\\quot\\ width=\\quot\\100\\quot\\ height=\\quot\\100\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 100px; height: 100px; border-style: none; z-index: 2;\\quot\\></canvas><div id=\\quot\\chartAgentStart\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart467408\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\137\\quot\\ style=\\quot\\width: 120px; height: 137px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Download Labatt Invoice</b><br><span style=\\quot\\font-weight:normal;color:green\\quot\\>Active</span><br><span style=\\quot\\font-weight:normal;color:black\\quot\\>Debugging Is On</span><br>Report Status: onchange<br>Report To: {AspectServerHashID}<br>Name Params: </div></div><div id=\\quot\\chart916975\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 439px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Ok<hr><span style=\\quot\\color:green\\quot\\>Success</span></div></div><div id=\\quot\\chart467408\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart552995\\quot\\ style=\\quot\\position: absolute; top: 189px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\95\\quot\\ style=\\quot\\width: 150px; height: 82px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentaction\\quot\\>Download Labatt Invoices<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>downloadLabattInvoices<br></td></tr><tr><td><u>Return</u></td><td>result</td></tr></tbody></table></div></div><div id=\\quot\\chart552995\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart916975\\quot\\ agentchildnonode=\\quot\\chart2461\\quot\\ style=\\quot\\position: absolute; top: 323px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\64\\quot\\ style=\\quot\\width: 150px; height: 64px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentdecision\\quot\\>Result Ok?<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Sensor</u></td><td><br></td></tr></tbody></table></div></div><div id=\\quot\\chart2461\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 323px; left: 190px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Error<hr><span style=\\quot\\color:red\\quot\\>Fail</span></div></div>^
ID=467408|X=183|Y=230|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentAction|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=552995|AgentChildNoNode=|AgentSensor=|AgentAction=downloadLabattInvoices|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=result|AgentNodeComment=Download Labatt Invoices|AgentNodeTermType=|^
ID=552995|X=183|Y=364|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentDecision|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=916975|AgentChildNoNode=2461|AgentSensor=1|AgentAction=1|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=startsWith(result//comma//~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~ok~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~)|AgentNodeActionReturnValue=|AgentNodeComment=Result Ok?|AgentNodeTermType=|^
ID=2461|X=373|Y=364|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=result|AgentNodeActionReturnValue=|AgentNodeComment=Error|AgentNodeTermType=1|
</widget><widget name="Download Curtze Invoice" group="Inventory" category="Invoice Downloads" description="" type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Download Curtze Invoice" modified="11-10-2020 23:47:53" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=07-20-2020 14:53:00:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=0 TaskMinutesBetweenExecution=1 TaskSecondsBetweenExecution=0 TaskExecuteSun=true TaskExecuteMon=true TaskExecuteTue=true TaskExecuteWed=true TaskExecuteThu=true TaskExecuteFri=true TaskExecuteSat=true TaskConditional_Expression="(getToken(\\quote\\POSInterface_StoreID\\quote\\)\\lt\\\\gt\\\\quote\\Undefined\\quote\\) and (len(lookup(Aspect_BackOffice_Vendor_ID_by_EDI_Selection,\\quote\\curtze\\quote\\,0,\\quote\\StoreID=\\quote\\+getToken(\\quote\\POSInterface_StoreID\\quote\\)))\\gt\\0)" TaskConditional_Expression_Description="Executes when Curtze EDI information is defined for a vendor in the store with the pos interface enabled" TaskState_Function="hour(now())+gfs(replaceSubstring(getSetFor(getCollection(Aspect_BackOffice_Store_Directory_By_ID,true,\\quote\\\\quote\\,\\quote\\\\quote\\,\\quote\\,\\quote\\,\\quote\\value\\quote\\),\\quote\\vendor.bin\\quote\\),char(0x2C),char(0x3B)))+getToken(\\quote\\POSInterface_StoreID\\quote\\)" TaskState_Expression_Description="Executes when the hour changes, when a vendor file is updated and when the ID of the store with the pos interface enabled changes." TaskWidgetParams="" TaskWindowForExecution=0>
Preferences|toolboxx=59|toolboxy=121|aspectfuncx=100|aspectfuncy=100|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=false|aspectfuncVisible=false|PublishFtpFilename=Download Curtze Invoice.html|PublishToFtpSite=false|PublishFTPAccount=0|PublishFtpDirectory=/|PublishFtpPublicDirectory=/|PublishCopyFile=false|PublishCopyFilename=|PublishWysiwig=false|PublishIncludeAspectScript=false|PublishIncludeAspectStyleshet=false|PublishAsText=false|^
ID=top_bar|X=0|Y=0|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=left_bar|X=0|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=|AlignLeft=top_bar|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=code|X=1500|Y=0|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'977633')\\quot\\>Javascript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'AspectScript')\\quot\\>AspectScript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'sensor_list')\\quot\\>Sensors</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'action_list')\\quot\\>Actions</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'debug_console')\\quot\\>Console</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'270559')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=977633|X=1500|Y=26|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Javascript|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AspectScript|X=1500|Y=26|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=sensor_list|X=1500|Y=26|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__SensorExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download Curtze Invoice.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__sensor_list__\\quot\\=\\quot\\true\\quot\\)>//crlf//</conditional>//crlf////crlf//^
ID=action_list|X=1500|Y=26|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=Aspect_Script|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download Curtze Invoice.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Download Curtze Invoice\\comma\\downloadCurtzeInvoices\\comma\\action_list\\comma\\Action=downloadCurtzeInvoices\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//downloadCurtzeInvoices//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadCurtzeInvoices\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads Curtze invoices from Earthlink.    Invoices are downloaded to the //crlf////tab////tab//[homedir]invoices directory.  An invoice will not be downloaded if it already exists //crlf////tab////tab//in the [homedir]invoices or [homedir]invoices\archive directory.  Invoices are downloaded//crlf////tab////tab//for the store with the ID matching the token POSInterface_StoreID which is set by the //crlf////tab////tab//POS Interface agent.  This means that the pos interface must be enabled for a store to //crlf////tab////tab//download invoices.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//None//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Ok or Error//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\downloadCurtzeInvoices\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Download Curtze Invoices\\quot\\)//crlf////crlf////tab////tab////tab////abort if POSInterface_StoreID if blank or equals Undefined//crlf////tab////tab////tab//if(getToken(\\quot\\AspectHashID\\quot\\)<>\\quot\\4idczse69\\quot\\)//crlf////tab////tab////tab////tab//s=getToken(\\quot\\POSInterface_StoreID\\quot\\)//crlf////tab////tab////tab////tab//if((len(s)=0) or (s=\\quot\\Undefined\\quot\\))//crlf////tab////tab////tab////tab////tab//return(\\quot\\Error: Aborting because no store has POS interface enabled\\quot\\)//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////open the store driver//crlf////tab////tab////tab//driverOpen(Aspect_BackOffice_Store\\comma\\dStore\\comma\\WRITE)\\comma\\//crlf////tab////tab////tab//driverSetFilter(dStore\\comma\\\\quot\\true\\quot\\\\comma\\true)//crlf////crlf////tab////tab////tab//cProcessed=0//crlf////tab////tab////tab//cDownload=0//crlf////tab////tab////tab//cError=0//crlf////tab////tab////tab//cSkipped=0//crlf////tab////tab////tab//cDeleted=0//crlf////tab////tab////tab//cCredentialError=0//crlf////tab////tab////tab//cStore=driverGetRecordCount(dStore)//crlf////tab////tab////tab//nStore=0//crlf////tab////tab////tab//while(nStore<cStore)//crlf////tab////tab////tab////tab////For testing: //crlf////tab////tab////tab////tab////U Pick 6 - Harbor: 3fzCxB9KUsq8CTcKaQnejxxY//crlf////tab////tab////tab////tab//sStoreID=driverGetField(dStore\\comma\\\\quot\\ID\\quot\\\\comma\\nStore)//crlf////tab////tab////tab////tab//if((sStoreID=getToken(\\quot\\POSInterface_StoreID\\quot\\)) or (sStoreID=\\quot\\3fzCxB9KUsq8CTcKaQnejxxY\\quot\\))//crlf////tab////tab////tab////tab////tab//sStoreName=driverGetField(dStore\\comma\\\\quot\\Store_Name\\quot\\\\comma\\nStore)//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Downloading Curtze invoices for \\quot\\+sStoreName)//crlf////crlf////tab////tab////tab////tab////tab////open the vendor driver for the store//crlf////tab////tab////tab////tab////tab//driverOpen(Aspect_Back_Office_Vendor\\comma\\dVendor\\comma\\WRITE\\comma\\false\\comma\\\\quot\\StoreID=\\quot\\+sStoreID)//crlf////tab////tab////tab////tab////tab//r=driverFindRecordAbsolute(dVendor\\comma\\0\\comma\\\\quot\\EDI_Vendor=\\quot\\+quote(\\quot\\curtze\\quot\\))//crlf////tab////tab////tab////tab////tab//if(r>=0)//crlf////tab////tab////tab////tab////tab////tab////increment the number of vendor records processed//crlf////tab////tab////tab////tab////tab////tab//cProcessed++//crlf////crlf////tab////tab////tab////tab////tab////tab//sVendorID=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\ID\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sVendorName=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\Name\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=\\quot\\ftp.aspect-software.net\\quot\\//crlf////tab////tab////tab////tab////tab////tab//sEDIUserName=\\quot\\curtze\\percent\\aspect-software.net\\quot\\//crlf////tab////tab////tab////tab////tab////tab//sEDIPassword=\\quot\\skI987bVA\\quot\\//crlf////tab////tab////tab////tab////tab////tab////sEDIFtpSite=\\quot\\192.169.215.186\\quot\\//crlf////tab////tab////tab////tab////tab////tab////sEDIUserName=\\quot\\curtze\\quot\\//crlf////tab////tab////tab////tab////tab////tab////sEDIPassword=\\quot\\ei49IYH0_ke8HJA\\quot\\//crlf////crlf////tab////tab////tab////tab////tab////tab//sEDICustomerNumber=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Customer_Number\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//bEDIDelete=true//crlf////crlf////tab////tab////tab////tab////tab////tab////update the time that a check was last made to download invoices //crlf////tab////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Check\\quot\\\\comma\\r\\comma\\now())//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Verify time last checked=\\quot\\+driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Check\\quot\\\\comma\\r))//crlf////crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Downloading invoices for vendor: \\quot\\+sVendorName+\\quot\\ ID: \\quot\\+sVendorID)//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Customer number: \\quot\\+sEDICustomerNumber)//crlf////crlf////tab////tab////tab////tab////tab////tab//remove ftp:// and other slashes from host name//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\ftp:\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\\\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////crlf////tab////tab////tab////tab////tab////tab//if((len(sEDIFtpSite)>0) and (len(sEDIUserName)>0) and (len(sEDIPassword)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////connect to ftp server//crlf////tab////tab////tab////tab////tab////tab////tab//s=ftpConnect(ftp\\comma\\sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\true)//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Connect to \\quot\\+sEDIFtpSite+\\quot\\: \\quot\\+s)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////get file list//crlf////tab////tab////tab////tab////tab////tab////tab////tab//arFiles=ftpListFiles(ftp)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//cFilesOnServer=getElementCount(arFiles\\comma\\char(10))//crlf////tab////tab////tab////tab////tab////tab////tab////tab//if(cFilesOnServer=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\No files on server\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////download the files//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//n=0//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//while(n<cFilesOnServer)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////get the filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=getElement(arFiles\\comma\\n\\comma\\char(10))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\sFtpFilename1=\\quot\\+sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////the filename includes the size and time.  Get only the filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//n1=pos(\\quot\\.\\quot\\\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(n1>=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=substring(sFtpFilename\\comma\\0\\comma\\n1+4)//tab////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\sFtpFilename2=\\quot\\+sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(startsWith(sFtpFilename\\comma\\sEDICustomerNumber))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////get the local filename and archived filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalFilename=getToken(\\quot\\homedir\\quot\\)+\\quot\\invoices\\\quot\\+sFtpFilename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalArchiveFilename=getToken(\\quot\\homedir\\quot\\)+\\quot\\invoices\archive\\\quot\\+sFtpFilename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\LocalFilename=\\quot\\+sLocalFilename+\\quot\\ Exists: \\quot\\+fileExists(sLocalFilename)+\\quot\\ Size: \\quot\\+fileSize(sLocalFilename)+\\quot\\ Modified: \\quot\\+fileModified(sLocalFilename))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\LocalArchiveFilename=\\quot\\+sLocalArchiveFilename+\\quot\\ Exists: \\quot\\+fileExists(sLocalArchiveFilename)+\\quot\\ Size: \\quot\\+fileSize(sLocalArchiveFilename)+\\quot\\ Modified: \\quot\\+fileModified(sLocalArchiveFilename))//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////see if the file already exists//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=false//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((fileExists(sLocalFilename)) and (fileSize(sLocalFilename)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=true//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//elseif((fileExists(sLocalArchiveFilename)) and (fileSize(sLocalArchiveFilename)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=true//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////download the file if it doesn't already exist//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(bExists))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpRetrieveFile(ftp\\comma\\sLocalFilename\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Retr \\quot\\+sFtpFilename+\\quot\\: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExist=fileExists(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//iSize=fileSize(sLocalFilename)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////delete the file from the ftp server//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((bExist) and (iSize>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDeleteFile(ftp\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Delete \\quot\\+sFtpFilename+\\quot\\: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDeleted++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDownload++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: File download failed.  Exists: \\quot\\+bExist+\\quot\\ Size: \\quot\\+iSize)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(bExist)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//fileDelete(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cError++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////update the time that an invoice was last downloaded//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Received\\quot\\\\comma\\r\\comma\\now())//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cError++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\File already exists: \\quot\\+sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(bEDIDelete)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDeleteFile(ftp\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Delete \\quot\\+sFtpFilename+\\quot\\: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDeleted++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cSkipped++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Skipping : \\quot\\+sFtpFilename+\\quot\\ Customer number is: \\quot\\+sEDICustomerNumber)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: Invalid filename: \\quot\\+sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//n++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//endwhile//crlf////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\No files found on server\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////disconnect//crlf////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDisconnect(ftp)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Disconnect: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////return an error.  Could not connect//crlf////tab////tab////tab////tab////tab////tab////tab////tab//return(\\quot\\Error: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: MissingFTP credentials for StoreID=\\quot\\+sStoreID)//crlf////tab////tab////tab////tab////tab////tab////tab//cCredentialError++//crlf////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Could not locate vendor with Gordons EDI informaiton\\quot\\)//crlf////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//driverClose(dVendor)//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//nStore++//crlf////tab////tab////tab//endwhile//crlf////crlf////tab////tab////tab//driverClose(dStore)//crlf////crlf////tab////tab////tab//if(cProcessed=0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: No Gordons vendors found for any stores\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//if(cCredentialErrpr?0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing FTP credentials for \\quot\\+cCredentialErrpr+\\quot\\ stores\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//return(\\quot\\Ok: Downloaded \\quot\\+cDownload+\\quot\\ invoices.  Skipped \\quot\\+cSkipped+\\quot\\ invoices already downloaded\\quot\\)//crlf////crlf////tab////tab////tab//return(\\quot\\Ok\\quot\\)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//^
ID=debug_console|X=1500|Y=26|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=debug_console|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=270559|X=1500|Y=26|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStart|X=183|Y=41|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentStart|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=565488|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=never|^
ID=523251|X=183|Y=454|W=119|H=45|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=result|AgentNodeActionReturnValue=|AgentNodeComment=ok|AgentNodeTermType=0|^
ID=AgentTabs|X=183|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStart');agentSetVisible(true)\\quot\\>Agent</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentDescription');agentSetVisible(false)\\quot\\>Description</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStatus');agentSetVisible(false)\\quot\\>Status</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentScript');agentSetVisible(false)\\quot\\>Script</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'ScriptText');agentSetVisible(false)\\quot\\>Script (Text)</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentChart');agentSetVisible(false);agentFormatNodes(document.getElementById('AgentChart'));agentDrawConnectors(document.getElementById('AgentChart'))\\quot\\>Chart</span></td>//crlf////tab//</tr>//crlf//</table>//crlf//^
ID=AgentScript|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<conditional expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//<!include type:script; name:\\quot\\agent_Download Curtze Invoice\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Curtze Invoice\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 11-10-2020 13:48:55//crlf////crlf////tab////tab////Force reporting when the agent is executed manually//crlf////tab////tab//bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\) or (false))//crlf////crlf////tab////tab////Record the starting time//crlf////tab////tab//tAgentStart=now()//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Curtze Invoice\\comma\\AgentAction\\comma\\565488\\comma\\0\\comma\\Download Curtze Invoices//crlf////crlf////tab////tab////Download Curtze Invoices//crlf////tab////tab//result=execAgentAction(\\quot\\downloadCurtzeInvoices\\quot\\)//crlf////crlf////tab////tab////Result Ok?//crlf////tab////tab//if(startsWith(result\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Curtze Invoice\\comma\\AgentTerminate\\comma\\523251\\comma\\0\\comma\\ok//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Curtze Invoice\\comma\\AgentTerminate\\comma\\236149\\comma\\1\\comma\\Error//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//endif//crlf////tab//\\quot\\>//crlf//</conditional>^
ID=ScriptText|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<span style='font:8pt tahoma;color:black'>//amp//lt;state//amp//gt;11102020//amp//nbsp;134855//amp//lt;/state//amp//gt;<br>//amp//lt;<span class='includecontrol'>conditional</span>//amp//nbsp;expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)//amp//gt;<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//lt;!<span class='includecontrol'>include</span>//amp//nbsp;type:script;//amp//nbsp;name:\\quot\\agent_Download//amp//nbsp;Curtze//amp//nbsp;Invoice\\quot\\;//amp//nbsp;commands:\\quot\\<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Created//amp//nbsp;11-10-2020//amp//nbsp;13:48:55</span><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Force//amp//nbsp;reporting//amp//nbsp;when//amp//nbsp;the//amp//nbsp;agent//amp//nbsp;is//amp//nbsp;executed//amp//nbsp;manually</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\)//amp//nbsp;or//amp//nbsp;(false))<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Record//amp//nbsp;the//amp//nbsp;starting//amp//nbsp;time</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;tAgentStart=<span class='keyword'>now</span>()<br><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Download//amp//nbsp;Curtze//amp//nbsp;Invoices</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;result=<span class='keyword'>execAgentAction</span>(\\quot\\downloadCurtzeInvoices\\quot\\)<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Result//amp//nbsp;Ok?</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'><span class='keyword'>if</span>(</span><span class='keyword'>startsWith</span>(result\\comma\\\\quot\\ok\\quot\\))<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>else</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>endif</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;\\quot\\//amp//gt;<br>//amp//lt;/<span class='includecontrol'>conditional</span>//amp//gt;<br><br></span>^
ID=AgentDescription|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStatus|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentChart|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>11102020 134855</state>//crlf//<canvas id=\\quot\\agent_doc_canvas\\quot\\ width=\\quot\\100\\quot\\ height=\\quot\\100\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 100px; height: 100px; border-style: none; z-index: 2;\\quot\\></canvas><div id=\\quot\\chartAgentStart\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart565488\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\111\\quot\\ style=\\quot\\width: 120px; height: 111px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Download Curtze Invoice</b><br><span style=\\quot\\font-weight:normal;color:green\\quot\\>Active</span><br><span style=\\quot\\font-weight:normal;color:black\\quot\\>Debugging Is Off</span><br>Report Status: never<br>Report To: <br>Name Params: </div></div><div id=\\quot\\chart523251\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 413px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>ok<hr><span style=\\quot\\color:green\\quot\\>Success</span></div></div><div id=\\quot\\chart565488\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart811746\\quot\\ style=\\quot\\position: absolute; top: 163px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\95\\quot\\ style=\\quot\\width: 150px; height: 82px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentaction\\quot\\>Download Curtze Invoices<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>downloadCurtzeInvoices<br></td></tr><tr><td><u>Return</u></td><td>result</td></tr></tbody></table></div></div><div id=\\quot\\chart811746\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart523251\\quot\\ agentchildnonode=\\quot\\chart236149\\quot\\ style=\\quot\\position: absolute; top: 297px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\64\\quot\\ style=\\quot\\width: 150px; height: 64px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentdecision\\quot\\>Result Ok?<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Sensor</u></td><td>Expression<br></td></tr></tbody></table></div></div><div id=\\quot\\chart236149\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 297px; left: 190px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Error<hr><span style=\\quot\\color:black\\quot\\>Other</span></div></div>^
ID=565488|X=183|Y=204|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentAction|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=811746|AgentChildNoNode=|AgentSensor=|AgentAction=downloadCurtzeInvoices|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=result|AgentNodeComment=Download Curtze Invoices|AgentNodeTermType=|^
ID=811746|X=183|Y=338|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentDecision|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=523251|AgentChildNoNode=236149|AgentSensor=1|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=startsWith(result//comma//~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~ok~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~)|AgentNodeActionReturnValue=|AgentNodeComment=Result Ok?|AgentNodeTermType=|^
ID=236149|X=373|Y=338|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=result|AgentNodeActionReturnValue=|AgentNodeComment=Error|AgentNodeTermType=1|
</widget><widget name="Download Fintech Invoices" group="Inventory" category="Invoice Downloads" description="" type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Download Fintech Invoices" modified="10-21-2020 14:43:01" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=09-11-2020 16:26:00:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=0 TaskMinutesBetweenExecution=1 TaskSecondsBetweenExecution=0 TaskExecuteSun=true TaskExecuteMon=true TaskExecuteTue=true TaskExecuteWed=true TaskExecuteThu=true TaskExecuteFri=true TaskExecuteSat=true TaskConditional_Expression="(getToken(\\quote\\POSInterface_StoreID\\quote\\)\\lt\\\\gt\\\\quote\\Undefined\\quote\\) and (len(lookup(Aspect_BackOffice_Vendor_ID_by_EDI_Selection,\\quote\\Fintech\\quote\\,0,\\quote\\StoreID=\\quote\\+getToken(\\quote\\POSInterface_StoreID\\quote\\)))\\gt\\0)" TaskConditional_Expression_Description="Executes when Fintech EDI information is defined for a vendor in the store with the pos interface enabled" TaskState_Function="hour(now())+gfs(replaceSubstring(getSetFor(getCollection(Aspect_BackOffice_Store_Directory_By_ID,true,\\quote\\\\quote\\,\\quote\\\\quote\\,\\quote\\,\\quote\\,\\quote\\value\\quote\\),\\quote\\vendor.bin\\quote\\),char(0x2C),char(0x3B)))+getToken(\\quote\\POSInterface_StoreID\\quote\\)" TaskState_Expression_Description="Executes when the hour changes, when a vendor file is updated and when the ID of the store with the pos interface enabled changes." TaskWidgetParams="" TaskWindowForExecution=0>
Preferences|toolboxx=52|toolboxy=141|aspectfuncx=100|aspectfuncy=100|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=false|aspectfuncVisible=false|PublishFtpFilename=Download Fintech Invoices.html|PublishToFtpSite=false|PublishFTPAccount=0|PublishFtpDirectory=/|PublishFtpPublicDirectory=/|PublishCopyFile=false|PublishCopyFilename=|PublishWysiwig=false|PublishIncludeAspectScript=false|PublishIncludeAspectStyleshet=false|PublishAsText=false|^
ID=top_bar|X=0|Y=0|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=left_bar|X=0|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=|AlignLeft=top_bar|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=code|X=300|Y=100|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'857197')\\quot\\>Javascript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'AspectScript')\\quot\\>AspectScript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'sensor_list')\\quot\\>Sensors</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'action_list')\\quot\\>Actions</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'debug_console')\\quot\\>Console</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'756208')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=857197|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Javascript|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AspectScript|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=sensor_list|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__SensorExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download Fintech Invoices.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__sensor_list__\\quot\\=\\quot\\true\\quot\\)>//crlf//</conditional>//crlf////crlf//^
ID=action_list|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=Aspect_Script|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\cache~~backslash~~WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download Fintech Invoices.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Download Fintech Invoices\\comma\\downloadFintechInvoices\\comma\\action_list\\comma\\Action=downloadFintechInvoices\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//downloadFintechInvoices//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadFintechInvoices\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads any new invoices from the Fintech FTP site.  Invoices are downloaded to the //crlf////tab////tab//[homedir]invoices directory.  An invoice will not be downloaded if it already exists //crlf////tab////tab//in the [homedir]invoices or [homedir]invoices~~backslash~~archive directory.  Invoices are downloaded//crlf////tab////tab//for the store with the ID matching the token POSInterface_StoreID which is set by the //crlf////tab////tab//POS Interface agent.  This means that the pos interface must be enabled for a store to //crlf////tab////tab//download invoices.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//None//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Ok or Error//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\downloadFintechInvoices\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Download Fintech Invoices\\quot\\)//crlf////crlf////tab////tab////tab////abort if POSInterface_StoreID if blank or equals Undefined//crlf////tab////tab////tab//bIsDevelopment=getSystemValue(\\quot\\DevelopmentMode\\quot\\)//crlf////tab////tab////tab//appendToLog(\\quot\\bIsDevelopment=\\quot\\\\plus\\bIsDevelopment)//crlf////tab////tab////tab//if(not(bIsDevelopment))//crlf////tab////tab////tab////tab//s=getToken(\\quot\\POSInterface_StoreID\\quot\\)//crlf////tab////tab////tab////tab//if((len(s)=0) or (s=\\quot\\Undefined\\quot\\))//crlf////tab////tab////tab////tab////tab//return(\\quot\\Error: Aborting because no store has POS interface enabled\\quot\\)//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////open the store driver//crlf////tab////tab////tab//driverOpen(Aspect_BackOffice_Store\\comma\\dStore\\comma\\WRITE)\\comma\\//crlf////tab////tab////tab//driverSetFilter(dStore\\comma\\\\quot\\true\\quot\\\\comma\\true)//crlf////crlf////tab////tab////tab//cProcessed=0//crlf////tab////tab////tab//cDownload=0//crlf////tab////tab////tab//cError=0//crlf////tab////tab////tab//cSkipped=0//crlf////tab////tab////tab//cDeleted=0//crlf////tab////tab////tab//cCredentialError=0//crlf////tab////tab////tab//cStore=driverGetRecordCount(dStore)//crlf////tab////tab////tab//nStore=0//crlf////tab////tab////tab//while(nStore<cStore)//crlf////tab////tab////tab////tab//sStoreID=driverGetField(dStore\\comma\\\\quot\\ID\\quot\\\\comma\\nStore)//crlf////tab////tab////tab////tab////Note: qIYELJAxtP9dLLWSVSfjIMGv is a local test store//crlf////tab////tab////tab////tab//if((sStoreID=getToken(\\quot\\POSInterface_StoreID\\quot\\)) or (sStoreID=\\quot\\qIYELJAxtP9dLLWSVSfjIMGv\\quot\\))//crlf////tab////tab////tab////tab////tab//sStoreName=driverGetField(dStore\\comma\\\\quot\\Store_Name\\quot\\\\comma\\nStore)//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Downloading Fintech invoices for \\quot\\\\plus\\sStoreName)//crlf////crlf////tab////tab////tab////tab////tab////open the vendor driver for the store//crlf////tab////tab////tab////tab////tab//driverOpen(Aspect_Back_Office_Vendor\\comma\\dVendor\\comma\\WRITE\\comma\\false\\comma\\\\quot\\StoreID=\\quot\\\\plus\\sStoreID)//crlf////tab////tab////tab////tab////tab//r=driverFindRecordAbsolute(dVendor\\comma\\0\\comma\\\\quot\\EDI_Vendor=\\quot\\\\plus\\quote(\\quot\\Fintech\\quot\\))//crlf////tab////tab////tab////tab////tab//if(r>=0)//crlf////tab////tab////tab////tab////tab////tab////increment the number of vendor records processed//crlf////tab////tab////tab////tab////tab////tab//cProcessed\\plus\\\\plus\\//crlf////crlf////tab////tab////tab////tab////tab////tab//sVendorID=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\ID\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sVendorName=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\Name\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Ftp_Site\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sEDIUserName=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_UserName\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sEDIPassword=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Password\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab////bEDIDelete=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Delete_After_Download\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//bEDIDelete=true//crlf////crlf////tab////tab////tab////tab////tab////tab////update the time that a check was last made to download invoices //crlf////tab////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Check\\quot\\\\comma\\r\\comma\\now())//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Verify time last checked=\\quot\\\\plus\\driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Check\\quot\\\\comma\\r))//crlf////crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Downloading invoices for vendor: \\quot\\\\plus\\sVendorName\\plus\\\\quot\\ ID: \\quot\\\\plus\\sVendorID)//crlf////crlf////tab////tab////tab////tab////tab////tab//remove ftp:// and other slashes from host name//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\ftp:\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\~~backslash~~\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////crlf////tab////tab////tab////tab////tab////tab//if((len(sEDIFtpSite)>0) and (len(sEDIUserName)>0) and (len(sEDIPassword)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////connect to ftp server//crlf////tab////tab////tab////tab////tab////tab////tab//s=ftpConnect(ftp\\comma\\sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\true)//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Connect to \\quot\\\\plus\\sEDIFtpSite\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////change directory to /OUT//crlf////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpChangeDir(ftp\\comma\\\\quot\\/OUT\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\chdir to /OUT: \\quot\\\\plus\\s)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////get file list//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//arFiles=ftpListFiles(ftp)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//cFilesOnServer=getElementCount(arFiles\\comma\\char(10))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(cFilesOnServer=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\No files on server\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////download the files//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//n=0//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//while(n<cFilesOnServer)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////get the filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=getElement(arFiles\\comma\\n\\comma\\char(10))//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////the filename includes the size and time.  Get only the filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////The filename may use either a .txt or .csv extension//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//n1=pos(\\quot\\.\\quot\\\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(n1>=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=substring(sFtpFilename\\comma\\0\\comma\\n1\\plus\\4)//tab////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\sFtpFilename=\\quot\\\\plus\\sFtpFilename)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////get the local filename and archived filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\invoices~~backslash~~\\quot\\\\plus\\sFtpFilename//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////rename the local file.  Fintech uses the same filename over and //crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////over so files would not be downloaded since they would appear to //crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////already have been downloaded//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sNewLocalFilename=fileDrive(sLocalFilename)\\plus\\fileDir(sLocalFilename)\\plus\\fileName(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sNewLocalFilename=sNewLocalFilename\\plus\\\\quot\\_\\quot\\\\plus\\formatDate(now()\\comma\\\\quot\\MMddyyyy_HHmm\\quot\\)\\plus\\fileExt(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalFilename=sNewLocalFilename//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////checking for an archive filename is useless since it will not exist.  This //crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////could be taken out//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalArchiveFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\invoices~~backslash~~archive~~backslash~~\\quot\\\\plus\\fileName(sLocalFilename)\\plus\\fileExt(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\LocalFilename=\\quot\\\\plus\\sLocalFilename\\plus\\\\quot\\ Exists: \\quot\\\\plus\\fileExists(sLocalFilename)\\plus\\\\quot\\ Size: \\quot\\\\plus\\fileSize(sLocalFilename)\\plus\\\\quot\\ Modified: \\quot\\\\plus\\fileModified(sLocalFilename))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\LocalArchiveFilename=\\quot\\\\plus\\sLocalArchiveFilename\\plus\\\\quot\\ Exists: \\quot\\\\plus\\fileExists(sLocalArchiveFilename)\\plus\\\\quot\\ Size: \\quot\\\\plus\\fileSize(sLocalArchiveFilename)\\plus\\\\quot\\ Modified: \\quot\\\\plus\\fileModified(sLocalArchiveFilename))//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////see if the file already exists//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=false//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((fileExists(sLocalFilename)) and (fileSize(sLocalFilename)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=true//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//elseif((fileExists(sLocalArchiveFilename)) and (fileSize(sLocalArchiveFilename)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=true//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////download the file if it doesn\\apos\\t already exist//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(bExists))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpRetrieveFile(ftp\\comma\\sLocalFilename\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Retr \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExist=fileExists(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//iSize=fileSize(sLocalFilename)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////delete the file from the ftp server//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((bExist) and (iSize>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((true) and (bEDIDelete))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDeleteFile(ftp\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\deleting \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDeleted\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDownload\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: File download failed.  Exists: \\quot\\\\plus\\bExist\\plus\\\\quot\\ Size: \\quot\\\\plus\\iSize)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(bExist)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//fileDelete(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cError\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////update the time that an invoice was last downloaded//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Received\\quot\\\\comma\\r\\comma\\now())//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cError\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\File already exists: \\quot\\\\plus\\sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((false) and (bEDIDelete))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////s=ftpDeleteFile(ftp\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Not deleting \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDeleted\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cSkipped\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: Invalid filename: \\quot\\\\plus\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//n\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endwhile//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////disconnect//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDisconnect(ftp)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Disconnect: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////return an error.  Could not change to directory//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//ftpDisconnect(ftp)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//return(\\quot\\Error: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////return an error.  Could not connect//crlf////tab////tab////tab////tab////tab////tab////tab////tab//return(\\quot\\Error: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: MissingFTP credentials for StoreID=\\quot\\\\plus\\sStoreID)//crlf////tab////tab////tab////tab////tab////tab////tab//cCredentialError\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Could not locate vendor with Sysco EDI informaiton\\quot\\)//crlf////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//driverClose(dVendor)//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//nStore\\plus\\\\plus\\//crlf////tab////tab////tab//endwhile//crlf////crlf////tab////tab////tab//driverClose(dStore)//crlf////crlf////tab////tab////tab//if(cProcessed=0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: No Sysco vendors found for any stores\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//if(cCredentialErrpr?0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing FTP credentials for \\quot\\\\plus\\cCredentialErrpr\\plus\\\\quot\\ stores\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//return(\\quot\\Ok: Downloaded \\quot\\\\plus\\cDownload\\plus\\\\quot\\ invoices.  Skipped \\quot\\\\plus\\cSkipped\\plus\\\\quot\\ invoices already downloaded\\quot\\)//crlf////crlf////tab////tab////tab//return(\\quot\\Ok\\quot\\)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf//^
ID=debug_console|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=debug_console|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=756208|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStart|X=183|Y=41|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentStart|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=752914|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=always|^
ID=21089|X=183|Y=454|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=result|AgentNodeActionReturnValue=|AgentNodeComment=ok|AgentNodeTermType=0|^
ID=AgentTabs|X=183|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStart');agentSetVisible(true)\\quot\\>Agent</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentDescription');agentSetVisible(false)\\quot\\>Description</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStatus');agentSetVisible(false)\\quot\\>Status</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentScript');agentSetVisible(false)\\quot\\>Script</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'ScriptText');agentSetVisible(false)\\quot\\>Script (Text)</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentChart');agentSetVisible(false);agentFormatNodes(document.getElementById('AgentChart'));agentDrawConnectors(document.getElementById('AgentChart'))\\quot\\>Chart</span></td>//crlf////tab//</tr>//crlf//</table>//crlf//^
ID=AgentScript|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<conditional expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//<!include type:script; name:\\quot\\agent_Download Fintech Invoices\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Fintech Invoices\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 09-13-2020 15:06:15//crlf////crlf////tab////tab////Force reporting when the agent is executed manually//crlf////tab////tab//bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\) or (false))//crlf////crlf////tab////tab////Record the starting time//crlf////tab////tab//tAgentStart=now()//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Fintech Invoices\\comma\\AgentAction\\comma\\752914\\comma\\0\\comma\\DownloadFintech invoices//crlf////crlf////tab////tab////DownloadFintech invoices//crlf////tab////tab//result=execAgentAction(\\quot\\downloadFintechInvoices\\quot\\)//crlf////crlf////tab////tab////Result ok?//crlf////tab////tab//if(startsWith(result\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Fintech Invoices\\comma\\AgentTerminate\\comma\\21089\\comma\\0\\comma\\ok//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Fintech Invoices\\comma\\AgentTerminate\\comma\\493029\\comma\\1\\comma\\Error//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//endif//crlf////tab//\\quot\\>//crlf//</conditional>^
ID=ScriptText|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<span style='font:8pt tahoma;color:black'>//amp//lt;state//amp//gt;09132020//amp//nbsp;150615//amp//lt;/state//amp//gt;<br>//amp//lt;<span class='includecontrol'>conditional</span>//amp//nbsp;expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)//amp//gt;<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//lt;!<span class='includecontrol'>include</span>//amp//nbsp;type:script;//amp//nbsp;name:\\quot\\agent_Download//amp//nbsp;Fintech//amp//nbsp;Invoices\\quot\\;//amp//nbsp;commands:\\quot\\<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Created//amp//nbsp;09-13-2020//amp//nbsp;15:06:15</span><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Force//amp//nbsp;reporting//amp//nbsp;when//amp//nbsp;the//amp//nbsp;agent//amp//nbsp;is//amp//nbsp;executed//amp//nbsp;manually</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\)//amp//nbsp;or//amp//nbsp;(false))<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Record//amp//nbsp;the//amp//nbsp;starting//amp//nbsp;time</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;tAgentStart=<span class='keyword'>now</span>()<br><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//DownloadFintech//amp//nbsp;invoices</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;result=<span class='keyword'>execAgentAction</span>(\\quot\\downloadFintechInvoices\\quot\\)<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Result//amp//nbsp;ok?</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'><span class='keyword'>if</span>(</span><span class='keyword'>startsWith</span>(result\\comma\\\\quot\\ok\\quot\\))<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>else</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>endif</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;\\quot\\//amp//gt;<br>//amp//lt;/<span class='includecontrol'>conditional</span>//amp//gt;<br><br></span>^
ID=AgentDescription|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStatus|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentChart|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>09132020 150615</state>//crlf//<canvas id=\\quot\\agent_doc_canvas\\quot\\ width=\\quot\\100\\quot\\ height=\\quot\\100\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 100px; height: 100px; border-style: none; z-index: 2;\\quot\\></canvas><div id=\\quot\\chartAgentStart\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart752914\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\111\\quot\\ style=\\quot\\width: 120px; height: 111px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Download Fintech Invoices</b><br><span style=\\quot\\font-weight:normal;color:green\\quot\\>Active</span><br><span style=\\quot\\font-weight:normal;color:black\\quot\\>Debugging Is Off</span><br>Report Status: never<br>Report To: <br>Name Params: </div></div><div id=\\quot\\chart21089\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 413px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\46\\quot\\ style=\\quot\\width: 120px; height: 46px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><span style=\\quot\\color:black\\quot\\>Other</span></div></div><div id=\\quot\\chart752914\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart734984\\quot\\ style=\\quot\\position: absolute; top: 163px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\95\\quot\\ style=\\quot\\width: 150px; height: 82px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentaction\\quot\\>DownloadFintech invoices<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>downloadFintechInvoices<br></td></tr><tr><td><u>Return</u></td><td>result</td></tr></tbody></table></div></div><div id=\\quot\\chart734984\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart21089\\quot\\ agentchildnonode=\\quot\\chart493029\\quot\\ style=\\quot\\position: absolute; top: 297px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\64\\quot\\ style=\\quot\\width: 150px; height: 64px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentdecision\\quot\\>Result ok?<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Sensor</u></td><td>Expression<br></td></tr></tbody></table></div></div><div id=\\quot\\chart493029\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 297px; left: 190px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Error<hr><span style=\\quot\\color:red\\quot\\>Fail</span></div></div>^
ID=752914|X=183|Y=204|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentAction|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=734984|AgentChildNoNode=|AgentSensor=|AgentAction=downloadFintechInvoices|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=result|AgentNodeComment=DownloadFintech invoices|AgentNodeTermType=|^
ID=734984|X=183|Y=338|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentDecision|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=21089|AgentChildNoNode=493029|AgentSensor=1|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=startsWith(result//comma//~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~ok~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~)|AgentNodeActionReturnValue=|AgentNodeComment=Result ok?|AgentNodeTermType=|^
ID=493029|X=373|Y=338|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=result|AgentNodeActionReturnValue=|AgentNodeComment=Error|AgentNodeTermType=1|
</widget><widget name="Download Hardies Invoice" group="Inventory" category="Invoice Downloads" description="" type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Download Hardies Invoice" modified="11-11-2020 12:22:18" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=11-10-2020 13:25:47:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=0 TaskMinutesBetweenExecution=1 TaskSecondsBetweenExecution=0 TaskExecuteSun=true TaskExecuteMon=true TaskExecuteTue=true TaskExecuteWed=true TaskExecuteThu=true TaskExecuteFri=true TaskExecuteSat=true TaskConditional_Expression="(getToken(\\quote\\POSInterface_StoreID\\quote\\)\\lt\\\\gt\\\\quote\\Undefined\\quote\\) and (len(lookup(Aspect_BackOffice_Vendor_ID_by_EDI_Selection,\\quote\\hardies\\quote\\,0,\\quote\\StoreID=\\quote\\+getToken(\\quote\\POSInterface_StoreID\\quote\\)))\\gt\\0)" TaskConditional_Expression_Description="Executes when Hardies EDI information is defined for a vendor in the store with the pos interface enabled" TaskState_Function="hour(now())+gfs(replaceSubstring(getSetFor(getCollection(Aspect_BackOffice_Store_Directory_By_ID,true,\\quote\\\\quote\\,\\quote\\\\quote\\,\\quote\\,\\quote\\,\\quote\\value\\quote\\),\\quote\\vendor.bin\\quote\\),char(0x2C),char(0x3B)))+getToken(\\quote\\POSInterface_StoreID\\quote\\)" TaskState_Expression_Description="Executes when the hour changes, when a vendor file is updated and when the ID of the store with the pos interface enabled changes." TaskWidgetParams="" TaskWindowForExecution=0>
Preferences|toolboxx=52|toolboxy=137|aspectfuncx=100|aspectfuncy=100|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=false|aspectfuncVisible=false|PublishFtpFilename=Download Hardies Invoice.html|PublishToFtpSite=false|PublishFTPAccount=0|PublishFtpDirectory=/|PublishFtpPublicDirectory=/|PublishCopyFile=false|PublishCopyFilename=|PublishWysiwig=false|PublishIncludeAspectScript=false|PublishIncludeAspectStyleshet=false|PublishAsText=false|^
ID=top_bar|X=0|Y=0|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=left_bar|X=0|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=false|BorderStyle=solid 1 black|Visible=true|Print=false|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=|AlignLeft=top_bar|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=code|X=300|Y=100|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'456959')\\quot\\>Javascript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'AspectScript')\\quot\\>AspectScript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'sensor_list')\\quot\\>Sensors</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'action_list')\\quot\\>Actions</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'debug_console')\\quot\\>Console</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\'298425')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=456959|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Javascript|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AspectScript|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=sensor_list|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__SensorExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download Hardies Invoice.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__sensor_list__\\quot\\=\\quot\\true\\quot\\)>//crlf//</conditional>//crlf////crlf//^
ID=action_list|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=false|content_type=Aspect_Script|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>//crlf////tab//{@if(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\\\comma\\now()\\comma\\\\quot\\\\quot\\)}//crlf////tab//{@if(getSystemValue(\\quot\\DevelopmentMode\\quot\\)\\comma\\fileModified(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download Hardies Invoice.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Download Hardies Invoice\\comma\\downloadHardiesInvoices\\comma\\action_list\\comma\\Action=downloadHardiesInvoices\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//downloadHardiesInvoices//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadHardiesInvoices\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads Hardies invoices from Earthlink.    Invoices are downloaded to the //crlf////tab////tab//[homedir]invoices directory.  An invoice will not be downloaded if it already exists //crlf////tab////tab//in the [homedir]invoices or [homedir]invoices\archive directory.  Invoices are downloaded//crlf////tab////tab//for the store with the ID matching the token POSInterface_StoreID which is set by the //crlf////tab////tab//POS Interface agent.  This means that the pos interface must be enabled for a store to //crlf////tab////tab//download invoices.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//None//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionReturns__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Ok or Error//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\downloadHardiesInvoices\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Download Hardies Invoices\\quot\\)//crlf////crlf////tab////tab////tab////abort if POSInterface_StoreID if blank or equals Undefined//crlf////tab////tab////tab//if(getToken(\\quot\\AspectHashID\\quot\\)<>\\quot\\4idczse69\\quot\\)//crlf////tab////tab////tab////tab//s=getToken(\\quot\\POSInterface_StoreID\\quot\\)//crlf////tab////tab////tab////tab//if((len(s)=0) or (s=\\quot\\Undefined\\quot\\))//crlf////tab////tab////tab////tab////tab//return(\\quot\\Error: Aborting because no store has POS interface enabled\\quot\\)//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////open the store driver//crlf////tab////tab////tab//driverOpen(Aspect_BackOffice_Store\\comma\\dStore\\comma\\WRITE)\\comma\\//crlf////tab////tab////tab//driverSetFilter(dStore\\comma\\\\quot\\true\\quot\\\\comma\\true)//crlf////crlf////tab////tab////tab//cProcessed=0//crlf////tab////tab////tab//cDownload=0//crlf////tab////tab////tab//cError=0//crlf////tab////tab////tab//cSkipped=0//crlf////tab////tab////tab//cDeleted=0//crlf////tab////tab////tab//cCredentialError=0//crlf////tab////tab////tab//cStore=driverGetRecordCount(dStore)//crlf////tab////tab////tab//nStore=0//crlf////tab////tab////tab//while(nStore<cStore)//crlf////tab////tab////tab////tab////For testing: //crlf////tab////tab////tab////tab////U Pick 6 - Harbor: 3fzCxB9KUsq8CTcKaQnejxxY//crlf////tab////tab////tab////tab//sStoreID=driverGetField(dStore\\comma\\\\quot\\ID\\quot\\\\comma\\nStore)//crlf////tab////tab////tab////tab//if((sStoreID=getToken(\\quot\\POSInterface_StoreID\\quot\\)) or (sStoreID=\\quot\\3fzCxB9KUsq8CTcKaQnejxxY\\quot\\))//crlf////tab////tab////tab////tab////tab//sStoreName=driverGetField(dStore\\comma\\\\quot\\Store_Name\\quot\\\\comma\\nStore)//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Downloading Hardies invoices for \\quot\\\\plus\\sStoreName)//crlf////crlf////tab////tab////tab////tab////tab////open the vendor driver for the store//crlf////tab////tab////tab////tab////tab//driverOpen(Aspect_Back_Office_Vendor\\comma\\dVendor\\comma\\WRITE\\comma\\false\\comma\\\\quot\\StoreID=\\quot\\\\plus\\sStoreID)//crlf////tab////tab////tab////tab////tab//r=driverFindRecordAbsolute(dVendor\\comma\\0\\comma\\\\quot\\EDI_Vendor=\\quot\\\\plus\\quote(\\quot\\hardies\\quot\\))//crlf////tab////tab////tab////tab////tab//if(r>=0)//crlf////tab////tab////tab////tab////tab////tab////increment the number of vendor records processed//crlf////tab////tab////tab////tab////tab////tab//cProcessed\\plus\\\\plus\\//crlf////crlf////tab////tab////tab////tab////tab////tab//sVendorID=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\ID\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sVendorName=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\Name\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=\\quot\\ftp.aspect-software.net\\quot\\//crlf////tab////tab////tab////tab////tab////tab//sEDIUserName=\\quot\\hardies\\percent\\aspect-software.net\\quot\\//crlf////tab////tab////tab////tab////tab////tab//sEDIPassword=\\quot\\skI987bVA\\quot\\//crlf////crlf////tab////tab////tab////tab////tab////tab//sEDICustomerNumber=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Customer_Number\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab////tab////tab//bEDIDelete=true//crlf////crlf////tab////tab////tab////tab////tab////tab////update the time that a check was last made to download invoices //crlf////tab////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Check\\quot\\\\comma\\r\\comma\\now())//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Verify time last checked=\\quot\\\\plus\\driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Check\\quot\\\\comma\\r))//crlf////crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Downloading invoices for vendor: \\quot\\\\plus\\sVendorName\\plus\\\\quot\\ ID: \\quot\\\\plus\\sVendorID)//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Customer number: \\quot\\\\plus\\sEDICustomerNumber)//crlf////crlf////tab////tab////tab////tab////tab////tab//remove ftp:// and other slashes from host name//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\ftp:\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//sEDIFtpSite=replaceSubstring(sEDIFtpSite\\comma\\\\quot\\\\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////crlf////tab////tab////tab////tab////tab////tab//if((len(sEDIFtpSite)>0) and (len(sEDIUserName)>0) and (len(sEDIPassword)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////connect to ftp server//crlf////tab////tab////tab////tab////tab////tab////tab//s=ftpConnect(ftp\\comma\\sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\true)//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Connect to \\quot\\\\plus\\sEDIFtpSite\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////get file list//crlf////tab////tab////tab////tab////tab////tab////tab////tab//arFiles=ftpListFiles(ftp)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//cFilesOnServer=getElementCount(arFiles\\comma\\char(10))//crlf////tab////tab////tab////tab////tab////tab////tab////tab//if(cFilesOnServer=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\No files on server\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////download the files//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//n=0//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//while(n<cFilesOnServer)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////get the filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=getElement(arFiles\\comma\\n\\comma\\char(10))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\sFtpFilename1=\\quot\\\\plus\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////the filename includes the size and time.  Get only the filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//n1=pos(\\quot\\.\\quot\\\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(n1>=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=substring(sFtpFilename\\comma\\0\\comma\\n1\\plus\\4)//tab////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\sFtpFilename2=\\quot\\\\plus\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(startsWith(mid(sFtpFilename\\comma\\15)\\comma\\sEDICustomerNumber))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////get the local filename and archived filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\invoices\\\quot\\\\plus\\sFtpFilename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalArchiveFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\invoices\archive\\\quot\\\\plus\\sFtpFilename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\LocalFilename=\\quot\\\\plus\\sLocalFilename\\plus\\\\quot\\ Exists: \\quot\\\\plus\\fileExists(sLocalFilename)\\plus\\\\quot\\ Size: \\quot\\\\plus\\fileSize(sLocalFilename)\\plus\\\\quot\\ Modified: \\quot\\\\plus\\fileModified(sLocalFilename))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\LocalArchiveFilename=\\quot\\\\plus\\sLocalArchiveFilename\\plus\\\\quot\\ Exists: \\quot\\\\plus\\fileExists(sLocalArchiveFilename)\\plus\\\\quot\\ Size: \\quot\\\\plus\\fileSize(sLocalArchiveFilename)\\plus\\\\quot\\ Modified: \\quot\\\\plus\\fileModified(sLocalArchiveFilename))//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////see if the file already exists//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=false//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((fileExists(sLocalFilename)) and (fileSize(sLocalFilename)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=true//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//elseif((fileExists(sLocalArchiveFilename)) and (fileSize(sLocalArchiveFilename)>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=true//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////download the file if it doesn\\apos\\t already exist//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(bExists))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpRetrieveFile(ftp\\comma\\sLocalFilename\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Retr \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExist=fileExists(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//iSize=fileSize(sLocalFilename)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////delete the file from the ftp server//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((bExist) and (iSize>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDeleteFile(ftp\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Delete \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDeleted\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDownload\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: File download failed.  Exists: \\quot\\\\plus\\bExist\\plus\\\\quot\\ Size: \\quot\\\\plus\\iSize)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(bExist)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//fileDelete(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cError\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////update the time that an invoice was last downloaded//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//driverPutFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Received\\quot\\\\comma\\r\\comma\\now())//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cError\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\File already exists: \\quot\\\\plus\\sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(bEDIDelete)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDeleteFile(ftp\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Delete \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cDeleted\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cSkipped\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Skipping : \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\ Customer number is: \\quot\\\\plus\\sEDICustomerNumber)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: Invalid filename: \\quot\\\\plus\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//n\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//endwhile//crlf////tab////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\No files found on server\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////disconnect//crlf////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpDisconnect(ftp)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Disconnect: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////return an error.  Could not connect//crlf////tab////tab////tab////tab////tab////tab////tab////tab//return(\\quot\\Error: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Error: MissingFTP credentials for StoreID=\\quot\\\\plus\\sStoreID)//crlf////tab////tab////tab////tab////tab////tab////tab//cCredentialError\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Could not locate vendor with Gordons EDI informaiton\\quot\\)//crlf////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//driverClose(dVendor)//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//nStore\\plus\\\\plus\\//crlf////tab////tab////tab//endwhile//crlf////crlf////tab////tab////tab//driverClose(dStore)//crlf////crlf////tab////tab////tab//if(cProcessed=0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: No Gordons vendors found for any stores\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//if(cCredentialErrpr?0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing FTP credentials for \\quot\\\\plus\\cCredentialErrpr\\plus\\\\quot\\ stores\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//return(\\quot\\Ok: Downloaded \\quot\\\\plus\\cDownload\\plus\\\\quot\\ invoices.  Skipped \\quot\\\\plus\\cSkipped\\plus\\\\quot\\ invoices already downloaded\\quot\\)//crlf////crlf////tab////tab////tab//return(\\quot\\Ok\\quot\\)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf//^
ID=debug_console|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=debug_console|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=298425|X=300|Y=126|W=740|H=660|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=false|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=code|AttachLeft=|AlignLeft=code|AlignRight=|RefreshCondition=|zindex=2|opacity=10|Background=white|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStart|X=183|Y=41|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentStart|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=490472|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=never|^
ID=903630|X=183|Y=454|W=119|H=45|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=result|AgentNodeActionReturnValue=|AgentNodeComment=Ok|AgentNodeTermType=0|^
ID=AgentTabs|X=183|Y=15|W=150|H=20|AutoHeight=true|AutoWidth=true|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=true|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=top_bar|AttachLeft=left_bar|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<table class='tabdialog'>//crlf////tab//<tr>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStart');agentSetVisible(true)\\quot\\>Agent</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentDescription');agentSetVisible(false)\\quot\\>Description</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentStatus');agentSetVisible(false)\\quot\\>Status</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentScript');agentSetVisible(false)\\quot\\>Script</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'ScriptText');agentSetVisible(false)\\quot\\>Script (Text)</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\showTab(this\\comma\\'AgentChart');agentSetVisible(false);agentFormatNodes(document.getElementById('AgentChart'));agentDrawConnectors(document.getElementById('AgentChart'))\\quot\\>Chart</span></td>//crlf////tab//</tr>//crlf//</table>//crlf//^
ID=AgentScript|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<conditional expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//<!include type:script; name:\\quot\\agent_Download Hardies Invoice\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Hardies Invoice\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 11-10-2020 13:49:40//crlf////crlf////tab////tab////Force reporting when the agent is executed manually//crlf////tab////tab//bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\) or (false))//crlf////crlf////tab////tab////Record the starting time//crlf////tab////tab//tAgentStart=now()//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Hardies Invoice\\comma\\AgentAction\\comma\\490472\\comma\\0\\comma\\Download Hardies Invoices//crlf////crlf////tab////tab////Download Hardies Invoices//crlf////tab////tab//result=execAgentAction(\\quot\\downloadHardiesInvoices\\quot\\)//crlf////crlf////tab////tab////Result Ok?//crlf////tab////tab//if(startsWith(result\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Hardies Invoice\\comma\\AgentTerminate\\comma\\903630\\comma\\0\\comma\\Ok//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Hardies Invoice\\comma\\AgentTerminate\\comma\\492028\\comma\\1\\comma\\Error//crlf////tab////tab////tab//scriptSetResult(Result)//crlf////tab////tab//endif//crlf////tab//\\quot\\>//crlf//</conditional>^
ID=ScriptText|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<span style='font:8pt tahoma;color:black'>//amp//lt;state//amp//gt;11102020//amp//nbsp;134940//amp//lt;/state//amp//gt;<br>//amp//lt;<span class='includecontrol'>conditional</span>//amp//nbsp;expression:(\\quot\\__ExecAgentScript__\\quot\\=\\quot\\true\\quot\\)//amp//gt;<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//lt;!<span class='includecontrol'>include</span>//amp//nbsp;type:script;//amp//nbsp;name:\\quot\\agent_Download//amp//nbsp;Hardies//amp//nbsp;Invoice\\quot\\;//amp//nbsp;commands:\\quot\\<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Created//amp//nbsp;11-10-2020//amp//nbsp;13:49:40</span><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Force//amp//nbsp;reporting//amp//nbsp;when//amp//nbsp;the//amp//nbsp;agent//amp//nbsp;is//amp//nbsp;executed//amp//nbsp;manually</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;bForceReport=((\\quot\\__ManualExecAgent__\\quot\\=\\quot\\true\\quot\\)//amp//nbsp;or//amp//nbsp;(false))<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Record//amp//nbsp;the//amp//nbsp;starting//amp//nbsp;time</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;tAgentStart=<span class='keyword'>now</span>()<br><br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Download//amp//nbsp;Hardies//amp//nbsp;Invoices</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;result=<span class='keyword'>execAgentAction</span>(\\quot\\downloadHardiesInvoices\\quot\\)<br><br><span class='comment'>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Result//amp//nbsp;Ok?</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'><span class='keyword'>if</span>(</span><span class='keyword'>startsWith</span>(result\\comma\\\\quot\\ok\\quot\\))<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>else</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='keyword'>scriptSetResult</span>(Result)<br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;<span class='flowcontrol'>endif</span><br>//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;\\quot\\//amp//gt;<br>//amp//lt;/<span class='includecontrol'>conditional</span>//amp//gt;<br><br></span>^
ID=AgentDescription|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentStatus|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=true|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=Aspect_Script|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|^
ID=AgentChart|X=183|Y=41|W=1000|H=800|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=true|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=html|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=AgentTabs|AttachLeft=|AlignLeft=AgentTabs|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|Content=<state>11102020 134940</state>//crlf//<canvas id=\\quot\\agent_doc_canvas\\quot\\ width=\\quot\\100\\quot\\ height=\\quot\\100\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 100px; height: 100px; border-style: none; z-index: 2;\\quot\\></canvas><div id=\\quot\\chartAgentStart\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart490472\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\111\\quot\\ style=\\quot\\width: 120px; height: 111px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Download Hardies Invoice</b><br><span style=\\quot\\font-weight:normal;color:green\\quot\\>Active</span><br><span style=\\quot\\font-weight:normal;color:black\\quot\\>Debugging Is Off</span><br>Report Status: never<br>Report To: <br>Name Params: </div></div><div id=\\quot\\chart903630\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 413px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Ok<hr><span style=\\quot\\color:green\\quot\\>Success</span></div></div><div id=\\quot\\chart490472\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart4373\\quot\\ style=\\quot\\position: absolute; top: 163px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\95\\quot\\ style=\\quot\\width: 150px; height: 82px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentaction\\quot\\>Download Hardies Invoices<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>downloadHardiesInvoices<br></td></tr><tr><td><u>Return</u></td><td>result</td></tr></tbody></table></div></div><div id=\\quot\\chart4373\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart903630\\quot\\ agentchildnonode=\\quot\\chart492028\\quot\\ style=\\quot\\position: absolute; top: 297px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\64\\quot\\ style=\\quot\\width: 150px; height: 64px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentdecision\\quot\\>Result Ok?<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Sensor</u></td><td>Expression<br></td></tr></tbody></table></div></div><div id=\\quot\\chart492028\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 297px; left: 190px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\84\\quot\\ style=\\quot\\width: 120px; height: 84px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Error<hr><span style=\\quot\\color:red\\quot\\>Fail</span></div></div>^
ID=490472|X=183|Y=204|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentAction|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=4373|AgentChildNoNode=|AgentSensor=|AgentAction=downloadHardiesInvoices|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=result|AgentNodeComment=Download Hardies Invoices|AgentNodeTermType=|^
ID=4373|X=183|Y=338|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentDecision|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=903630|AgentChildNoNode=492028|AgentSensor=1|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=startsWith(result//comma//\\quot\\ok\\quot\\)|AgentNodeActionReturnValue=|AgentNodeComment=Result Ok?|AgentNodeTermType=|^
ID=492028|X=373|Y=338|W=150|H=20|AutoHeight=false|AutoWidth=false|widthpcnt=0|minwidth=0|maxwidth=0|minheight=0|maxheight=0|ProcessContent=false|Border=false|BorderStyle=solid 1 black|Visible=true|Print=true|RefreshInterval=0|RefreshWhenHidden=false|ExcludeFromAutospace=true|EditExternally=null|content_type=AgentTerminate|onload=|LockEditing=false|LineWrap=false|Publish=true|DragDeployed=false|SizeDeployed=false|ShowStatusIcon=true|AttachTop=|AttachLeft=|AlignLeft=|AlignRight=|RefreshCondition=|zindex=1|opacity=10|Background=Transparent|Source=|DefaultSource=false|AgentChildYesNode=|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=Result|AgentNodeActionReturnValue=|AgentNodeComment=Error|AgentNodeTermType=1|
</widget>