 <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="05-29-2024 21:29:59" 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=155|toolboxy=264|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=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=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\\getHarborCustomerNumber\\comma\\sensor_list\\comma\\Sensor=getHarborCustomerNumber\\comma\\private\\comma\\text//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//getHarborCustomerNumber//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__sensor__\\quot\\=\\quot\\getHarborCustomerNumber\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__SensorDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Looks for the Habor vendor and returns the value of the EDI_Customer_Number //crlf////tab////tab//field.  This is compared to the Store field in the invoice file.  Only //crlf////tab////tab//records that match the EDI Customer Number are imported.  This is to address //crlf////tab////tab//the fact that the invoice may contain multiple stores.//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//The EDI_Customer_Number for the Harbor vendor//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__SensorExec__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//<!include type:script; name:\\quot\\getHarborCustomerNumber\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab////tab//sEDICustomerNumber=\\quot\\\\quot\\//crlf////crlf////tab////tab////tab//sStoreID=getToken(\\quot\\POSInterface_StoreID\\quot\\)//crlf////tab////crlf////tab////tab////tab////debugging - uses Aloha Steakhouse//crlf////tab////tab////tab//if(getToken(\\quot\\AspectHashID\\quot\\)=\\quot\\4idczse69\\quot\\)//crlf////tab////tab////tab////tab//sStoreID=\\quot\\jMyUEiRuadQbaRFsylp72Bol\\quot\\//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//if(len(sStoreID)>0)//crlf////tab////tab////tab////tab//driverOpen(Aspect_Back_Office_Vendor\\comma\\d\\comma\\\\quot\\READ\\quot\\\\comma\\false\\comma\\\\quot\\StoreID=\\quot\\\\plus\\sStoreID)//crlf////tab////tab////tab////tab//r=driverFindRecordAbsolute(d\\comma\\0\\comma\\\\quot\\EDI_Vendor=\\quot\\\\plus\\quote(\\quot\\Harbor\\quot\\))//crlf////tab////tab////tab////tab//if(r>=0)//crlf////tab////tab////tab////tab////tab//sEDICustomerNumber=driverGetFieldAbsolute(d\\comma\\\\quot\\EDI_Customer_Number\\quot\\\\comma\\r)//crlf////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab//return(\\quot\\Error: Cannot find vendor with Harbor as EDI vendor.  StoreID=\\quot\\\\plus\\sStoreID)//crlf////tab////tab////tab////tab//endif//tab////crlf////tab////tab////tab//else//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing StoreID\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//if(len(trim(sEDICustomerNumber))>0)//crlf////tab////tab////tab////tab//return(sEDICustomerNumber)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//return(\\quot\\Error: Missing EDI Customer Number\\quot\\)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////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//r=driverAddNewRecord(d)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Index\\quot\\\\comma\\r\\comma\\\\quot\\Katsiroubas\\quot\\)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Value\\quot\\\\comma\\r\\comma\\\\quot\\Katsiroubas\\quot\\)//crlf////crlf////tab////tab////tab//r=driverAddNewRecord(d)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Index\\quot\\\\comma\\r\\comma\\\\quot\\Yhata\\quot\\)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Value\\quot\\\\comma\\r\\comma\\\\quot\\Yhata\\quot\\)//crlf////crlf////tab////tab////tab//r=driverAddNewRecord(d)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Index\\quot\\\\comma\\r\\comma\\\\quot\\Sygma\\quot\\)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Value\\quot\\\\comma\\r\\comma\\\\quot\\Sygma\\quot\\)//crlf////crlf////tab////tab////tab//r=driverAddNewRecord(d)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Index\\quot\\\\comma\\r\\comma\\\\quot\\VanEerden\\quot\\)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Value\\quot\\\\comma\\r\\comma\\\\quot\\VanEerden\\quot\\)//crlf////crlf////tab////tab////tab//r=driverAddNewRecord(d)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Index\\quot\\\\comma\\r\\comma\\\\quot\\Harbor\\quot\\)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Value\\quot\\\\comma\\r\\comma\\\\quot\\Harbor\\quot\\)//crlf////crlf////tab////tab////tab//r=driverAddNewRecord(d)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Index\\quot\\\\comma\\r\\comma\\\\quot\\Kuna\\quot\\)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Value\\quot\\\\comma\\r\\comma\\\\quot\\Kuna\\quot\\)//crlf////crlf////tab////tab////tab//r=driverAddNewRecord(d)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Index\\quot\\\\comma\\r\\comma\\\\quot\\BenEKeith\\quot\\)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Value\\quot\\\\comma\\r\\comma\\\\quot\\Ben E Keith\\quot\\)//crlf////crlf////tab////tab////tab//r=driverAddNewRecord(d)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Index\\quot\\\\comma\\r\\comma\\\\quot\\ULFood\\quot\\)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Value\\quot\\\\comma\\r\\comma\\\\quot\\Upper Lakes Food\\quot\\)//crlf////crlf////tab////tab////tab//r=driverAddNewRecord(d)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Index\\quot\\\\comma\\r\\comma\\\\quot\\Cheney\\quot\\)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Value\\quot\\\\comma\\r\\comma\\\\quot\\Cheney Brothere\\quot\\)//crlf////crlf////tab////tab////tab//r=driverAddNewRecord(d)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Index\\quot\\\\comma\\r\\comma\\\\quot\\CashWa\\quot\\)//crlf////tab////tab////tab//driverPutFieldAbsolute(d\\comma\\\\quot\\Value\\quot\\\\comma\\r\\comma\\\\quot\\Cash WA Distributing\\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 Cash WA Distributing invoice//crlf////tab////tab////tab//if(startsWith(trim(s)\\comma\\\\quot\\CASH WA DISTRIBUTING OF KEARNEY INC\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\CashWa\\quot\\)//crlf////tab////tab////tab//endif//crlf////tab////tab////tab////crlf////tab////tab////tab////look for Yhata invoice//crlf////tab////tab////tab//if(startsWith(s\\comma\\\\quot\\Vendor Name\\comma\\Retailer Name\\comma\\Retailer VendorID\\comma\\Vendor Store Number\\comma\\Retailer Store Number\\comma\\Invoice Date\\comma\\Invoice DueDate\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Yhata\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////look for Katsiroubas invoice//crlf////tab////tab////tab//if(startsWith(s\\comma\\\\quot\\CorporateID~~pipe~~LocationID~~pipe~~DocumentNumber~~pipe~~DeliveryDate\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Katsiroubas\\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////=======================================================//crlf////tab////tab////tab////Note: Kuna and GFS both use the standard 810 format but //crlf////tab////tab////tab////they use different delimiters.//crlf////tab////tab////tab////=======================================================//crlf////tab////tab////tab////check for Kuna invoice.//crlf////tab////tab////tab//appendToLog(\\quot\\Checking for Kuna invoice\\quot\\)//crlf////tab////tab////tab//if(pos(\\quot\\*KUNA \\quot\\\\comma\\s)>=0)//crlf////tab////tab////tab////tab//return(\\quot\\Kuna\\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////check for Harbor invoice.  Remove additional bytes.  They went to a 2-byte charset in may 2023.//crlf////tab////tab////tab//s=replaceSubstring(s\\comma\\char(0)\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab//if(pos(\\quot\\Brand\\comma\\DC Location\\quot\\\\comma\\s)>=0)//crlf////tab////tab////tab////tab////write the modified content back to the file//crlf////tab////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\Brand\\quot\\)))//crlf////tab////tab////tab////tab////tab//s=mid(s\\comma\\2)//crlf////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//fileWriteContent(\\quot\\__Filename__\\quot\\\\comma\\s)//crlf////tab////tab////tab////tab//return(\\quot\\Harbor\\quot\\)//crlf////tab////tab////tab//endif//crlf////tab////tab////tab////crlf////tab////tab////tab////check for Sygma invoice//crlf////tab////tab////tab//if(year(parseTime(mid(s\\comma\\17\\comma\\10)\\comma\\\\quot\\yyyy-MM-dd\\quot\\))>=2023)//crlf////tab////tab////tab////tab//return(\\quot\\Sygma\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////check for VanEerden invoice//crlf////tab////tab////tab//if(startsWith(s\\comma\\\\quot\\Vendor Name \\comma\\Retailer Name \\comma\\Retailer VendorID\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\VanEerden\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////check for Ben E Keith invoice//crlf////tab////tab////tab//if(startsWith(s\\comma\\\\quot\\DC Location\\quot\\\\plus\\char(9)\\plus\\\\quot\\Customer \\pound\\\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\BenEKeith\\quot\\)//crlf////tab////tab////tab//elseif(pos(\\quot\\DC Location\\quot\\\\plus\\char(9)\\plus\\\\quot\\Customer \\pound\\\\quot\\\\comma\\s)>=0)//crlf////tab////tab////tab////tab////this is done to handle files with 2-byte enconding//crlf////tab////tab////tab////tab//s=replaceSubstring(s\\comma\\char(9)\\comma\\\\quot\\AAATAB\\quot\\)//crlf////tab////tab////tab////tab//s=replaceSubstring(s\\comma\\char(10)\\comma\\\\quot\\AAACRLF\\quot\\)//crlf////tab////tab////tab////tab//s=replaceSubstring(s\\comma\\\\quot\\.\\quot\\\\comma\\\\quot\\AAADECIMAL\\quot\\)//crlf////tab////tab////tab////tab//s=replaceSubstring(s\\comma\\\\quot\\\\pound\\\\quot\\\\comma\\\\quot\\AAAPOUND\\quot\\)//crlf////tab////tab////tab////tab//s=toAscii(s)//crlf////tab////tab////tab////tab//s=replaceSubstring(s\\comma\\\\quot\\AAATAB\\quot\\\\comma\\char(9))//crlf////tab////tab////tab////tab//s=replaceSubstring(s\\comma\\\\quot\\AAACRLF\\quot\\\\comma\\char(13)\\plus\\char(10))//crlf////tab////tab////tab////tab//s=replaceSubstring(s\\comma\\\\quot\\AAADECIMAL\\quot\\\\comma\\\\quot\\.\\quot\\)//crlf////tab////tab////tab////tab//s=replaceSubstring(s\\comma\\\\quot\\AAAPOUND\\quot\\\\comma\\\\quot\\\\pound\\\\quot\\)//crlf////tab////tab////tab////tab//fileWriteContent(\\quot\\__Filename__\\quot\\\\comma\\s)//crlf////tab////tab////tab////tab//return(\\quot\\BenEKeith\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////check for Upper Lakes Food invoice//crlf////tab////tab////tab//if(startsWith(s\\comma\\\\quot\\Vendor Cust\\pound\\\\comma\\Store\\pound\\\\comma\\Invoice\\pound\\\\comma\\Date\\comma\\Inv Type\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\ULFood\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////check for Cheney Brothers invoice//crlf////tab////tab////tab//if(startsWith(s\\comma\\\\quot\\ItemNumber\\comma\\Brand\\comma\\ItemDescription\\comma\\PackSize\\comma\\Quantity\\comma\\UnitPrice\\comma\\ExtendedPrice\\comma\\Category\\comma\\UOM\\comma\\Tax\\quot\\))//crlf////tab////tab////tab////tab//return(\\quot\\Cheney\\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=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\\)+\\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=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=914196|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=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=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=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=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_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=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;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=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>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=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=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="03-03-2025 16:45:40" 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=607|toolboxy=92|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=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 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=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\\)\\plus\\\\quot\\cache~~backslash~~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\\downloadPFGInvoicesUsingSFTP\\comma\\action_list\\comma\\Action=downloadPFGInvoicesUsingSFTP\\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\\\\plus\\c\\plus\\\\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\\plus\\sLine\\plus\\\\quot\\~~pipe~~\\quot\\\\plus\\bIsCredit\\plus\\\\quot\\~~pipe~~\\quot\\\\plus\\sInvoiceNumber\\plus\\\\quot\\~~pipe~~\\quot\\\\plus\\formatDate(dtInvoice\\comma\\\\quot\\MM-dd-yyyy\\quot\\)\\plus\\char(13)\\plus\\char(10)//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////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//downloadPFGInvoicesUsingSFTP//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadPFGInvoicesUsingSFTP\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads invoices to the server from PFG using SFTP//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\\downloadPFGInvoicesUsingSFTP\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Download PFG Invoices Using SFTP\\quot\\)//crlf////crlf////tab////tab////tab////make directories//crlf////tab////tab////tab//if(not(fileExists(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\pfg_invoices\\quot\\)))//crlf////tab////tab////tab////tab//fileMakeDirectory(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\pfg_invoices\\quot\\)//crlf////tab////tab////tab////tab//fileMakeDirectory(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\pfg_invoices~~backslash~~pending\\quot\\)//crlf////tab////tab////tab////tab//fileMakeDirectory(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\pfg_invoices~~backslash~~archive\\quot\\)//crlf////tab////tab////tab//endif//crlf////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////crlf////tab////tab////tab//sEDIFtpSite=\\quot\\ECOMM.PFGC.COM\\quot\\//crlf////tab////tab////tab//sEDIUserName=\\quot\\zzASPECT\\quot\\//crlf////tab////tab////tab//sEDIPassword=\\quot\\PFG111517\\quot\\//crlf////crlf////tab////tab////tab//arFiles=sftpListFiles(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/OUT\\quot\\)//crlf////tab////tab////tab//appendToLog(\\quot\\arFiles=\\quot\\\\plus\\arFiles)//crlf////tab////tab////tab//cFilesOnServer=getElementCount(arFiles\\comma\\char(0x3B))//crlf////tab////tab////tab//if(cFilesOnServer=0)//crlf////tab////tab////tab////tab//appendToLog(\\quot\\No files on server\\quot\\)//crlf////tab////tab////tab//else//crlf////tab////tab////tab////tab////download the files//crlf////tab////tab////tab////tab//n=0//crlf////tab////tab////tab////tab//while(n<cFilesOnServer)//crlf////tab////tab////tab////tab////tab////get the filename//crlf////tab////tab////tab////tab////tab//sFtpFilename=getElement(arFiles\\comma\\n\\comma\\char(0x3B))//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\sFtpFilename=\\quot\\\\plus\\sFtpFilename)//crlf////crlf////tab////tab////tab////tab////tab////get the local filename and archived filename//crlf////tab////tab////tab////tab////tab//sLocalFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\pfg_invoices~~backslash~~pending~~backslash~~\\quot\\\\plus\\sFtpFilename//crlf////tab////tab////tab////tab////tab//sLocalFilename=replaceSubstring(sLocalFilename\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\~~backslash~~\\quot\\)//crlf////tab////tab////tab////tab////tab//sLocalArchiveFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\pfg_invoices~~backslash~~archive~~backslash~~\\quot\\\\plus\\sFtpFilename//crlf////tab////tab////tab////tab////tab//sLocalArchiveFilename=replaceSubstring(sLocalArchiveFilename\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\~~backslash~~\\quot\\)//crlf////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//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////see if the file already exists//crlf////tab////tab////tab////tab////tab//bExists=false//crlf////tab////tab////tab////tab////tab//if((fileExists(sLocalFilename)) and (fileSize(sLocalFilename)>0))//crlf////tab////tab////tab////tab////tab////tab//bExists=true//crlf////tab////tab////tab////tab////tab//elseif((fileExists(sLocalArchiveFilename)) and (fileSize(sLocalArchiveFilename)>0))//crlf////tab////tab////tab////tab////tab////tab//bExists=true//crlf////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////download the file if it doesn\\apos\\t already exist//crlf////tab////tab////tab////tab////tab//if(not(bExists))//crlf////tab////tab////tab////tab////tab////tab//b=sFtpGetFile(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/OUT\\quot\\\\comma\\sFtpFilename\\comma\\sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Retr \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\b)//crlf////tab////tab////tab////tab////tab////tab//if(b)//crlf////tab////tab////tab////tab////tab////tab////tab//bExist=fileExists(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab//iSize=fileSize(sLocalFilename)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////delete the file from the ftp server//crlf////tab////tab////tab////tab////tab////tab////tab//if((bExist) and (iSize>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab//if(bExist)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//b=sftpDeleteFile(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/OUT\\quot\\\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Deleted /OUT/\\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\b)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab//cDownload\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab//else//crlf////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//if(bExist)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////delete the local failed download which is 0 bytes//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//fileDelete(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab//cError\\plus\\\\plus\\//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//cError\\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\\File already exists: \\quot\\\\plus\\sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab//b=sftpDeleteFile(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/OUT\\quot\\\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Deleted /OUT/\\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\b)//crlf////tab////tab////tab////tab////tab////tab//cSkipped\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//n\\plus\\\\plus\\//crlf////tab////tab////tab////tab//endwhile//crlf////tab////tab////tab//endif//crlf////tab////tab////tab////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////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////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\\)\\plus\\\\quot\\pfg_invoices~~backslash~~pending~~backslash~~\\quot\\//crlf////tab////tab////tab//if(not(fileExists(sPFGPendingDir)))//crlf////tab////tab////tab////tab//appendToLog(\\quot\\Creating directory: \\quot\\\\plus\\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\\\\plus\\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\\\\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(pfg\\comma\\\\quot\\/OUT\\quot\\)//crlf////tab////tab////tab////tab//appendToLog(\\quot\\chdir to /out: \\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(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\\plus\\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\\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(pfg\\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(pfg\\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(pfg\\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)//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(pfg)//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(pfg)//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////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=580641|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=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=835531|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=never|^
ID=195407|X=151|Y=533|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=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_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 03-03-2025 16:45:01//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\\downloadPFGInvoicesUsingSFTP//crlf////tab////tab////tab//Result=execAgentAction(\\quot\\downloadPFGInvoicesUsingSFTP\\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=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;03032025//amp//nbsp;164501//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;03-03-2025//amp//nbsp;16:45:01</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\\downloadPFGInvoicesUsingSFTP\\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=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>03032025 164500</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\\113\\quot\\ style=\\quot\\width: 120px; height: 113px; 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: 492px; 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: 294px; 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: 402px; 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: 402px; 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: 178px; 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: 178px; 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=151|Y=335|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=downloadPFGInvoicesUsingSFTP|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=Result|AgentNodeComment=|AgentNodeTermType=|^
ID=396070|X=151|Y=443|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=341|Y=443|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=151|Y=219|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=341|Y=219|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|^
ID=88989|X=604|Y=61|W=699|H=376|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=<br><br>//crlf//<h1>Testing</h1>//crlf//<include type:script; commands:\\quot\\//crlf////tab//if(false)//crlf////tab////tab//s=execAgentAction(\\quot\\downloadPFGInvoicesUsingSFTP\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab//endif//crlf////tab//return(\\quot\\s=\\quot\\\\plus\\s)//crlf//\\quot\\>
</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="03-17-2024 02:18:13" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=12-26-2017 11:00:00:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=1 TaskHoursBetweenExecution=0 TaskMinutesBetweenExecution=0 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="formatDate(now(),\\quote\\MM-dd-yyyy\\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=46|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=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=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=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 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=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 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\\syscodownloadjsch\\comma\\action_list\\comma\\Action=syscodownloadjsch\\comma\\private//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//downloadjsch//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\syscodownloadjsch\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads jsch library from earthlink//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\\downloadjsch\\quot\\; commands:\\quot\\//crlf////tab////tab////tab////get java home directory and extensions directory//crlf////tab////tab////tab//sJavaHome=getProperty(\\quot\\java.home\\quot\\)//crlf////tab////tab////tab//sExtDir=addDirSlash(sJavaHome)\\plus\\\\quot\\lib/ext/\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Library directory: \\quot\\\\plus\\sExtDir)//crlf////crlf////tab////tab////tab//sFilename=sExtDir\\plus\\\\quot\\jsch-0.1.55.jar\\quot\\//crlf////tab////tab////tab//sFilename=replaceSubstring(sFilename\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\~~backslash~~\\quot\\)//crlf////tab////tab////tab//if(fileExists(sFilename))//crlf////tab////tab////tab////tab//return(\\quot\\Ok: Library already exists\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//sFtpFilename=\\quot\\http://www.aspect-software.net/Aspect7/libraries/jsch/jsch-0.1.55.jar\\quot\\//crlf////tab////tab////tab//s=fileGetContent(sFtpFilename)//crlf////tab////tab////tab//if(len(s)=0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: Could not download library: jsch-0.1.55.jar\\quot\\)//crlf////tab////tab////tab//endif//crlf////tab////tab////tab//appendToLog(\\quot\\Writing: \\quot\\\\plus\\sFilename)//crlf////crlf////tab////tab////tab////save the file in aspect7 so it can be copied manually if needed//crlf////tab////tab////tab//sTempFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\jsch-0.1.55.jar\\quot\\//crlf////tab////tab////tab//s1=fileWriteContent(sTempFilename\\comma\\s)//crlf////tab////tab////tab//s2=fileCopy(sTempFilename\\comma\\sFilename)//crlf////tab////tab////tab//appendToLog(\\quot\\s1: \\quot\\\\plus\\s1)//crlf////tab////tab////tab//appendToLog(\\quot\\s2: \\quot\\\\plus\\s2)//crlf////crlf////tab////tab////tab//if(pos(\\quot\\denied\\quot\\\\comma\\s2)>0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: \\quot\\\\plus\\s2)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//return(\\quot\\ok\\quot\\)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//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~~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\\downloadSyscoInvoices\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Download Sysco Invoices (SFTP)\\quot\\)//crlf////crlf////tab////tab////tab////abort if POSInterface_StoreID if blank or equals Undefined//crlf////tab////tab////tab//b=boolean(getSystemValue(\\quot\\DevelopmentMode\\quot\\))//crlf////tab////tab////tab//if(not(b))//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////test store was jMyUEiRuadQbaRFsylp72Bol//crlf////tab////tab////tab////tab//if((sStoreID=getToken(\\quot\\POSInterface_StoreID\\quot\\)) or (sStoreID=\\quot\\jMyUEiRuadQbaRFsylp72Bol\\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: \\quot\\\\plus\\sStoreName\\plus\\\\quot\\ 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////get file list//crlf////tab////tab////tab////tab////tab////tab////tab//arFiles=sftpListFiles(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/Outbound\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\arFiles=\\quot\\\\plus\\arFiles)//crlf////tab////tab////tab////tab////tab////tab////tab//cFilesOnServer=getElementCount(arFiles\\comma\\char(0x3B))//crlf////tab////tab////tab////tab////tab////tab////tab//if(boolean(getSystemValue(\\quot\\DevelopmentMode\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab//cFilesOnServer=1//crlf////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab//if(cFilesOnServer=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\No files on server\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////download the files//crlf////tab////tab////tab////tab////tab////tab////tab////tab//n=0//crlf////tab////tab////tab////tab////tab////tab////tab////tab//while(n<cFilesOnServer)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////get the filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=getElement(arFiles\\comma\\n\\comma\\char(0x3B))//crlf////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////get the local filename and archived filename//crlf////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//sLocalArchiveFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\invoices~~backslash~~archive~~backslash~~\\quot\\\\plus\\sFtpFilename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalFilename=replaceSubstring(sLocalFilename\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\~~backslash~~\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalArchiveFilename=replaceSubstring(sLocalArchiveFilename\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\~~backslash~~\\quot\\)//crlf////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//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////see if the file already exists//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=false//crlf////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//bExists=true//crlf////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//bExists=true//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////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//if(not(bExists))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//b=sFtpGetFile(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/Outbound\\quot\\\\comma\\sFtpFilename\\comma\\sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Retr \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\b)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(b)//crlf////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//iSize=fileSize(sLocalFilename)//crlf////crlf////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//if((bExist) and (iSize>0))//crlf////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//else//crlf////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//if(bExist)//crlf////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//endif//crlf////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//endif//crlf////crlf////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////and catering.  Delete the catering invoices.//crlf////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//appendToLog(\\quot\\Special handling for obw89i6vv\\quot\\)//crlf////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//if(pos(\\quot\\011_00552950\\quot\\\\comma\\sLocalFilename)>=0)//crlf////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//appendToLog(\\quot\\Deleted \\quot\\\\plus\\sLocalFilename)//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//endif//crlf////tab////tab////tab////crlf////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//driverPutFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Received\\quot\\\\comma\\r\\comma\\now())//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//else//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//appendToLog(\\quot\\File already exists: \\quot\\\\plus\\sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cSkipped\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//n\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab//endwhile//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(cCredentialError>0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing FTP credentials for \\quot\\\\plus\\cCredentialError\\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//OLDdownloadSyscoInvoices//crlf////crlf//This was the original sysco routine.  It was replaced by the one above//crlf//3/2021 in order to use sftp instead of ftp//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\OLDdownloadSyscoInvoices\\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~~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\\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\\~~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\\/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~~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////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=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=570024|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=97071|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=true|AgentReport=always|AgentReportTo={AspectServerHashID}|^
ID=409056|X=183|Y=732|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=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=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=false|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=white|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 03-14-2024 19:02: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_Download Sysco Invoice\\comma\\AgentAction\\comma\\97071\\comma\\0\\comma\\Download jsch library//crlf////crlf////tab////tab////Download jsch library//crlf////tab////tab//Result=execAgentAction(\\quot\\syscodownloadjsch\\quot\\)//crlf////tab////tab//appendToLog(\\quot\\syscodownloadjsch ()=\\quot\\\\plus\\left(Result\\comma\\128))//crlf////crlf////tab////tab////Does hsch library exist?//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 Sysco Invoice\\comma\\AgentAction\\comma\\757443\\comma\\0\\comma\\Download Sysco Invoices//crlf////crlf////tab////tab////tab////Download Sysco Invoices//crlf////tab////tab////tab//result=execAgentAction(\\quot\\downloadSyscoInvoices\\quot\\)//crlf////tab////tab////tab//appendToLog(\\quot\\downloadSyscoInvoices ()=\\quot\\\\plus\\left(result\\comma\\128))//crlf////crlf////tab////tab////tab////Result Ok?//crlf////tab////tab////tab//appendToLog(\\quot\\(startsWith(result\\comma\\\\apos\\ok\\apos\\))=\\quot\\\\plus\\(startsWith(result\\comma\\\\quot\\ok\\quot\\)))//crlf////tab////tab////tab//if(startsWith(result\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Sysco Invoice\\comma\\AgentTerminate\\comma\\409056\\comma\\0\\comma\\Ok//crlf////tab////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////tab//scriptSetResult(result)//crlf////tab////tab////tab//else//crlf////tab////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Sysco Invoice\\comma\\AgentTerminate\\comma\\937990\\comma\\2\\comma\\Error//crlf////tab////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////tab//scriptSetResult(result)//crlf////tab////tab////tab//endif//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Sysco Invoice\\comma\\AgentTerminate\\comma\\931501\\comma\\1\\comma\\Library does not exist//crlf////tab////tab////tab//agentReportStatus(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Download Sysco Invoice\\quot\\\\comma\\\\quot\\931501\\quot\\\\comma\\1\\comma\\{AspectServerHashID}\\comma\\\\quot\\Library does not exist\\quot\\\\comma\\\\quot\\Error: Unable to download jsch lirary\\quot\\\\comma\\bForceReport\\comma\\now()-tAgentStart\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab//scriptSetResult(\\quot\\Error: Unable to download jsch lirary\\quot\\)//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;03142024//amp//nbsp;190239//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;03-14-2024//amp//nbsp;19:02: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><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;jsch//amp//nbsp;library</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\\syscodownloadjsch\\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\\syscodownloadjsch//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;//Does//amp//nbsp;hsch//amp//nbsp;library//amp//nbsp;exist?</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><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;//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;//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;//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;//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;//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;//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'>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;//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'>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;//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'>agentReportStatus</span>(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Download//amp//nbsp;Sysco//amp//nbsp;Invoice\\quot\\\\comma\\\\quot\\931501\\quot\\\\comma\\1\\comma\\{AspectServerHashID}\\comma\\\\quot\\Library//amp//nbsp;does//amp//nbsp;not//amp//nbsp;exist\\quot\\\\comma\\\\quot\\Error://amp//nbsp;Unable//amp//nbsp;to//amp//nbsp;download//amp//nbsp;jsch//amp//nbsp;lirary\\quot\\\\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>(\\quot\\Error://amp//nbsp;Unable//amp//nbsp;to//amp//nbsp;download//amp//nbsp;jsch//amp//nbsp;lirary\\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=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>03142024 190239</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\\chart97071\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\139\\quot\\ style=\\quot\\width: 120px; height: 139px; 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: always<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: 691px; 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: 441px; 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: 575px; 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: 575px; 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><div id=\\quot\\chart97071\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart62193\\quot\\ style=\\quot\\position: absolute; top: 191px; 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 jsch library<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>syscodownloadjsch<br></td></tr><tr><td><u>Return</u></td><td>Result</td></tr></tbody></table></div></div><div id=\\quot\\chart62193\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart757443\\quot\\ agentchildnonode=\\quot\\chart931501\\quot\\ style=\\quot\\position: absolute; top: 325px; 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\\>Does hsch library exist?<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\\chart931501\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 325px; left: 190px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\97\\quot\\ style=\\quot\\width: 120px; height: 97px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Library does not exist<hr><span style=\\quot\\color:red\\quot\\>Fail</span></div></div>^
ID=757443|X=183|Y=482|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=183|Y=616|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//~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~ok~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~)|AgentNodeActionReturnValue=|AgentNodeComment=Result Ok?|AgentNodeTermType=|^
ID=937990|X=373|Y=616|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=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=result|AgentNodeActionReturnValue=|AgentNodeComment=Error|AgentNodeTermType=|^
ID=97071|X=183|Y=232|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=62193|AgentChildNoNode=|AgentSensor=|AgentAction=syscodownloadjsch|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=Result|AgentNodeComment=Download jsch library|AgentNodeTermType=|^
ID=62193|X=183|Y=366|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=757443|AgentChildNoNode=931501|AgentSensor=1|AgentAction=0|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=startsWith(Result//comma//~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~ok~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~)|AgentNodeActionReturnValue=|AgentNodeComment=Does hsch library exist?|AgentNodeTermType=|^
ID=931501|X=373|Y=366|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=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=~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~Error: Unable to download jsch lirary~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~|AgentNodeActionReturnValue=|AgentNodeComment=Library does not exist|AgentNodeTermType=1|
</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="07-10-2024 22:29:00" 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=56|toolboxy=143|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//Download GFS Invoice\\comma\\downloadGFSSFtpInvoices\\comma\\action_list\\comma\\Action=downloadGFSSFtpInvoices\\comma\\private//crlf////tab//Download GFS Invoice\\comma\\GFSdownloadjsch\\comma\\action_list\\comma\\Action=GFSdownloadjsch\\comma\\private//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//GFSdownloadjsch//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\GFSdownloadjsch\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads jsch library from earthlink//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\\downloadjsch\\quot\\; commands:\\quot\\//crlf////tab////tab////tab////get java home directory and extensions directory//crlf////tab////tab////tab//sJavaHome=getProperty(\\quot\\java.home\\quot\\)//crlf////tab////tab////tab//sExtDir=addDirSlash(sJavaHome)\\plus\\\\quot\\lib/ext/\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Library directory: \\quot\\\\plus\\sExtDir)//crlf////crlf////tab////tab////tab//sFilename=sExtDir\\plus\\\\quot\\jsch-0.1.55.jar\\quot\\//crlf////tab////tab////tab//sFilename=replaceSubstring(sFilename\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\~~backslash~~\\quot\\)//crlf////tab////tab////tab//if(fileExists(sFilename))//crlf////tab////tab////tab////tab//return(\\quot\\Ok: Library already exists\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//sFtpFilename=\\quot\\http://www.aspect-software.net/Aspect7/libraries/jsch/jsch-0.1.55.jar\\quot\\//crlf////tab////tab////tab//s=fileGetContent(sFtpFilename)//crlf////tab////tab////tab//if(len(s)=0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: Could not download library: jsch-0.1.55.jar\\quot\\)//crlf////tab////tab////tab//endif//crlf////tab////tab////tab//appendToLog(\\quot\\Writing: \\quot\\\\plus\\sFilename)//crlf////crlf////tab////tab////tab////save the file in aspect7 so it can be copied manually if needed//crlf////tab////tab////tab//sTempFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\jsch-0.1.55.jar\\quot\\//crlf////tab////tab////tab//s1=fileWriteContent(sTempFilename\\comma\\s)//crlf////tab////tab////tab//s2=fileCopy(sTempFilename\\comma\\sFilename)//crlf////tab////tab////tab//appendToLog(\\quot\\s1: \\quot\\\\plus\\s1)//crlf////tab////tab////tab//appendToLog(\\quot\\s2: \\quot\\\\plus\\s2)//crlf////crlf////tab////tab////tab//if(pos(\\quot\\denied\\quot\\\\comma\\s2)>0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: \\quot\\\\plus\\s2)//crlf////tab////tab////tab//endif//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//downloadGFSSFtpInvoices//crlf//--------------------------------------------------------------------------]//crlf//</conditional>//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadGFSSFtpInvoices\\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\\downloadGFSSFtpInvoices\\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: v6zdSw0dISQKRnb3kt931EGS//crlf////tab////tab////tab////tab////Aloha Steakhouse//crlf////tab////tab////tab////tab//appendToLog(\\quot\\sStoreID=\\quot\\\\plus\\sStoreID)//crlf////tab////tab////tab////tab//if((sStoreID=getToken(\\quot\\POSInterface_StoreID\\quot\\)) or (sStoreID=\\quot\\jMyUEiRuadQbaRFsylp72Bol\\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////get file list//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\sEDIFtpSite=\\quot\\\\plus\\sEDIFtpSite)//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\sEDIUserName=\\quot\\\\plus\\sEDIUserName)//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\sEDIPassword=\\quot\\\\plus\\sEDIPassword)//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Dir=\\quot\\\\plus\\\\quot\\/\\quot\\\\plus\\sEDICustomerNumber)//crlf////tab////tab////tab////tab////tab////crlf////tab////tab////tab////tab////tab////tab////tab////6-3-2024 Bayou Wings are done differently.  Files for both stores are located //crlf////tab////tab////tab////tab////tab////tab////tab////in a directory named outbox.  This is also handled below when the file is downloaded//crlf////tab////tab////tab////tab////tab////tab////tab//if(sEDIUserName=\\quot\\usBayouWings\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//arFiles=sftpListFiles(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/outbox\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab//arFiles=sftpListFiles(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/\\quot\\\\plus\\sEDICustomerNumber)//crlf////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\arFiles=\\quot\\\\plus\\arFiles)//crlf////tab////tab////tab////tab////tab////tab////tab//cFilesOnServer=getElementCount(arFiles\\comma\\char(0x3B))//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Count=\\quot\\\\plus\\cFilesOnServer)//crlf////tab////tab////tab////tab////tab////tab////tab//if(cFilesOnServer=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\No files on server\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////download the files//crlf////tab////tab////tab////tab////tab////tab////tab////tab//n=0//crlf////tab////tab////tab////tab////tab////tab////tab////tab//while(n<cFilesOnServer)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////get the filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=trim(getElement(arFiles\\comma\\n\\comma\\char(0x3B)))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\sFtpFilename=[\\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\]\\quot\\)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////skip directories//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//p=pos(sFtpFilename\\comma\\\\quot\\outbox~~pipe~~inbox~~pipe~~sent~~pipe~~received\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(p<0)//crlf////crlf////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//sLocalFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\invoices~~backslash~~\\quot\\\\plus\\sFtpFilename//crlf////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//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//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////see if the file already exists//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=false//crlf////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//bExists=true//crlf////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//bExists=true//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////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//if(not(bExists))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(sEDIUserName=\\quot\\usBayouWings\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//b=sFtpGetFile(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/outbox\\quot\\\\comma\\sFtpFilename\\comma\\sLocalFilename)//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//b=sFtpGetFile(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/\\quot\\\\plus\\sEDICustomerNumber\\comma\\sFtpFilename\\comma\\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//appendToLog(\\quot\\Retr \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\b)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(b)//crlf////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//iSize=fileSize(sLocalFilename)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////if a customer number is defined\\comma\\ disregard invoices that don\\apos\\t belong to the //crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////customer.  This was done 6/3/24 for Bayou Wings where invoices for both stores //crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////are uploaded to the same site.  The filename does not indicate which store the //crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////invoice belongs to.//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bDisregard=false//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(len(sEDICustomerNumber)>0)//crlf////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////look for an N1 record containing the customer number//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(pos(\\quot\\~~pipe~~\\quot\\\\plus\\sEDICustomerNumber\\comma\\s)<0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////file is not for the store so disregard it//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bDisregard=true//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////crlf////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//if((bExist) and (iSize>0) and (not(bDisregard)))//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//if(sEDIUserName=\\quot\\usBayouWings\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=sftpDeleteFile(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/outbox\\quot\\\\comma\\sFtpFilename)//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//s=sftpDeleteFile(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/\\quot\\\\plus\\sEDICustomerNumber\\comma\\sFtpFilename)//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//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//endif//crlf////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//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(bDisregard)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Disregarded: \\quot\\\\plus\\fileName(sLocalFilename))//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\\\\plus\\bExist\\plus\\\\quot\\ Size: \\quot\\\\plus\\iSize)//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//if(bExist)//crlf////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//endif//crlf////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//endif//crlf////crlf////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//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//else//crlf////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//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\\File already exists: \\quot\\\\plus\\sLocalFilename)//crlf////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//if(sEDIUserName=\\quot\\usBayouWings\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=sftpDeleteFile(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/outbox\\quot\\\\comma\\sFtpFilename)//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//s=sftpDeleteFile(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/\\quot\\\\plus\\sEDICustomerNumber\\comma\\sFtpFilename)//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//appendToLog(\\quot\\Delete \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\s)//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//cSkipped\\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//appendToLog(\\quot\\Skipping directory: \\quot\\\\plus\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//n\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab//endwhile//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(cCredentialError>0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing FTP credentials for \\quot\\\\plus\\cCredentialError\\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//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.  The invoice is opened using a script driver //crlf////tab////tab//and the script calls this action when the driver is opened.//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////get rid of any cr/lf - This was added 5/16/2024.  //crlf////tab////tab////tab////5/23 - This was done for a new invoice but causes problems for existing customers.  Needs work.//crlf////tab////tab////tab//sAllInput=replaceSubstring(sAllInput\\comma\\char(10)\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab//sAllInput=replaceSubstring(sAllInput\\comma\\char(13)\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////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////tab////tab////tab//fileWriteContent(\\quot\\c:~~backslash~~aspect7~~backslash~~temporary_files~~backslash~~GFSdebug.txt\\quot\\\\comma\\sAllInput)//crlf////crlf////tab////tab////tab//cBIG=getElementCount(sAllInput\\comma\\char(10))//crlf////tab////tab////tab//appendToLog(\\quot\\GFS: cBig=\\quot\\\\plus\\cBig)//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////6-14-2024 - This is a fix for Halls On The River.  Some lines appear to //crlf////tab////tab////tab////tab////tab////tab////tab////be missing a field.  The field count should be 40\\comma\\ not 39.  When it is 39//crlf////tab////tab////tab////tab////tab////tab////tab////an extra delimiter is added to bring it in line//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Line: \\quot\\\\plus\\n\\plus\\\\quot\\ ElementCount=\\quot\\\\plus\\getElementCount(sNewLine\\comma\\\\quot\\~~pipe~~\\quot\\))//crlf////tab////tab////tab////tab////tab////tab////tab//if(getElementCount(sNewLine\\comma\\\\quot\\~~pipe~~\\quot\\)=39)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//sNewLine=replaceSubstring(sNewLine\\comma\\\\quot\\~~pipe~~CTP\\quot\\\\comma\\\\quot\\~~pipe~~CTP~~pipe~~\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\New element count=\\quot\\\\plus\\getElementCount(sNewLine\\comma\\\\quot\\~~pipe~~\\quot\\))//crlf////tab////tab////tab////tab////tab////tab////tab//endif//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=610446|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=never|AgentReportTo={AspectServerHashID}|^
ID=732655|X=183|Y=629|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 03-17-2024 02:16:45//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\\610446\\comma\\0\\comma\\Download jsch library//crlf////crlf////tab////tab////Download jsch library//crlf////tab////tab//Result=execAgentAction(\\quot\\GFSdownloadjsch\\quot\\)//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\\downloadGFSSFtpInvoices\\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 GFS Invoice\\comma\\AgentTerminate\\comma\\732655\\comma\\0\\comma\\ok//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//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;03172024//amp//nbsp;021645//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;03-17-2024//amp//nbsp;02:16:45</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;jsch//amp//nbsp;library</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\\GFSdownloadjsch\\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;//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\\downloadGFSSFtpInvoices\\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>03172024 021645</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\\chart610446\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\126\\quot\\ style=\\quot\\width: 120px; height: 126px; 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 Off</span><br>Report Status: never<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: 588px; 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: 325px; 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>downloadGFSSFtpInvoices<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: 472px; 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: 472px; 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\\chart610446\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart353985\\quot\\ style=\\quot\\position: absolute; top: 191px; 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 jsch library<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>GFSdownloadjsch<br></td></tr><tr><td><u>Return</u></td><td>Result</td></tr></tbody></table></div></div>^
ID=353985|X=183|Y=366|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=downloadGFSSFtpInvoices|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=result|AgentNodeComment=Download Gordons Invoices|AgentNodeTermType=|^
ID=189810|X=183|Y=513|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=513|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|^
ID=610446|X=183|Y=232|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=353985|AgentChildNoNode=|AgentSensor=|AgentAction=GFSdownloadjsch|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=Result|AgentNodeComment=Download jsch library|AgentNodeTermType=|^
ID=241130|X=605|Y=121|W=828|H=529|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=<p>This was a temporary troubleshooting script from 7/10/24 used to download and distribute //crlf//files to bayou wings - slidell and hammond.</p>//crlf////crlf//<br>//crlf//<include type:script; commands:\\quot\\//crlf////tab//arFiles=getMatchingFiles(\\quot\\c:~~backslash~~temp~~backslash~~2024-07~~backslash~~gfs~~backslash~~*.*\\quot\\\\comma\\false\\comma\\false)//crlf////tab//cFiles=getElementCount(arFiles\\comma\\\\quot\\~~pipe~~\\quot\\)//crlf////tab//nFiles=0//crlf////tab//cSlidell=0//crlf////tab//cHammond=0//crlf////tab//cUnknown=0//crlf////tab//while(nFiles<cFiles)//crlf////tab////tab//sFilename=getElement(arFiles\\comma\\nFiles\\comma\\\\quot\\~~pipe~~\\quot\\)//crlf////tab////tab//sContent=fileGetContent(sFilename)//crlf////tab////tab//appendToLog(\\quot\\sFilename=\\quot\\\\plus\\sFilename\\plus\\\\quot\\ len=\\quot\\\\plus\\len(sContent))//crlf////tab////tab//if(pos(\\quot\\~~pipe~~722547889\\quot\\\\comma\\sContent)>=0)//crlf////tab////tab////tab////slidell//crlf////tab////tab////tab//sNewFilename=\\quot\\c:~~backslash~~temp~~backslash~~2024-07~~backslash~~gfs~~backslash~~slidell~~backslash~~\\quot\\\\plus\\filename(sFilename)\\plus\\fileExt(sFilename)//crlf////tab////tab////tab//fileCopy(sFilename\\comma\\sNewFilename)//crlf////tab////tab////tab//cSlidell\\plus\\\\plus\\//crlf////tab////tab//elseif(pos(\\quot\\~~pipe~~722547893\\quot\\\\comma\\sContent)>=0)//crlf////tab////tab////tab////hammond//crlf////tab////tab////tab//sNewFilename=\\quot\\c:~~backslash~~temp~~backslash~~2024-07~~backslash~~gfs~~backslash~~hammond~~backslash~~\\quot\\\\plus\\filename(sFilename)\\plus\\fileExt(sFilename)//crlf////tab////tab////tab//fileCopy(sFilename\\comma\\sNewFilename)//crlf////tab////tab////tab//cHammond\\plus\\\\plus\\//crlf////tab////tab//else//crlf////tab////tab////tab//cUnknown\\plus\\\\plus\\//tab////tab////crlf////tab////tab//endif//crlf////tab////tab//nFiles\\plus\\\\plus\\//crlf////tab//endwhile//crlf////crlf////tab//return(\\quot\\Slidell: \\quot\\\\plus\\cSlidell\\plus\\\\quot\\ Hammond: \\quot\\\\plus\\cHammond\\plus\\\\quot\\ Unknown: \\quot\\\\plus\\cUnknown)//crlf//\\quot\\>
</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="10-08-2022 03:28:30" modifiedby="Thnikpad3" TaskEnabled=false IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=03-08-2019 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=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="03-01-2024 00:02:56" 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=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\\'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=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 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=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 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~~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\\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\\\\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\\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\\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\\curtze.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\\\\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\\~~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////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(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\\)\\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//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////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=270559|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=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="03-01-2024 01:12:11" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=11-10-2020 13:25: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\\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~~backslash~~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~~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\\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.aspect-software.net\\quot\\//crlf////tab////tab////tab////tab////tab////tab//sEDIPassword=\\quot\\H@rd1Es2024\\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\\~~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////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~~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//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//~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~ok~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~)|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><widget name="Download Katsiroubas Invoice" group="Inventory" category="Invoice Downloads" description="" type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Download Katsiroubas Invoice" modified="06-03-2021 16:45:32" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=06-03-2021 14:37: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\\Katsiroubas\\quote\\,0,\\quote\\StoreID=\\quote\\+getToken(\\quote\\POSInterface_StoreID\\quote\\)))\\gt\\0)" TaskConditional_Expression_Description="Executes when Katsiroubas 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=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\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download Katsiroubas 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 Katsiroubas Invoice.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Download Katsiroubas Invoice\\comma\\downloadKatsiroubasInvoices\\comma\\action_list\\comma\\Action=downloadKatsiroubasInvoices\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//downloadKatsiroubasInvoices//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadKatsiroubasInvoices\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads Katsiroubas invoices.  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\\downloadKatsiroubasInvoices\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Download Katsiroubas 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 Katsiroubas 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\\Katsiroubas\\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=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\\\\\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//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////get file list//crlf////tab////tab////tab////tab////tab////tab////tab////tab//arFiles=ftpListFiles(ftp)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\arFiles=\\quot\\\\plus\\arFiles)//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////get the local filename and archived filename//crlf////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//sLocalArchiveFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\invoices\archive\\\quot\\\\plus\\sFtpFilename//crlf////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//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////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\\apos\\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\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\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(bEDIDelete)//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//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////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////tab//cDownload\\plus\\\\plus\\//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\\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\\File already exists: \\quot\\\\plus\\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\\\\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//cDeleted\\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//endif//crlf////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//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=always|^
ID=903630|X=183|Y=474|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 Katsiroubas Invoice\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Katsiroubas Invoice\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 06-03-2021 14:59:35//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_Download Katsiroubas Invoice\\comma\\AgentAction\\comma\\490472\\comma\\0\\comma\\Download Katsiroubas Invoices//crlf////crlf////tab////tab////Download Katsiroubas Invoices//crlf////tab////tab//result=execAgentAction(\\quot\\downloadKatsiroubasInvoices\\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 Katsiroubas Invoice\\comma\\AgentTerminate\\comma\\903630\\comma\\0\\comma\\Ok//crlf////tab////tab////tab//agentReportStatus(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Download Katsiroubas Invoice\\quot\\\\comma\\\\quot\\903630\\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_Download Katsiroubas Invoice\\comma\\AgentTerminate\\comma\\492028\\comma\\1\\comma\\Error//crlf////tab////tab////tab//agentReportStatus(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Download Katsiroubas Invoice\\quot\\\\comma\\\\quot\\492028\\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=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;06032021//amp//nbsp;145935//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;Katsiroubas//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;06-03-2021//amp//nbsp;14:59:35</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><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;Katsiroubas//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\\downloadKatsiroubasInvoices\\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_Download//amp//nbsp;Katsiroubas//amp//nbsp;Invoice\\quot\\\\comma\\\\quot\\903630\\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_Download//amp//nbsp;Katsiroubas//amp//nbsp;Invoice\\quot\\\\comma\\\\quot\\492028\\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=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>06032021 145935</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\\137\\quot\\ style=\\quot\\width: 120px; height: 137px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Download Katsiroubas 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: always<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: 433px; 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: 174px; 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 Katsiroubas Invoices<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>downloadKatsiroubasInvoices<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: 319px; 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: 319px; 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=215|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=downloadKatsiroubasInvoices|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=result|AgentNodeComment=Download Katsiroubas Invoices|AgentNodeTermType=|^
ID=4373|X=183|Y=360|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=360|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 Yhata Invoice" group="Inventory" category="Invoice Downloads" description="" type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Download Yhata Invoice" modified="04-12-2024 23:09:14" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=06-03-2021 21:51: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\\yhata\\quote\\,0,\\quote\\StoreID=\\quote\\+getToken(\\quote\\POSInterface_StoreID\\quote\\)))\\gt\\0)" TaskConditional_Expression_Description="Executes when yhata 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 Yhata 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=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\\'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=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 Yhata 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 Yhata Invoice.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Download Yhata Invoice\\comma\\downloadYhataInvoices\\comma\\action_list\\comma\\Action=downloadYhataInvoices\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//downloadYhataInvoices//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadYhataInvoices\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads Yhata 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~~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\\downloadYhataInvoices\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Download Yhata 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////JR\\apos\\s Loghouse: e4Fgt4EsFazvS6U0IbpUbp3P//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\\e4Fgt4EsFazvS6U0IbpUbp3P\\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 Yhata 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\\Yhata\\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\\yhata.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\\Yhata\\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\\\\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\\~~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\\EDIFtpSite: \\quot\\\\plus\\sEDIFtpSite\\plus\\\\quot\\ EDIUserName: \\quot\\\\plus\\sEDIUserName\\plus\\\\quot\\ EDIPassword: \\quot\\\\plus\\sEDIPassword)//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Connect to \\quot\\\\plus\\sEDIFtpSite\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////crlf////tab////tab////tab////tab////tab////tab////tab//if(pos(\\quot\\error\\quot\\\\comma\\s)>=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Attempting to connect using prior user name\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpConnect(ftp\\comma\\sEDIFtpSite\\comma\\\\quot\\yhata\\percent\\aspect-software.net\\quot\\\\comma\\sEDIPassword\\comma\\true)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Connect to \\quot\\\\plus\\sEDIFtpSite\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab//endif//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////fileWriteContent(\\quot\\c:~~backslash~~temp~~backslash~~2024-02~~backslash~~yhata~~backslash~~arfiles.txt\\quot\\\\comma\\arFiles)//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////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////they added a second period when the timestamp was included in the filename.//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////This results in .cs with the v being dropped.  Append the v and add the //crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////second period//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(endsWith(sFtpFilename\\comma\\\\quot\\.cs\\quot\\))//tab////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=sFtpFilename\\plus\\\\quot\\v\\quot\\//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//appendToLog(\\quot\\sFtpFilename2=\\quot\\\\plus\\sFtpFilename)//crlf////tab////tab////tab////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////NOTE: A CUSTOMER NUMBER WILL NEED TO BE ADDED TO THE FILENAME IF ANOTHER//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////CUSTOMER IS ADDED OR INVOICES WILL NEED TO BE UPLOADED TO A DIFFERENT//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////DIRECTORY//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((true) or (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=addDirSlash(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\invoices\\quot\\)\\plus\\sFtpFilename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalArchiveFilename=addDirSlash(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\invoices\\quot\\)\\plus\\\\quot\\archive\\quot\\\\plus\\char(0x5C)\\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 Yhata 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//^
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=270559|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=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 Yhata Invoice\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Yhata Invoice\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 06-03-2021 21:57:46//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 Yhata Invoice\\comma\\AgentAction\\comma\\565488\\comma\\0\\comma\\Download Yhata Invoices//crlf////crlf////tab////tab////Download Yhata Invoices//crlf////tab////tab//result=execAgentAction(\\quot\\downloadYhataInvoices\\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 Yhata 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 Yhata 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;06032021//amp//nbsp;215746//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;Yhata//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;06-03-2021//amp//nbsp;21:57:46</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;Yhata//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\\downloadYhataInvoices\\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>06032021 215746</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 Yhata 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 Yhata Invoices<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>downloadYhataInvoices<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:red\\quot\\>Fail</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=downloadYhataInvoices|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=result|AgentNodeComment=Download Yhata 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 Sygma Invoices" group="Inventory" category="Invoice Downloads" description="" type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Download Sygma Invoices" modified="04-27-2024 22:50:13" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=03-01-2023 16:55:00:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=1 TaskMinutesBetweenExecution=0 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\\Sygma\\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=48|toolboxy=127|aspectfuncx=100|aspectfuncy=100|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=false|aspectfuncVisible=false|PublishFtpFilename=Download Sygma 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\\'381754')\\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\\'718571')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=381754|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 Sygma 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\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download Sygma Invoices.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Download Sygma Invoices\\comma\\downloadjsch2\\comma\\action_list\\comma\\Action=downloadjsch2\\comma\\private//crlf////tab//Download Sygma Invoices\\comma\\downloadSygmaInvoices\\comma\\action_list\\comma\\Action=downloadSygmaInvoices\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//downloadjsch2//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadjsch2\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads jsch library from earthlink//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\\downloadjsch\\quot\\; commands:\\quot\\//crlf////tab////tab////tab////get java home directory and extensions directory//crlf////tab////tab////tab//sJavaHome=getProperty(\\quot\\java.home\\quot\\)//crlf////tab////tab////tab//sExtDir=addDirSlash(sJavaHome)\\plus\\\\quot\\lib/ext/\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Library directory: \\quot\\\\plus\\sExtDir)//crlf////crlf////tab////tab////tab//sFilename=sExtDir\\plus\\\\quot\\jsch-0.1.55.jar\\quot\\//crlf////tab////tab////tab//sFilename=replaceSubstring(sFilename\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\\\\quot\\)//crlf////tab////tab////tab//if(fileExists(sFilename))//crlf////tab////tab////tab////tab//return(\\quot\\Ok: Library already exists\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//sFtpFilename=\\quot\\http://www.aspect-software.net/Aspect7/libraries/jsch/jsch-0.1.55.jar\\quot\\//crlf////tab////tab////tab//s=fileGetContent(sFtpFilename)//crlf////tab////tab////tab//if(len(s)=0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: Could not download library: jsch-0.1.55.jar\\quot\\)//crlf////tab////tab////tab//endif//crlf////tab////tab////tab//appendToLog(\\quot\\Writing: \\quot\\\\plus\\sFilename)//crlf////crlf////tab////tab////tab////save the file in aspect7 so it can be copied manually if needed//crlf////tab////tab////tab//sTempFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\jsch-0.1.55.jar\\quot\\//crlf////tab////tab////tab//s1=fileWriteContent(sTempFilename\\comma\\s)//crlf////tab////tab////tab//s2=fileCopy(sTempFilename\\comma\\sFilename)//crlf////tab////tab////tab//appendToLog(\\quot\\s1: \\quot\\\\plus\\s1)//crlf////tab////tab////tab//appendToLog(\\quot\\s2: \\quot\\\\plus\\s2)//crlf////crlf////tab////tab////tab//if(pos(\\quot\\denied\\quot\\\\comma\\s2)>0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: \\quot\\\\plus\\s2)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//return(\\quot\\ok\\quot\\)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//downloadSygmaInvoices//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadSygmaInvoices\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads any new invoices from the Sygma 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\\downloadSygmaInvoices\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Download Sygma Invoices (SFTP)\\quot\\)//crlf////crlf////tab////tab////tab////abort if POSInterface_StoreID if blank or equals Undefined//crlf////tab////tab////tab//b=boolean(getSystemValue(\\quot\\DevelopmentMode\\quot\\))//crlf////tab////tab////tab//if(not(b))//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//if((sStoreID=getToken(\\quot\\POSInterface_StoreID\\quot\\)) or (sStoreID=\\quot\\jMyUEiRuadQbaRFsylp72Bol\\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 Sygma 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\\Sygma\\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////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: \\quot\\\\plus\\sStoreName\\plus\\\\quot\\ 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////get file list//crlf////tab////tab////tab////tab////tab////tab////tab//arFiles=sftpListFiles(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/Outbound\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\arFiles=\\quot\\\\plus\\arFiles)//crlf////tab////tab////tab////tab////tab////tab////tab//cFilesOnServer=getElementCount(arFiles\\comma\\char(0x3B))//crlf////tab////tab////tab////tab////tab////tab////tab////if(boolean(getSystemValue(\\quot\\DevelopmentMode\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab//////tab//cFilesOnServer=1//crlf////tab////tab////tab////tab////tab////tab////tab////endif//crlf////tab////tab////tab////tab////tab////tab////tab//if(cFilesOnServer=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\No files on server\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////download the files//crlf////tab////tab////tab////tab////tab////tab////tab////tab//n=0//crlf////tab////tab////tab////tab////tab////tab////tab////tab//while(n<cFilesOnServer)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////get the filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=getElement(arFiles\\comma\\n\\comma\\char(0x3B))//crlf////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//if(startsWith(sFtpFilename\\comma\\\\quot\\IV_\\quot\\\\plus\\sEDICustomerNumber))//crlf////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//sLocalFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\invoices\\\quot\\\\plus\\sFtpFilename//crlf////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//sLocalFilename=replaceSubstring(sLocalFilename\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalArchiveFilename=replaceSubstring(sLocalArchiveFilename\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\\\\quot\\)//crlf////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//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////see if the file already exists//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=false//crlf////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//bExists=true//crlf////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//bExists=true//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////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//if(not(bExists))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//b=sFtpGetFile(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/Outbound\\quot\\\\comma\\sFtpFilename\\comma\\sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Retr \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\b)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(b)//crlf////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//iSize=fileSize(sLocalFilename)//crlf////crlf////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//if((bExist) and (iSize>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((bExist) and (bEDIDelete))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//b=sftpDeleteFile(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/Outbound\\quot\\\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Deleted /Outbound/\\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\b)//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//cDownload\\plus\\\\plus\\//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\\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//if(bExist)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////delete the local failed download which is 0 bytes//crlf////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//endif//crlf////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//endif//crlf////crlf////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//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//else//crlf////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//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\\File already exists: \\quot\\\\plus\\sLocalFilename)//crlf////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//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//n\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab//endwhile//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 Sygma 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 Sygma vendors found for any stores\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//if(cCredentialError>0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing FTP credentials for \\quot\\\\plus\\cCredentialError\\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//^
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=718571|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=394915|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=never|^
ID=891151|X=183|Y=719|W=119|H=47|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 Sygma Invoices\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Sygma Invoices\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 03-08-2023 15:57: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 Sygma Invoices\\comma\\AgentAction\\comma\\394915\\comma\\0\\comma\\Download jsch library//crlf////crlf////tab////tab////Download jsch library//crlf////tab////tab//Result=execAgentAction(\\quot\\downloadjsch2\\quot\\)//crlf////crlf////tab////tab////Does hsch library exist?//crlf////tab////tab//if(startsWith(Result\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Sygma Invoices\\comma\\AgentAction\\comma\\451289\\comma\\0\\comma\\Download Sygma Invoices//crlf////crlf////tab////tab////tab////Download Sygma Invoices//crlf////tab////tab////tab//result=execAgentAction(\\quot\\downloadSygmaInvoices\\quot\\)//crlf////crlf////tab////tab////tab////Result Ok?//crlf////tab////tab////tab//if(startsWith(result\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Sygma Invoices\\comma\\AgentTerminate\\comma\\891151\\comma\\0\\comma\\Ok//crlf////tab////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab////tab//else//crlf////tab////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Sygma Invoices\\comma\\AgentTerminate\\comma\\164897\\comma\\1\\comma\\Error//crlf////tab////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab////tab//endif//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Sygma Invoices\\comma\\AgentTerminate\\comma\\341484\\comma\\1\\comma\\Library does not exist//crlf////tab////tab////tab//scriptSetResult(\\quot\\Error: Unable to download jsch lirary\\quot\\)//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;03082023//amp//nbsp;155755//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;Sygma//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;03-08-2023//amp//nbsp;15:57: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;jsch//amp//nbsp;library</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\\downloadjsch2\\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;//Does//amp//nbsp;hsch//amp//nbsp;library//amp//nbsp;exist?</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><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;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Download//amp//nbsp;Sygma//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;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;result=<span class='keyword'>execAgentAction</span>(\\quot\\downloadSygmaInvoices\\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;//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;//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\\Error://amp//nbsp;Unable//amp//nbsp;to//amp//nbsp;download//amp//nbsp;jsch//amp//nbsp;lirary\\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=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>03082023 155755</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\\chart394915\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\113\\quot\\ style=\\quot\\width: 120px; height: 113px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Download Sygma 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\\chart891151\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 678px; 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\\chart394915\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart79311\\quot\\ style=\\quot\\position: absolute; top: 178px; 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 jsch library<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>downloadjsch<br></td></tr><tr><td><u>Return</u></td><td>Result</td></tr></tbody></table></div></div><div id=\\quot\\chart79311\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart451289\\quot\\ agentchildnonode=\\quot\\chart341484\\quot\\ style=\\quot\\position: absolute; top: 312px; 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\\>Does hsch library exist?<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\\chart341484\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 312px; left: 190px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\97\\quot\\ style=\\quot\\width: 120px; height: 97px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Library does not exist<hr><span style=\\quot\\color:red\\quot\\>Fail</span></div></div><div id=\\quot\\chart451289\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart295960\\quot\\ style=\\quot\\position: absolute; top: 428px; 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 Sygma Invoices<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>downloadSygmaInvoices<br></td></tr><tr><td><u>Return</u></td><td>result</td></tr></tbody></table></div></div><div id=\\quot\\chart295960\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart891151\\quot\\ agentchildnonode=\\quot\\chart164897\\quot\\ style=\\quot\\position: absolute; top: 562px; 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\\chart164897\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 562px; 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=394915|X=183|Y=219|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=79311|AgentChildNoNode=|AgentSensor=|AgentAction=downloadjsch2|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=Result|AgentNodeComment=Download jsch library|AgentNodeTermType=|^
ID=79311|X=183|Y=353|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=451289|AgentChildNoNode=341484|AgentSensor=1|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=startsWith(Result//comma//\\quot\\ok\\quot\\)|AgentNodeActionReturnValue=|AgentNodeComment=Does hsch library exist?|AgentNodeTermType=|^
ID=341484|X=373|Y=353|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=\\quot\\Error: Unable to download jsch lirary\\quot\\|AgentNodeActionReturnValue=|AgentNodeComment=Library does not exist|AgentNodeTermType=1|^
ID=451289|X=183|Y=469|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=295960|AgentChildNoNode=|AgentSensor=|AgentAction=downloadSygmaInvoices|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=result|AgentNodeComment=Download Sygma Invoices|AgentNodeTermType=|^
ID=295960|X=183|Y=603|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=891151|AgentChildNoNode=164897|AgentSensor=1|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=startsWith(result//comma//\\quot\\ok\\quot\\)|AgentNodeActionReturnValue=|AgentNodeComment=Result Ok?|AgentNodeTermType=|^
ID=164897|X=373|Y=603|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 Van Eerden Invoices" group="Inventory" category="EDI" description="Runs on the server to download invoices from Van Eerden.  The invoice file contains multiple stores and is split up before being sent to stores using a file set." type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Download Van Eerden Invoices" modified="10-17-2024 22:23:59" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=04-04-2023 20:29:00:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=1 TaskMinutesBetweenExecution=0 TaskSecondsBetweenExecution=0 TaskExecuteSun=true TaskExecuteMon=true TaskExecuteTue=true TaskExecuteWed=true TaskExecuteThu=true TaskExecuteFri=true TaskExecuteSat=true TaskConditional_Expression="((hour(now())=6) or (hour(now())=11) or (hour(now())=14)) and (isServer())" TaskConditional_Expression_Description="" TaskState_Function="" TaskState_Expression_Description="" TaskWidgetParams="" TaskWindowForExecution=0>
Preferences|toolboxx=44|toolboxy=303|aspectfuncx=100|aspectfuncy=100|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=false|aspectfuncVisible=false|PublishFtpFilename=Download Van Eerden 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=101|H=14|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\\'9190')\\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\\'335825')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=9190|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 Van Eerden 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\\)+\\quot\\cache\WidgetEdit_L4HxWEciR8sT7E30IKVZXD70_Download Van Eerden Invoices.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Download Van Eerden Invoices\\comma\\downloadFromVanEerdenToServer\\comma\\action_list\\comma\\Action=downloadFromVanEerdenToServer\\comma\\private//crlf////tab//Download Van Eerden Invoices\\comma\\processVanEerdenInvoice\\comma\\action_list\\comma\\Action=processVanEerdenInvoice\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//downloadFromVanEerdenToServer//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadFromVanEerdenToServer\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads invoices from VanEerden to the Aspect server.  A single file contains //crlf////tab////tab//multiple stores.  These are processed and posted to an ftp site on Earthlink//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\\downloadFromVanEerdenToServer\\quot\\; commands:\\quot\\//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//sVanEerdenPendingDir=getToken(\\quot\\homedir\\quot\\)+\\quot\\VanEerden\incoming\\\quot\\//crlf////tab////tab////tab//if(not(fileExists(sVanEerdenPendingDir)))//crlf////tab////tab////tab////tab//appendToLog(\\quot\\Creating directory: \\quot\\+sVanEerdenPendingDir)//crlf////tab////tab////tab////tab//fileMakeDirectory(sVanEerdenPendingDir)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//if((not(fileExists(sVanEerdenPendingDir))) or (not(fileIsDirectory(sVanEerdenPendingDir))))//crlf////tab////tab////tab////tab//return(\\quot\\Error: Directory is invalid: \\quot\\+sVanEerdenPendingDir)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////connect to ftp server//crlf////tab////tab////tab//sPass=char(0x29)+char(0x2F)+char(0x3D)+char(0x26)+char(0x27)+\\quot\\SCT\\quot\\+char(0x25)+\\quot\\6r9\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\sPass=\\quot\\+sPass)//crlf////tab////tab////tab//s=ftpConnect(ftpVanEerden\\comma\\\\quot\\ftp.vaneerden.com\\quot\\\\comma\\\\quot\\Aspect_bww\\quot\\\\comma\\sPass\\comma\\true)//crlf////tab////tab////tab//appendToLog(\\quot\\Connect to ftp.vaneerden.com: \\quot\\+s)//crlf////crlf////tab////tab////tab//if(not(startsWith(s\\comma\\\\quot\\error\\quot\\)))//crlf////tab////tab////tab////tab////change directory to ///crlf////tab////tab////tab////tab//s=ftpChangeDir(ftpVanEerden\\comma\\\\quot\\/\\quot\\)//crlf////tab////tab////tab////tab//appendToLog(\\quot\\chdir to /: \\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(ftpVanEerden)//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\\.csv\\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=sVanEerdenPendingDir+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(ftpVanEerden\\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(ftpVanEerden\\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////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////upload the file to the Done directory//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpChangeDir(ftpVanEerden\\comma\\\\quot\\/Done\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\chdir to /Done: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Ftp send started for: \\quot\\+sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpResult=ftpStoreFile(ftpVanEerden\\comma\\sLocalFilename\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\ftp send: \\quot\\+sFtpResult)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////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(ftpVanEerden\\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////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////upload the file to the Done directory//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//s=ftpChangeDir(ftpVanEerden\\comma\\\\quot\\/Done\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\chdir to /Done: \\quot\\+s)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Ftp send started for: \\quot\\+sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpResult=ftpStoreFile(ftpVanEerden\\comma\\sLocalFilename\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\ftp send: \\quot\\+sFtpResult)//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(ftpVanEerden)//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(ftpVanEerden)//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//[!------------------------------------------------------------------------//crlf//processVanEerdenInvoice//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\processVanEerdenInvoice\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Processes an invoice downloaded from Van Eerden to create separate files //crlf////tab////tab//for each store.  //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\\processVanEerdenInvoice\\quot\\; commands:\\quot\\//crlf////tab////tab////tab////crlf////tab////tab////tab////process all files in the Aspect7\VanEerden\incoming directory//crlf////tab////tab////tab////separate files are created in the Aspect7\VanEerden\outgoing//crlf////tab////tab////tab//arFiles=getMatchingFiles(getToken(\\quot\\homedir\\quot\\)+\\quot\\VanEerden\incoming\*.csv\\quot\\\\comma\\false\\comma\\false)//crlf////crlf////tab////tab////tab////create a hashtable to keep up with the output for each store//crlf////tab////tab////tab//hashCreate(hOutput)//crlf////crlf////tab////tab////tab////open connection to earthlink//crlf////tab////tab////tab//sFtpResult=ftpConnect(ftp\\comma\\\\quot\\ftp-dom.earthlink.net\\quot\\\\comma\\\\quot\\aspect-software.net\\quot\\\\comma\\\\quot\\d897kje8\\quot\\\\comma\\ true)//crlf////tab////tab////tab//appendToLog(\\quot\\ftp connect: \\quot\\+sFtpResult)//crlf////crlf////tab////tab////tab//c=getElementCount(arFiles\\comma\\\\quot\\~~pipe~~\\quot\\)//crlf////tab////tab////tab//n=0//crlf////tab////tab////tab//appendToLog(\\quot\\Processing Van Eerden (\\quot\\+c+\\quot\\ files)\\quot\\)//crlf////tab////tab////tab//while(n<c)//crlf////tab////tab////tab////tab//sFilename=getElement(arFiles\\comma\\n\\comma\\\\quot\\~~pipe~~\\quot\\)//crlf////tab////tab////tab////tab//appendToLog(\\quot\\Processing \\quot\\+sFilename)//crlf////crlf////tab////tab////tab////tab//sContent=fileGetContent(sFilename)//crlf////tab////tab////tab////tab//sContent=replaceSubstring(sContent\\comma\\char(13)\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab//sContent=replaceSubstring(sContent\\comma\\char(0x22)\\comma\\\\quot\\\\quot\\)//crlf////crlf////tab////tab////tab////tab////get the header line//crlf////tab////tab////tab////tab//sHeader=getElement(sContent\\comma\\0\\comma\\char(10))//crlf////crlf////tab////tab////tab////tab//cLine=getElementCount(sContent\\comma\\char(10))//crlf////tab////tab////tab////tab//nLine=1//crlf////tab////tab////tab////tab//appendToLog(\\quot\\cLine=\\quot\\+cLine)//crlf////tab////tab////tab////tab//while(nLine<cLine)//crlf////tab////tab////tab////tab////tab//sLine=getElement(sContent\\comma\\nLine\\comma\\char(10))//crlf////tab////tab////tab////tab////tab//if(len(sLine)>0)//crlf////tab////tab////tab////tab////tab////tab//sStoreNumber=trim(getElement(sLine\\comma\\3))//crlf////crlf////tab////tab////tab////tab////tab////tab//if(hashContainsKey(hOutput\\comma\\sStoreNumber))//crlf////tab////tab////tab////tab////tab////tab////tab//sOutput=hashGet(hOutput\\comma\\sStoreNumber)//crlf////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab//sOutput=sHeader+char(13)+char(10)//crlf////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////tab//sOutput=sOutput+sLine+char(13)+char(10)//crlf////tab////tab////tab////tab////tab////tab//hashPut(hOutput\\comma\\sStoreNumber\\comma\\sOutput)//crlf////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//nLine++//crlf////tab////tab////tab////tab//endwhile//crlf////crlf////tab////tab////tab////tab////write the content//crlf////tab////tab////tab////tab//arKey=hashGetKeys(hOutput)//crlf////tab////tab////tab////tab//cKey=getElementCount(arKey)//crlf////tab////tab////tab////tab//nKey=0//crlf////tab////tab////tab////tab//while(nKey<cKey)//crlf////tab////tab////tab////tab////tab//sKey=getElement(arKey\\comma\\nKey)//crlf////tab////tab////tab////tab////tab//sContent=hashGet(hOutput\\comma\\sKey)//crlf////tab////tab////tab////tab////tab//sOutFilename=getToken(\\quot\\homedir\\quot\\)+\\quot\\VanEerden\outgoing\\\quot\\+fileName(sFilename)+\\quot\\_\\quot\\+sKey+\\quot\\.csv\\quot\\//crlf////tab////tab////tab////tab////tab//fileWriteContent(sOutFilename\\comma\\sContent)//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\Write content to \\quot\\+sOutFilename+\\quot\\ (\\quot\\+len(sContent)+\\quot\\ bytes)\\quot\\)//crlf////tab////tab////tab////tab////tab//nKey++//crlf////tab////tab////tab////tab//endwhile//crlf////crlf////tab////tab////tab////tab////upload the files to the Aspect ftp site//crlf////tab////tab////tab////tab//bFtpError=true//crlf////tab////tab////tab////tab////sFtpResult=ftpConnect(ftp\\comma\\\\quot\\ftp-dom.earthlink.net\\quot\\\\comma\\\\quot\\aspect-software.net\\quot\\\\comma\\\\quot\\d897kje8\\quot\\\\comma\\ true)//crlf////tab////tab////tab////tab////appendToLog(\\quot\\ftp connect: \\quot\\+sFtpResult)//crlf////tab////tab////tab////tab////if(startsWith(sFtpResult\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab////tab//if(true)//crlf////tab////tab////tab////tab////tab//sFtpResult=ftpSetMode(ftp\\comma\\\\quot\\binary\\quot\\)//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\ftp set binary: \\quot\\+sFtpResult)//crlf////tab////tab////tab////tab////tab//if(boolean(sFtpResult))//crlf////tab////tab////tab////tab////tab////tab//sFtpResult=ftpChangeDir(ftp\\comma\\\\quot\\/dropbox/vaneerden\\quot\\)//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\ftp chdir: \\quot\\+sFtpResult)//crlf////tab////tab////tab////tab////tab////tab//if(startsWith(sFtpResult\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab////tab////tab////tab////tab//nKey=0//crlf////tab////tab////tab////tab////tab////tab////tab//while(nKey<cKey)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//sKey=getElement(arKey\\comma\\nKey)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//sOutFilename=getToken(\\quot\\homedir\\quot\\)+\\quot\\VanEerden\outgoing\\\quot\\+fileName(sFilename)+\\quot\\_\\quot\\+sKey+\\quot\\.csv\\quot\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=fileName(sOutFilename)+fileExt(sOutFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Ftp transfer started for: \\quot\\+sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//sFtpResult=ftpStoreFile(ftp\\comma\\sOutFilename\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\ftp send: \\quot\\+sFtpResult)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//if(startsWith(sFtpResult\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab////tab////tab////tab////tab////tab//bFtpError=false//crlf////tab////tab////tab////tab////tab////tab////tab////tab//nKey++//crlf////tab////tab////tab////tab////tab////tab////tab//endwhile//crlf////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////rename the flie//crlf////tab////tab////tab////tab//sNewName=fileDrive(sFilename)+fileDir(sFilename)+fileName(sFilename)+\\quot\\.bak\\quot\\//crlf////tab////tab////tab////tab//appendToLog(\\quot\\Ren \\quot\\+sFilename+\\quot\\ - \\quot\\+sNewName)//crlf////tab////tab////tab////tab//fileRename(sFilename\\comma\\sNewName)//crlf////crlf////tab////tab////tab////tab//n++//crlf////tab////tab////tab//endwhile//crlf////tab////tab////crlf////tab////tab////tab//s=ftpDisconnect(ftp)//crlf////tab////tab////tab//appendToLog(\\quot\\Disconnect: \\quot\\+s)//crlf////crlf////tab////tab////tab//return(\\quot\\ok\\quot\\)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////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=335825|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=498893|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=never|^
ID=263060|X=183|Y=616|W=119|H=47|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~~~~backslash~~quot~~backslash~~~~backslash~~Download files: ~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~//plus//Result1//plus//getToken(~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~br~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~) //plus// ~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~Process files: ~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~//plus//Result2|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=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 Van Eerden Invoices\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Van Eerden Invoices\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 04-04-2023 22:49:58//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 Van Eerden Invoices\\comma\\AgentAction\\comma\\498893\\comma\\0\\comma\\Download invoices from Van Eerden//crlf////crlf////tab////tab////Download invoices from Van Eerden//crlf////tab////tab//Result1=execAgentAction(\\quot\\downloadFromVanEerdenToServer\\quot\\)//crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Van Eerden Invoices\\comma\\AgentAction\\comma\\189422\\comma\\0\\comma\\Process invoices//crlf////crlf////tab////tab////Process invoices//crlf////tab////tab//Result2=execAgentAction(\\quot\\processVanEerdenInvoice\\quot\\)//crlf////crlf////tab////tab////Ok?//crlf////tab////tab//if((startsWith(Result1\\comma\\\\quot\\ok\\quot\\)) and (startsWith(Result2\\comma\\\\quot\\ok\\quot\\)))//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Van Eerden Invoices\\comma\\AgentTerminate\\comma\\263060\\comma\\0\\comma\\Ok//crlf////tab////tab////tab//scriptSetResult(\\quot\\Download files: \\quot\\+Result1+getToken(\\quot\\br\\quot\\) + \\quot\\Process files: \\quot\\+Result2)//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Van Eerden Invoices\\comma\\AgentTerminate\\comma\\854781\\comma\\1\\comma\\Error//crlf////tab////tab////tab//scriptSetResult(\\quot\\Download files: \\quot\\+Result1+getToken(\\quot\\br\\quot\\) + \\quot\\Process files: \\quot\\+Result2)//crlf////tab////tab//endif//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;04042023//amp//nbsp;224958//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;Van//amp//nbsp;Eerden//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-04-2023//amp//nbsp;22:49:58</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//amp//nbsp;from//amp//nbsp;Van//amp//nbsp;Eerden</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;Result1=<span class='keyword'>execAgentAction</span>(\\quot\\downloadFromVanEerdenToServer\\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;//Process//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;Result2=<span class='keyword'>execAgentAction</span>(\\quot\\processVanEerdenInvoice\\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>(Result1\\comma\\\\quot\\ok\\quot\\))//amp//nbsp;and//amp//nbsp;(<span class='keyword'>startsWith</span>(Result2\\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\\Download//amp//nbsp;files://amp//nbsp;\\quot\\+Result1+<span class='keyword'>getToken</span>(\\quot\\br\\quot\\)//amp//nbsp;+//amp//nbsp;\\quot\\Process//amp//nbsp;files://amp//nbsp;\\quot\\+Result2)<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\\Download//amp//nbsp;files://amp//nbsp;\\quot\\+Result1+<span class='keyword'>getToken</span>(\\quot\\br\\quot\\)//amp//nbsp;+//amp//nbsp;\\quot\\Process//amp//nbsp;files://amp//nbsp;\\quot\\+Result2)<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=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>04042023 224958</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\\chart498893\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\113\\quot\\ style=\\quot\\width: 120px; height: 113px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Download Van Eerden 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\\chart263060\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 575px; 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\\chart498893\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart189422\\quot\\ style=\\quot\\position: absolute; top: 178px; 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 invoices from Van Eerden<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>downloadFromVanEerdenToServer<br></td></tr><tr><td><u>Return</u></td><td>Result1</td></tr></tbody></table></div></div><div id=\\quot\\chart189422\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart393802\\quot\\ style=\\quot\\position: absolute; top: 325px; 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\\>Process invoices<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>processVanEerdenInvoice<br></td></tr><tr><td><u>Return</u></td><td>Result2</td></tr></tbody></table></div></div><div id=\\quot\\chart393802\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart263060\\quot\\ agentchildnonode=\\quot\\chart854781\\quot\\ style=\\quot\\position: absolute; top: 459px; 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\\chart854781\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 459px; 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=967118|X=1178|Y=103|W=353|H=183|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=<br>//crlf//< include type:script; commands:\\quot\\//crlf////tab////s1=execAgentAction(downloadFromVanEerdenToServer\\comma\\\\quot\\\\quot\\)//crlf////tab////s2=execAgentAction(processVanEerdenInvoice\\comma\\\\quot\\\\quot\\)//crlf////tab////return(\\quot\\s1=\\quot\\\\plus\\s1\\plus\\getToken(\\quot\\br\\quot\\)\\plus\\\\quot\\s2=\\quot\\\\plus\\s2)//crlf////tab//sPass=char(0x29)\\plus\\char(0x2F)\\plus\\char(0x3D)\\plus\\char(0x26)\\plus\\char(0x27)\\plus\\\\quot\\SCT\\quot\\\\plus\\char(0x25)\\plus\\\\quot\\6r9\\quot\\//crlf////tab//return(\\quot\\sPass=\\quot\\\\plus\\sPass)//crlf//\\quot\\>//crlf////crlf//<include type:script; commands:\\quot\\//crlf////tab//s=execAgentAction(\\quot\\processVanEerdenInvoice\\quot\\)//crlf////tab//return(s)//crlf//\\quot\\>^
ID=498893|X=183|Y=219|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=189422|AgentChildNoNode=|AgentSensor=|AgentAction=downloadFromVanEerdenToServer|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=Result1|AgentNodeComment=Download invoices from Van Eerden|AgentNodeTermType=|^
ID=189422|X=183|Y=366|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=393802|AgentChildNoNode=|AgentSensor=|AgentAction=processVanEerdenInvoice|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=Result2|AgentNodeComment=Process invoices|AgentNodeTermType=|^
ID=393802|X=183|Y=500|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=263060|AgentChildNoNode=854781|AgentSensor=1|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=(startsWith(Result1//comma//~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~ok~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~)) and (startsWith(Result2//comma//~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~ok~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~))|AgentNodeActionReturnValue=|AgentNodeComment=Ok?|AgentNodeTermType=|^
ID=854781|X=373|Y=500|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~~~~backslash~~quot~~backslash~~~~backslash~~Download files: ~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~//plus//Result1//plus//getToken(~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~br~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~) //plus// ~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~Process files: ~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~//plus//Result2|AgentNodeActionReturnValue=|AgentNodeComment=Error|AgentNodeTermType=1|
</widget><widget name="Download Van Eerden - Store" group="Inventory" category="Invoice Downloads" description="Download invoices from earthlink at the store." type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Download Van Eerden - Store" modified="10-14-2024 20:35:14" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=04-04-2023 22:32:00:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=1 TaskMinutesBetweenExecution=0 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\\VanEerden\\quote\\,0,\\quote\\StoreID=\\quote\\+getToken(\\quote\\POSInterface_StoreID\\quote\\)))\\gt\\0)" TaskConditional_Expression_Description="Executes when Ven Eerden 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=32|toolboxy=297|aspectfuncx=100|aspectfuncy=100|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=false|aspectfuncVisible=false|PublishFtpFilename=Download Van Eerden - Store.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\\'707993')\\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\\'685747')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=707993|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_Download Van Eerden - Store.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 Van Eerden - Store.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Download Van Eerden - Store\\comma\\DownloadVanEerdenAtStore\\comma\\action_list\\comma\\Action=DownloadVanEerdenAtStore\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//DownloadVanEerdenAtStore//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\DownloadVanEerdenAtStore\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads Van Eerden invoices from Earthlink//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\\DownloadVanEerdenAtStore\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Download Van Eerden 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: TZoV0WSdnONz1q6SzOjLwBLO//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\\TZoV0WSdnONz1q6SzOjLwBLO\\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 Van Eerden 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\\vaneerden\\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\\vaneerden.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(endsWith(sFtpFilename\\comma\\\\quot\\_\\quot\\\\plus\\sEDICustomerNumber\\plus\\\\quot\\.csv\\quot\\))//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=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=685747|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=886612|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=never|^
ID=318848|X=183|Y=435|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=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 Van Eerden - Store\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Van Eerden - Store\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 04-04-2023 22:49:24//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 Van Eerden - Store\\comma\\AgentAction\\comma\\886612\\comma\\0\\comma\\DownloadVanEerdenAtStore//crlf////tab////tab//Result=execAgentAction(\\quot\\DownloadVanEerdenAtStore\\quot\\)//crlf////crlf////tab////tab////Ok?//crlf////tab////tab//if(startsWith(Result\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Van Eerden - Store\\comma\\AgentTerminate\\comma\\318848\\comma\\0\\comma\\Ok//crlf////tab////tab////tab//scriptSetResult(Result)//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Van Eerden - Store\\comma\\AgentTerminate\\comma\\143252\\comma\\1\\comma\\Fail//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;04042023//amp//nbsp;224924//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;Van//amp//nbsp;Eerden//amp//nbsp;-//amp//nbsp;Store\\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-04-2023//amp//nbsp;22:49:24</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\\DownloadVanEerdenAtStore\\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>(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>04042023 224924</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\\chart886612\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\113\\quot\\ style=\\quot\\width: 120px; height: 113px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Download Van Eerden - Store</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\\chart318848\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 394px; 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\\chart886612\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart353002\\quot\\ style=\\quot\\position: absolute; top: 178px; 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>DownloadVanEerdenAtStore<br></td></tr><tr><td><u>Return</u></td><td>Result</td></tr></tbody></table></div></div><div id=\\quot\\chart353002\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart318848\\quot\\ agentchildnonode=\\quot\\chart143252\\quot\\ style=\\quot\\position: absolute; top: 286px; 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\\chart143252\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 286px; 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>Fail<hr><span style=\\quot\\color:red\\quot\\>Fail</span></div></div>^
ID=886612|X=183|Y=219|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=353002|AgentChildNoNode=|AgentSensor=|AgentAction=DownloadVanEerdenAtStore|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=Result|AgentNodeComment=|AgentNodeTermType=|^
ID=353002|X=183|Y=327|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=318848|AgentChildNoNode=143252|AgentSensor=1|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=startsWith(Result//comma//\\quot\\ok\\quot\\)|AgentNodeActionReturnValue=|AgentNodeComment=Ok?|AgentNodeTermType=|^
ID=143252|X=373|Y=327|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=Fail|AgentNodeTermType=1|
</widget><widget name="Download Kuna Invoices" group="Inventory" category="Invoice Downloads" description="" type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Download Kuna Invoices" modified="04-12-2024 23:07:21" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=05-07-2023 20:20:00:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=1 TaskMinutesBetweenExecution=0 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\\Kuna\\quote\\,0,\\quote\\StoreID=\\quote\\+getToken(\\quote\\POSInterface_StoreID\\quote\\)))\\gt\\0)" TaskConditional_Expression_Description="Executes when Kuna 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=67|toolboxy=107|aspectfuncx=100|aspectfuncy=100|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=false|aspectfuncVisible=false|PublishFtpFilename=Download Kuna 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=740|H=660|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\\javascript:showTab(this\\comma\\'22016')\\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\\'171542')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=22016|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=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=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 Kuna 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 Kuna Invoices.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Download Kuna Invoices\\comma\\processKunaInvoice\\comma\\action_list\\comma\\Action=processKunaInvoice\\comma\\private//crlf////tab//Download Kuna Invoices\\comma\\downloadKunaInvoices\\comma\\action_list\\comma\\Action=downloadKunaInvoices\\comma\\private//crlf//</conditional>//crlf////crlf////crlf//[!------------------------------------------------------------------------//crlf//downloadKunaInvoices//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadKunaInvoices\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads Van Eerden invoices from Earthlink//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\\downloadKunaInvoices\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Download Kuna 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: TZoV0WSdnONz1q6SzOjLwBLO//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\\jMyUEiRuadQbaRFsylp72Bol\\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 Kuna 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\\Kuna\\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\\kuna.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\\~~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////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(endsWith(sFtpFilename\\comma\\\\quot\\_\\quot\\\\plus\\sEDICustomerNumber\\plus\\\\quot\\.txt\\quot\\))//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\\)\\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//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////crlf//[!------------------------------------------------------------------------//crlf//processKunaInvoice//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\processKunaInvoice\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Processes a Kuna 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\\processKunaInvoice\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab////tab//appendToLog(\\quot\\Input: __InputFilename__\\quot\\)//crlf////tab////tab////tab//appendToLog(\\quot\\Output: __OutputFilename__\\quot\\)//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//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*20190924*197256524*****DI~//crlf////tab////tab////tab////tab////tab//sInvoiceDate=getElement(sInput\\comma\\1\\comma\\\\quot\\*\\quot\\)//crlf////tab////tab////tab////tab////tab//sInvoiceNumber=getElement(sInput\\comma\\2\\comma\\\\quot\\*\\quot\\)//crlf////tab////tab////tab////tab////tab//bIsCredit=startsWith(trim(getElement(sInput\\comma\\7\\comma\\\\quot\\*\\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 Kuna 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//sLine=replaceSubstring(sLine\\comma\\\\quot\\*\\quot\\\\comma\\\\quot\\~~pipe~~\\quot\\)//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////tab////tab////tab////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//appendToLog(\\quot\\Wrote \\quot\\\\plus\\len(sFinalOutput)\\plus\\\\quot\\ bytes to output\\quot\\)//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=171542|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=484773|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=never|^
ID=953462|X=183|Y=469|W=119|H=47|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=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 Kuna Invoices\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Kuna Invoices\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 05-07-2023 20:49:22//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 Kuna Invoices\\comma\\AgentAction\\comma\\484773\\comma\\0\\comma\\Download Kuna Invoices//crlf////crlf////tab////tab////Download Kuna Invoices//crlf////tab////tab//result=execAgentAction(\\quot\\downloadKunaInvoices\\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 Kuna Invoices\\comma\\AgentTerminate\\comma\\953462\\comma\\0\\comma\\Ok//crlf////tab////tab////tab//scriptSetResult(Result)//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Kuna Invoices\\comma\\AgentTerminate\\comma\\216793\\comma\\1\\comma\\Error//crlf////tab////tab////tab//scriptSetResult(Result)//crlf////tab////tab//endif//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;05072023//amp//nbsp;204922//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;Kuna//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;05-07-2023//amp//nbsp;20:49:22</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;Kuna//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\\downloadKunaInvoices\\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=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>05072023 204922</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\\chart484773\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\113\\quot\\ style=\\quot\\width: 120px; height: 113px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Download Kuna 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\\chart953462\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 428px; 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\\chart484773\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart97557\\quot\\ style=\\quot\\position: absolute; top: 178px; 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 Kuna Invoices<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>downloadKunaInvoices<br></td></tr><tr><td><u>Return</u></td><td>result</td></tr></tbody></table></div></div><div id=\\quot\\chart97557\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart953462\\quot\\ agentchildnonode=\\quot\\chart216793\\quot\\ style=\\quot\\position: absolute; top: 312px; 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\\chart216793\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 312px; left: 190px; 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=484773|X=183|Y=219|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=97557|AgentChildNoNode=|AgentSensor=0|AgentAction=downloadKunaInvoices|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=result|AgentNodeComment=Download Kuna Invoices|AgentNodeTermType=|^
ID=97557|X=183|Y=353|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=953462|AgentChildNoNode=216793|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=216793|X=373|Y=353|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|^
ID=836309|X=650|Y=24|W=358|H=143|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=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:script; commands:\\quot\\//crlf////tab//sFilename1=\\quot\\C:\temp\2024-03\kuna\BWW3446-20240120141825.810\\quot\\//crlf////tab//sFilename2=\\quot\\C:\temp\2024-03\kuna\BWW3446-20240120141825_processed.810\\quot\\//crlf////tab//s=execAgentAction(\\quot\\processKunaInvoice\\quot\\\\comma\\\\quot\\InputFilename=\\quot\\+sFilename1+\\quot\\//amp//OutputFilename=\\quot\\+sFilename2)//crlf////tab//return(\\quot\\s=\\quot\\+s)//crlf//\\quot\\>//crlf//
</widget><widget name="Download Upper Lakes Food Invoice" group="Inventory" category="Invoice Downloads" description="" type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Download Upper Lakes Food Invoice" modified="03-17-2024 02:18:59" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=10-16-2023 15:04:00:000 TaskIntervalType=0 TaskLastExecuted= TaskCatchUpMissedTasks=false TaskYearsBetweenExecution=0 TaskMonthsBetweenExecution=0 TaskDaysBetweenExecution=0 TaskHoursBetweenExecution=1 TaskMinutesBetweenExecution=0 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\\ULFood\\quote\\,0,\\quote\\StoreID=\\quote\\+getToken(\\quote\\POSInterface_StoreID\\quote\\)))\\gt\\0)" TaskConditional_Expression_Description="Executes when UL Foods 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=48|toolboxy=127|aspectfuncx=100|aspectfuncy=100|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=false|aspectfuncVisible=false|PublishFtpFilename=Download Sygma 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\\'381754')\\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\\'718571')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=381754|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 Sygma 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=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 Upper Lakes Food Invoice.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Download Upper Lakes Food Invoice\\comma\\downloadjsch2\\comma\\action_list\\comma\\Action=downloadjsch2\\comma\\private//crlf////tab//Download Upper Lakes Food Invoice\\comma\\downloadULFoodInvoices\\comma\\action_list\\comma\\Action=downloadULFoodInvoices\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//downloadjsch2//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadjsch2\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads jsch library from earthlink//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\\downloadjsch\\quot\\; commands:\\quot\\//crlf////tab////tab////tab////get java home directory and extensions directory//crlf////tab////tab////tab//sJavaHome=getProperty(\\quot\\java.home\\quot\\)//crlf////tab////tab////tab//sExtDir=addDirSlash(sJavaHome)+\\quot\\lib/ext/\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Library directory: \\quot\\+sExtDir)//crlf////crlf////tab////tab////tab//sFilename=sExtDir+\\quot\\jsch-0.1.55.jar\\quot\\//crlf////tab////tab////tab//sFilename=replaceSubstring(sFilename\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\\\\quot\\)//crlf////tab////tab////tab//if(fileExists(sFilename))//crlf////tab////tab////tab////tab//return(\\quot\\Ok: Library already exists\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//sFtpFilename=\\quot\\http://www.aspect-software.net/Aspect7/libraries/jsch/jsch-0.1.55.jar\\quot\\//crlf////tab////tab////tab//s=fileGetContent(sFtpFilename)//crlf////tab////tab////tab//if(len(s)=0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: Could not download library: jsch-0.1.55.jar\\quot\\)//crlf////tab////tab////tab//endif//crlf////tab////tab////tab//appendToLog(\\quot\\Writing: \\quot\\+sFilename)//crlf////crlf////tab////tab////tab////save the file in aspect7 so it can be copied manually if needed//crlf////tab////tab////tab//sTempFilename=getToken(\\quot\\homedir\\quot\\)+\\quot\\jsch-0.1.55.jar\\quot\\//crlf////tab////tab////tab//s1=fileWriteContent(sTempFilename\\comma\\s)//crlf////tab////tab////tab//s2=fileCopy(sTempFilename\\comma\\sFilename)//crlf////tab////tab////tab//appendToLog(\\quot\\s1: \\quot\\+s1)//crlf////tab////tab////tab//appendToLog(\\quot\\s2: \\quot\\+s2)//crlf////crlf////tab////tab////tab//if(pos(\\quot\\denied\\quot\\\\comma\\s2)>0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: \\quot\\+s2)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//return(\\quot\\ok\\quot\\)//crlf////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//downloadULFoodInvoices//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadULFoodInvoices\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads any new invoices from the ULFood 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\\downloadULFoodInvoices\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Download ULFood Invoices (SFTP)\\quot\\)//crlf////crlf////tab////tab////tab////abort if POSInterface_StoreID if blank or equals Undefined//crlf////tab////tab////tab//b=boolean(getSystemValue(\\quot\\DevelopmentMode\\quot\\))//crlf////tab////tab////tab//if(not(b))//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//if((sStoreID=getToken(\\quot\\POSInterface_StoreID\\quot\\)) or (sStoreID=\\quot\\jMyUEiRuadQbaRFsylp72Bol\\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 ULFood 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\\ULFood\\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\\ftp2.ulfoods.com\\quot\\//crlf////tab////tab////tab////tab////tab////tab//sEDIUserName=\\quot\\aspectbww\\quot\\//crlf////tab////tab////tab////tab////tab////tab//sEDIPassword=\\quot\\R19Z1//pound//cHjPiL8\\quot\\//crlf////tab////tab////tab////tab////tab////tab//sEDICustomerNumber=driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Customer_Number\\quot\\\\comma\\r)//crlf////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\\+driverGetFieldAbsolute(dVendor\\comma\\\\quot\\EDI_Time_Last_Check\\quot\\\\comma\\r))//crlf////crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Downloading invoices for: \\quot\\+sStoreName+\\quot\\ Vendor: \\quot\\+sVendorName+\\quot\\ ID: \\quot\\+sVendorID)//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////get file list//crlf////tab////tab////tab////tab////tab////tab////tab//arFiles=sftpListFiles(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/aspect\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\arFiles=\\quot\\+arFiles)//crlf////tab////tab////tab////tab////tab////tab////tab//cFilesOnServer=getElementCount(arFiles\\comma\\char(0x3B))//crlf////tab////tab////tab////tab////tab////tab////tab////if(boolean(getSystemValue(\\quot\\DevelopmentMode\\quot\\)))//crlf////tab////tab////tab////tab////tab////tab////tab//////tab//cFilesOnServer=1//crlf////tab////tab////tab////tab////tab////tab////tab////endif//crlf////tab////tab////tab////tab////tab////tab////tab//if(cFilesOnServer=0)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\No files on server\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab//else//crlf////tab////tab////tab////tab////tab////tab////tab////tab////download the files//crlf////tab////tab////tab////tab////tab////tab////tab////tab//n=0//crlf////tab////tab////tab////tab////tab////tab////tab////tab//while(n<cFilesOnServer)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////get the filename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//sFtpFilename=getElement(arFiles\\comma\\n\\comma\\char(0x3B))//crlf////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//if(pos(\\quot\\_\\quot\\+sEDICustomerNumber+\\quot\\_\\quot\\\\comma\\sFtpFilename)>=0)//crlf////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//sLocalFilename=getToken(\\quot\\homedir\\quot\\)+\\quot\\invoices\\\quot\\+sFtpFilename//crlf////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//sLocalFilename=replaceSubstring(sLocalFilename\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalArchiveFilename=replaceSubstring(sLocalArchiveFilename\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\\\\quot\\)//crlf////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//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////see if the file already exists//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//bExists=false//crlf////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//bExists=true//crlf////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//bExists=true//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////crlf////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//if(not(bExists))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//b=sFtpGetFile(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/aspect\\quot\\\\comma\\sFtpFilename\\comma\\sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Retr \\quot\\+sFtpFilename+\\quot\\: \\quot\\+b)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(b)//crlf////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//iSize=fileSize(sLocalFilename)//crlf////crlf////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//if((bExist) and (iSize>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if((bExist) and (bEDIDelete))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//b=sftpDeleteFile(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/aspect\\quot\\\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Deleted /Outbound/\\quot\\+sFtpFilename+\\quot\\: \\quot\\+b)//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//cDownload++//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\\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//if(bExist)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////delete the local failed download which is 0 bytes//crlf////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//endif//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////crlf////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//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//else//crlf////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//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\\File already exists: \\quot\\+sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cSkipped++//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//n++//crlf////tab////tab////tab////tab////tab////tab////tab////tab//endwhile//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 ULFood 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 ULFood vendors found for any stores\\quot\\)//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//if(cCredentialError>0)//crlf////tab////tab////tab////tab//return(\\quot\\Error: Missing FTP credentials for \\quot\\+cCredentialError+\\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=718571|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=394915|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=never|AgentReportTo={AspectServerHashID}|^
ID=891151|X=183|Y=758|W=119|H=47|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 Upper Lakes Food Invoice\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Upper Lakes Food Invoice\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 03-17-2024 02:15:05//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 Upper Lakes Food Invoice\\comma\\AgentAction\\comma\\394915\\comma\\0\\comma\\Download jsch library//crlf////crlf////tab////tab////Download jsch library//crlf////tab////tab//Result=execAgentAction(\\quot\\downloadjsch2\\quot\\)//crlf////crlf////tab////tab////Does hsch library exist?//crlf////tab////tab//if(startsWith(Result\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Upper Lakes Food Invoice\\comma\\AgentAction\\comma\\451289\\comma\\0\\comma\\Download UL Food Invoices//crlf////crlf////tab////tab////tab////Download UL Food Invoices//crlf////tab////tab////tab//result=execAgentAction(\\quot\\downloadULFoodInvoices\\quot\\)//crlf////crlf////tab////tab////tab////Result Ok?//crlf////tab////tab////tab//if(startsWith(result\\comma\\\\quot\\ok\\quot\\))//crlf////tab////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Upper Lakes Food Invoice\\comma\\AgentTerminate\\comma\\891151\\comma\\0\\comma\\Ok//crlf////tab////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab////tab//else//crlf////tab////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Upper Lakes Food Invoice\\comma\\AgentTerminate\\comma\\164897\\comma\\1\\comma\\Error//crlf////tab////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab////tab//endif//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Upper Lakes Food Invoice\\comma\\AgentTerminate\\comma\\341484\\comma\\1\\comma\\Library does not exist//crlf////tab////tab////tab//scriptSetResult(\\quot\\Error: Unable to download jsch lirary\\quot\\)//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;03172024//amp//nbsp;021506//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;Upper//amp//nbsp;Lakes//amp//nbsp;Food//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-17-2024//amp//nbsp;02:15:05</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;jsch//amp//nbsp;library</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\\downloadjsch2\\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;//Does//amp//nbsp;hsch//amp//nbsp;library//amp//nbsp;exist?</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><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;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//Download//amp//nbsp;UL//amp//nbsp;Food//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;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;//amp//nbsp;result=<span class='keyword'>execAgentAction</span>(\\quot\\downloadULFoodInvoices\\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;//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;//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\\Error://amp//nbsp;Unable//amp//nbsp;to//amp//nbsp;download//amp//nbsp;jsch//amp//nbsp;lirary\\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=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>03172024 021506</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\\chart394915\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\139\\quot\\ style=\\quot\\width: 120px; height: 139px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Download Upper Lakes Food 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: {AspectServerHashID}<br>Name Params: </div></div><div id=\\quot\\chart891151\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 717px; 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\\chart394915\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart79311\\quot\\ style=\\quot\\position: absolute; top: 204px; 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 jsch library<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>downloadjsch2<br></td></tr><tr><td><u>Return</u></td><td>Result</td></tr></tbody></table></div></div><div id=\\quot\\chart79311\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart451289\\quot\\ agentchildnonode=\\quot\\chart341484\\quot\\ style=\\quot\\position: absolute; top: 338px; 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\\>Does hsch library exist?<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\\chart341484\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 338px; left: 190px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\97\\quot\\ style=\\quot\\width: 120px; height: 97px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentterminator\\quot\\>Terminate<br><hr>Library does not exist<hr><span style=\\quot\\color:red\\quot\\>Fail</span></div></div><div id=\\quot\\chart451289\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart295960\\quot\\ style=\\quot\\position: absolute; top: 454px; 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 UL Food Invoices<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>downloadULFoodInvoices<br></td></tr><tr><td><u>Return</u></td><td>result</td></tr></tbody></table></div></div><div id=\\quot\\chart295960\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart891151\\quot\\ agentchildnonode=\\quot\\chart164897\\quot\\ style=\\quot\\position: absolute; top: 601px; 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\\chart164897\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 601px; 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=394915|X=183|Y=245|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=79311|AgentChildNoNode=|AgentSensor=|AgentAction=downloadjsch2|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=Result|AgentNodeComment=Download jsch library|AgentNodeTermType=|^
ID=79311|X=183|Y=379|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=451289|AgentChildNoNode=341484|AgentSensor=1|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=startsWith(Result//comma//~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~ok~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~)|AgentNodeActionReturnValue=|AgentNodeComment=Does hsch library exist?|AgentNodeTermType=|^
ID=341484|X=373|Y=379|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~~~~backslash~~quot~~backslash~~~~backslash~~Error: Unable to download jsch lirary~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~|AgentNodeActionReturnValue=|AgentNodeComment=Library does not exist|AgentNodeTermType=1|^
ID=451289|X=183|Y=495|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=295960|AgentChildNoNode=|AgentSensor=0|AgentAction=downloadULFoodInvoices|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=result|AgentNodeComment=Download UL Food Invoices|AgentNodeTermType=|^
ID=295960|X=183|Y=642|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=891151|AgentChildNoNode=164897|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=164897|X=373|Y=642|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 Cheney Brothers Invoice" group="Inventory" category="Invoice Downloads" description="" type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Download Cheney Brothers Invoice" modified="06-13-2024 18:15:56" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=04-12-2024 15:05: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\\Cheney\\quote\\,0,\\quote\\StoreID=\\quote\\+getToken(\\quote\\POSInterface_StoreID\\quote\\)))\\gt\\0)" TaskConditional_Expression_Description="Executes when 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=46|toolboxy=244|aspectfuncx=100|aspectfuncy=100|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=false|aspectfuncVisible=false|PublishFtpFilename=Download Cheney Brothers 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=1152|H=765|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\\javascript:showTab(this\\comma\\'932220')\\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\\'475406')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=932220|X=300|Y=126|W=1152|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=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 Cheney Brothers 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 Cheney Brothers Invoice.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Download Cheney Brothers Invoice\\comma\\downloadCheneyBrothersInvoice\\comma\\action_list\\comma\\Action=downloadCheneyBrothersInvoice\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//downloadCheneyBrothersInvoice//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadCheneyBrothersInvoice\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads Cheney Brothers 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~~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\\downloadCheneyBrothersInvoice\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Download Cheney Brothers 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////JR\\apos\\s Loghouse: e4Fgt4EsFazvS6U0IbpUbp3P//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\\jMyUEiRuadQbaRFsylp72Bol\\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 Cheney Brothers 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\\cheney\\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\\cheneybros.aspect-software.net\\quot\\//crlf////tab////tab////tab////tab////tab////tab//sEDIPassword=\\quot\\skI_987bVA\\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\\~~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\\EDIFtpSite: \\quot\\\\plus\\sEDIFtpSite\\plus\\\\quot\\ EDIUserName: \\quot\\\\plus\\sEDIUserName\\plus\\\\quot\\ EDIPassword: \\quot\\\\plus\\sEDIPassword)//crlf////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Connect to \\quot\\\\plus\\sEDIFtpSite\\plus\\\\quot\\: \\quot\\\\plus\\s)//crlf////tab////tab////tab////tab////tab////tab////tab////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////fileWriteContent(\\quot\\C:~~backslash~~temp~~backslash~~2024-04~~backslash~~seagrass~~backslash~~arfiles.txt\\quot\\\\comma\\arFiles)//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////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(pos(sEDICustomerNumber\\comma\\sFtpFilename)>=0)//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=addDirSlash(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\invoices\\quot\\)\\plus\\sFtpFilename//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLocalArchiveFilename=addDirSlash(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\invoices\\quot\\)\\plus\\\\quot\\archive\\quot\\\\plus\\char(0x5C)\\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////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////process the file//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sContent=fileGetContent(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sContent=replaceSubstring(sContent\\comma\\char(13)\\comma\\\\quot\\\\quot\\)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sInvoiceNumber=trim(getElement(getElement(sContent\\comma\\1\\comma\\char(10))\\comma\\1))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sInvoiceDate=trim(getElement(getElement(sContent\\comma\\2\\comma\\char(10))\\comma\\1))//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sNewContent=getElement(sContent\\comma\\5\\comma\\char(10))\\plus\\\\quot\\\\comma\\Invoice Number\\comma\\Invoice Date\\quot\\\\plus\\char(13)\\plus\\char(10)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//cContent=getElementCount(sContent\\comma\\char(10))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//nContent=6//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//while(nContent<cContent)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sLine=getElement(sContent\\comma\\nContent\\comma\\char(10))//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//if(getElementCount(sLine)>5)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//sNewContent=sNewContent\\plus\\sLine\\plus\\\\quot\\\\comma\\\\quot\\\\plus\\sInvoiceNumber\\plus\\\\quot\\\\comma\\\\quot\\\\plus\\sInvoiceDate\\plus\\char(13)\\plus\\char(10)//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////tab//nContent\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//endwhile//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab////tab//fileWriteContent(sLocalFilename\\comma\\sNewContent)//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(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 Cheney Brothers 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 Cheney Brothers 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=475406|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=371800|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=never|^
ID=949874|X=183|Y=456|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 Cheney Brothers Invoice\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Cheney Brothers Invoice\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 04-12-2024 23:02: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_Download Cheney Brothers Invoice\\comma\\AgentAction\\comma\\371800\\comma\\0\\comma\\downloadCheneyBrothersInvoice//crlf////tab////tab//Result=execAgentAction(\\quot\\downloadCheneyBrothersInvoice\\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 Cheney Brothers Invoice\\comma\\AgentTerminate\\comma\\949874\\comma\\0\\comma\\Ok//crlf////tab////tab////tab//scriptSetResult(result)//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Cheney Brothers Invoice\\comma\\AgentTerminate\\comma\\629371\\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;04122024//amp//nbsp;230221//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;Cheney//amp//nbsp;Brothers//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;04-12-2024//amp//nbsp;23:02: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;Result=<span class='keyword'>execAgentAction</span>(\\quot\\downloadCheneyBrothersInvoice\\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>04122024 230221</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\\chart371800\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\113\\quot\\ style=\\quot\\width: 120px; height: 113px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Download Cheney Brothers 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\\chart949874\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 415px; 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\\chart371800\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart260353\\quot\\ style=\\quot\\position: absolute; top: 191px; 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>downloadCheneyBrothersInvoice<br></td></tr><tr><td><u>Return</u></td><td></td></tr></tbody></table></div></div><div id=\\quot\\chart260353\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart949874\\quot\\ agentchildnonode=\\quot\\chart629371\\quot\\ style=\\quot\\position: absolute; top: 299px; 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\\chart629371\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 299px; 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=371800|X=183|Y=232|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=260353|AgentChildNoNode=|AgentSensor=|AgentAction=downloadCheneyBrothersInvoice|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=Result|AgentNodeComment=|AgentNodeTermType=|^
ID=260353|X=183|Y=340|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=949874|AgentChildNoNode=629371|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=629371|X=373|Y=340|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 Cash WA Distributing Invoices" group="Inventory" category="Invoice Downloads" description="" type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Download Cash Wa Distributing Invoices" modified="05-29-2024 22:24:04" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=05-29-2024 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\\CashWa\\quote\\,0,\\quote\\StoreID=\\quote\\+getToken(\\quote\\POSInterface_StoreID\\quote\\)))\\gt\\0)" TaskConditional_Expression_Description="" 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="" TaskWidgetParams="" TaskWindowForExecution=0>
Preferences|toolboxx=58|toolboxy=271|aspectfuncx=100|aspectfuncy=100|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=false|aspectfuncVisible=false|PublishFtpFilename=Download Cash WA Distributing 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=101|H=14|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\\javascript:showTab(this\\comma\\'656153')\\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\\'67725')\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=656153|X=300|Y=125|W=1027|H=695|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=1027|H=695|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=1027|H=695|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 Cash WA Distributing 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=1027|H=695|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 Cash WA Distributing Invoices.html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Download Cash WA Distributing Invoices\\comma\\DownloadCashWAInvoice\\comma\\action_list\\comma\\Action=DownloadCashWAInvoice\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//DownloadCashWAInvoice//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\DownloadCashWAInvoice\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads invoices from Cash WA Distributing.  Right now\\comma\\ BWW Rapid City is the only store//crlf////tab////tab//and all invoices are downloaded//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\\DownloadCashWAInvoice\\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////Aloha Steakhouse - jMyUEiRuadQbaRFsylp72Bol//crlf////tab////tab////tab////tab//if((sStoreID=getToken(\\quot\\POSInterface_StoreID\\quot\\)) or (sStoreID=\\quot\\jMyUEiRuadQbaRFsylp72Bol\\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\\CashWa\\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\\\\\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////no need to change directory//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////tab////tab////tab////tab////tab////tab////tab////tab//s=\\quot\\ok\\quot\\//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\\\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////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//^
ID=debug_console|X=300|Y=125|W=1027|H=695|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=67725|X=300|Y=125|W=1027|H=695|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=307911|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=never|^
ID=155675|X=183|Y=450|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_Download Cash WA Distributing Invoices\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Cash WA Distributing Invoices\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 05-29-2024 15:17:14//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 Cash WA Distributing Invoices\\comma\\AgentAction\\comma\\307911\\comma\\0\\comma\\DownloadCashWAInvoice//crlf////tab////tab//Result=execAgentAction(\\quot\\DownloadCashWAInvoice\\quot\\)//crlf////crlf////tab////tab////Success?//crlf////tab////tab//if(startsWith(Result\\comma\\\\quot\\Ok\\quot\\))//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Cash WA Distributing Invoices\\comma\\AgentTerminate\\comma\\155675\\comma\\0\\comma\\Ok//crlf////tab////tab////tab//scriptSetResult(Result)//crlf////tab////tab//else//crlf////tab////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Download Cash WA Distributing Invoices\\comma\\AgentTerminate\\comma\\844890\\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;05292024//amp//nbsp;151714//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;Cash//amp//nbsp;WA//amp//nbsp;Distributing//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;05-29-2024//amp//nbsp;15:17:14</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\\DownloadCashWAInvoice\\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;//Success?</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>05292024 151714</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\\chart307911\\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>Download Cash WA Distributing 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\\chart155675\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 410px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\83\\quot\\ style=\\quot\\width: 120px; height: 83px; 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\\chart307911\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart637509\\quot\\ style=\\quot\\position: absolute; top: 188px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\55\\quot\\ style=\\quot\\width: 150px; height: 55px; 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>DownloadCashWAInvoice<br></td></tr><tr><td><u>Return</u></td><td>Result</td></tr></tbody></table></div></div><div id=\\quot\\chart637509\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentDecision\\quot\\ agentchildyesnode=\\quot\\chart155675\\quot\\ agentchildnonode=\\quot\\chart844890\\quot\\ style=\\quot\\position: absolute; top: 295px; left: 0px; width: 150px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\63\\quot\\ style=\\quot\\width: 150px; height: 63px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentdecision\\quot\\>Success<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\\chart844890\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 295px; left: 190px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\83\\quot\\ style=\\quot\\width: 120px; height: 83px; 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=307911|X=183|Y=228|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=637509|AgentChildNoNode=|AgentSensor=|AgentAction=DownloadCashWAInvoice|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=Result|AgentNodeComment=|AgentNodeTermType=|^
ID=637509|X=183|Y=335|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=155675|AgentChildNoNode=844890|AgentSensor=1|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=startsWith(Result//comma//\\quot\\Ok\\quot\\)|AgentNodeActionReturnValue=Result|AgentNodeComment=Success?|AgentNodeTermType=|^
ID=844890|X=373|Y=335|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="Sygma (Server and Store)" group="Inventory" category="EDI" description="Downloads invoices to the server and calls action at each store to distribute the invoices." type="Container" Mobile="false" Processing=0 metadata="" IncludeInViewer="false" PublicName="Sygma (Server And Store)" modified="06-27-2024 23:22:55" modifiedby="Thnikpad3" TaskEnabled=true IsAgent=true ContainsAgentSensors=false ContainsAgentActions=true TaskInitialStartTime=06-27-2024 18: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()) and (hour(now())\\lt\\20) and (hour(now())\\gt\\6)" TaskConditional_Expression_Description="" TaskState_Function="" TaskState_Expression_Description="" TaskWidgetParams="" TaskWindowForExecution=0>
Preferences|toolboxx=45|toolboxy=454|aspectfuncx=50|aspectfuncy=50|aspectfuncw=750|aspectfunch=auto|aspectfuncLock=null|aspectfuncVisible=false|PublishFtpFilename=Sygma (Server and Store).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=101|H=14|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=1133|H=771|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=Transparent|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\\javascript:showTab(this\\comma\\\\apos\\553797\\apos\\)\\quot\\>Javascript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\\\apos\\AspectScript\\apos\\)\\quot\\>AspectScript</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\\\apos\\sensor_list\\apos\\)\\quot\\>Sensors</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\\\apos\\action_list\\apos\\)\\quot\\>Actions</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\\\apos\\debug_console\\apos\\)\\quot\\>Console</span></td>//crlf////tab////tab//<td><span onClick=\\quot\\javascript:showTab(this\\comma\\\\apos\\788073\\apos\\)\\quot\\>Notes</span></td>//crlf////tab//</tr>//crlf//</table>^
ID=553797|X=300|Y=126|W=1133|H=771|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=1133|H=771|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=1133|H=771|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_Sygma (Server and Store).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=1133|H=771|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_Sygma (Server and Store).html\\quot\\)\\comma\\\\quot\\\\quot\\)}//crlf//</state>//crlf////crlf//<conditional expression:(\\quot\\__action_list__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab//Sygma (Server and Store)\\comma\\downloadSygmaInvoicesToServer\\comma\\action_list\\comma\\Action=downloadSygmaInvoicesToServer\\comma\\private//crlf////tab//Sygma (Server and Store)\\comma\\distrubuteSygmaInvoices\\comma\\action_list\\comma\\Action=distrubuteSygmaInvoices\\comma\\private//crlf////tab//Sygma (Server and Store)\\comma\\requestSygmaInvoicesFromServer\\comma\\action_list\\comma\\Action=requestSygmaInvoicesFromServer\\comma\\private//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//downloadSygmaInvoicesToServer//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\downloadSygmaInvoicesToServer\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Downloads invoices to the server from Sygma.  Invoices are downloaded to c:~~backslash~~aspect7~~backslash~~sygma~~backslash~~pending//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\\downloadSygmaInvoicesToServer\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Download Sygma Invoices\\quot\\)//crlf////crlf////tab////tab////tab////make directories//crlf////tab////tab////tab//if(not(fileExists(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\sygma\\quot\\)))//crlf////tab////tab////tab////tab//fileMakeDirectory(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\sygma\\quot\\)//crlf////tab////tab////tab////tab//fileMakeDirectory(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\sygma~~backslash~~pending\\quot\\)//crlf////tab////tab////tab////tab//fileMakeDirectory(getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\sygma~~backslash~~archive\\quot\\)//crlf////tab////tab////tab//endif//crlf////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////crlf////tab////tab////tab//sEDIFtpSite=\\quot\\b2b.sysco.com\\quot\\//crlf////tab////tab////tab//sEDIUserName=\\quot\\BWWJonesGroup\\quot\\//crlf////tab////tab////tab//sEDIPassword=\\quot\\jon3b4v9\\percent\\3\\quot\\//crlf////crlf////tab////tab////tab//arFiles=sftpListFiles(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/Outbound\\quot\\)//crlf////tab////tab////tab//appendToLog(\\quot\\arFiles=\\quot\\\\plus\\arFiles)//crlf////tab////tab////tab//cFilesOnServer=getElementCount(arFiles\\comma\\char(0x3B))//crlf////tab////tab////tab//if(cFilesOnServer=0)//crlf////tab////tab////tab////tab//appendToLog(\\quot\\No files on server\\quot\\)//crlf////tab////tab////tab//else//crlf////tab////tab////tab////tab////download the files//crlf////tab////tab////tab////tab//n=0//crlf////tab////tab////tab////tab//while(n<cFilesOnServer)//crlf////tab////tab////tab////tab////tab////get the filename//crlf////tab////tab////tab////tab////tab//sFtpFilename=getElement(arFiles\\comma\\n\\comma\\char(0x3B))//crlf////tab////tab////tab////tab////tab//appendToLog(\\quot\\sFtpFilename=\\quot\\\\plus\\sFtpFilename)//crlf////crlf////tab////tab////tab////tab////tab////get the local filename and archived filename//crlf////tab////tab////tab////tab////tab//sLocalFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\sygma~~backslash~~pending~~backslash~~\\quot\\\\plus\\sFtpFilename//crlf////tab////tab////tab////tab////tab//sLocalFilename=replaceSubstring(sLocalFilename\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\~~backslash~~\\quot\\)//crlf////tab////tab////tab////tab////tab//sLocalArchiveFilename=getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\sygma~~backslash~~archive~~backslash~~\\quot\\\\plus\\sFtpFilename//crlf////tab////tab////tab////tab////tab//sLocalArchiveFilename=replaceSubstring(sLocalArchiveFilename\\comma\\\\quot\\/\\quot\\\\comma\\\\quot\\~~backslash~~\\quot\\)//crlf////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//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////see if the file already exists//crlf////tab////tab////tab////tab////tab//bExists=false//crlf////tab////tab////tab////tab////tab//if((fileExists(sLocalFilename)) and (fileSize(sLocalFilename)>0))//crlf////tab////tab////tab////tab////tab////tab//bExists=true//crlf////tab////tab////tab////tab////tab//elseif((fileExists(sLocalArchiveFilename)) and (fileSize(sLocalArchiveFilename)>0))//crlf////tab////tab////tab////tab////tab////tab//bExists=true//crlf////tab////tab////tab////tab////tab//endif//crlf////crlf////tab////tab////tab////tab////tab////download the file if it doesn\\apos\\t already exist//crlf////tab////tab////tab////tab////tab//if(not(bExists))//crlf////tab////tab////tab////tab////tab////tab//b=sFtpGetFile(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/Outbound\\quot\\\\comma\\sFtpFilename\\comma\\sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Retr \\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\b)//crlf////tab////tab////tab////tab////tab////tab//if(b)//crlf////tab////tab////tab////tab////tab////tab////tab//bExist=fileExists(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab//iSize=fileSize(sLocalFilename)//crlf////crlf////tab////tab////tab////tab////tab////tab////tab////delete the file from the ftp server//crlf////tab////tab////tab////tab////tab////tab////tab//if((bExist) and (iSize>0))//crlf////tab////tab////tab////tab////tab////tab////tab////tab//if(bExist)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//b=sftpDeleteFile(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/Outbound\\quot\\\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Deleted /Outbound/\\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\b)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab//cDownload\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab////tab////tab//else//crlf////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//if(bExist)//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab////delete the local failed download which is 0 bytes//crlf////tab////tab////tab////tab////tab////tab////tab////tab////tab//fileDelete(sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab////tab////tab////tab//cError\\plus\\\\plus\\//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//cError\\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\\File already exists: \\quot\\\\plus\\sLocalFilename)//crlf////tab////tab////tab////tab////tab////tab//b=sftpDeleteFile(sEDIFtpSite\\comma\\sEDIUserName\\comma\\sEDIPassword\\comma\\\\quot\\/Outbound\\quot\\\\comma\\sFtpFilename)//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Deleted /Outbound/\\quot\\\\plus\\sFtpFilename\\plus\\\\quot\\: \\quot\\\\plus\\b)//crlf////tab////tab////tab////tab////tab////tab//cSkipped\\plus\\\\plus\\//crlf////tab////tab////tab////tab////tab//endif//crlf////tab////tab////tab////tab////tab//n\\plus\\\\plus\\//crlf////tab////tab////tab////tab//endwhile//crlf////tab////tab////tab//endif//crlf////tab////tab////tab////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////tab////tab//\\quot\\>//crlf////tab//</conditional>//crlf//</conditional>//crlf////crlf//[!------------------------------------------------------------------------//crlf//distrubuteSygmaInvoices//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\distrubuteSygmaInvoices\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Sends a notification to all stores with sygma invoices in the c:~~backslash~~aspect7~~backslash~~sygma~~backslash~~pending directory//crlf////tab////tab//The notification consists of an argument named files in the format://crlf////tab////tab//files=filename1$size1~~pipe~~filename2$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\\distrubuteSygmaInvoices\\quot\\; commands:\\quot\\//crlf////tab////tab////tab//appendToLog(\\quot\\Send Sygma notifications started\\quot\\)//crlf////tab////tab////tab//tStart=now()//crlf////crlf////tab////tab////tab////open the driver used to list Sygma invoices//crlf////tab////tab////tab//sDriverName=getSalt(6)//crlf////tab////tab////tab//sDriverParams=\\quot\\filespec=\\quot\\\\plus\\getToken(\\quot\\homedir\\quot\\)\\plus\\\\quot\\sygma/pending/*.txt\\quot\\//crlf////tab////tab////tab//sDriverParams=sDriverParams\\plus\\\\quot\\~~pipe~~DriverID=Aspect_Support_Sygma_Invoice_Dir_List~~pipe~~recurse=false~~pipe~~DriverName=\\quot\\\\plus\\sDriverName//crlf////tab////tab////tab//driverOpen(Aspect_Support_Sygma_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\\) or (sLastHashID=\\quot\\4idczse69\\quot\\))//crlf////crlf////tab////tab////tab////tab////tab////tab////tab//if((_getAllowAccess(sLastHashID)) or (sLastHashID=\\quot\\4idczse69\\quot\\))//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 Sygma 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=Sygma (Server and Store)\\amp\\ContainerItemID=action_list\\amp\\Action=requestSygmaInvoicesFromServer\\amp\\ActionExec=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//s=execAgentAction(\\quot\\requestSygmaInvoicesFromServer\\quot\\\\comma\\\\quot\\FileList=\\quot\\\\plus\\arFiles\\comma\\sLastHashID)//crlf////tab////tab////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Result: \\quot\\\\plus\\s)//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 Sygma 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 Sygma 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\\$\\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\\) or (sLastHashID=\\quot\\4idczse69\\quot\\))//crlf////tab////tab////tab////tab////tab//if((_getAllowAccess(sLastHashID)) or (sLastHashID=\\quot\\4idczse69\\quot\\))//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 Sygma 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 Sygma 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//s=execAgentAction(\\quot\\requestSygmaInvoicesFromServer\\quot\\\\comma\\\\quot\\FileList=\\quot\\\\plus\\arFiles\\comma\\sLastHashID)//crlf////tab////tab////tab////tab////tab////tab//appendToLog(\\quot\\Result: \\quot\\\\plus\\s)//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 Sygma 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 Sygma 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\\homedir\\quot\\)\\plus\\\\quot\\sygma~~backslash~~archive~~backslash~~\\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//[!------------------------------------------------------------------------//crlf//requestSygmaInvoicesFromServer//crlf//--------------------------------------------------------------------------]//crlf//<conditional expression:(\\quot\\__Action__\\quot\\=\\quot\\requestSygmaInvoicesFromServer\\quot\\)>//crlf////tab//<conditional expression:(\\quot\\__ActionDescription__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//Makes a request to the server for specific files.  This action is invoked by the server in the//crlf////tab////tab//distrubuteSygmaInvoices action.//crlf////tab//</conditional>//crlf////tab//<conditional expression:(\\quot\\__ActionParams__\\quot\\=\\quot\\true\\quot\\)>//crlf////tab////tab//FileList - List of files in the form filename$size~~pipe~~filename$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\\requestSygmaInvoicesFromServer\\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//appendToLog(\\quot\\Filelist=__FileList__\\quot\\)//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////use local IP for testing//crlf////tab////tab////tab//sServerIP=getToken(\\quot\\aspectserverip1a\\quot\\)//crlf////tab////tab////tab//if(getToken(\\quot\\AspectHashID\\quot\\)=\\quot\\4idczse69\\quot\\)//crlf////tab////tab////tab////tab//sServerIP=\\quot\\127.0.0.1\\quot\\//crlf////tab////tab////tab//endif//crlf////crlf////tab////tab////tab//cReceived=0//crlf////tab////tab////tab//cSkipped=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\\$\\quot\\)//crlf////tab////tab////tab////tab//iSize=value(getElement(s\\comma\\1\\comma\\\\quot\\$\\quot\\))//crlf////tab////tab////tab////tab//appendToLog(\\quot\\s=\\quot\\\\plus\\s)//crlf////tab////tab////tab////tab//appendToLog(\\quot\\sFilename=\\quot\\\\plus\\sFilename)//crlf////tab////tab////tab////tab//appendToLog(\\quot\\iSize=\\quot\\\\plus\\iSize)//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=getSygmaInvoice\\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=getSygmaInvoice\\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=confirmSygmaInvoice\\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=confirmSygmaInvoice\\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////tab//cSkipped\\plus\\\\plus\\//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\\ Skipped: \\quot\\\\plus\\cSkipped\\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//^
ID=debug_console|X=300|Y=126|W=1133|H=771|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=788073|X=300|Y=126|W=1133|H=771|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=284248|AgentChildNoNode=|AgentSensor=|AgentAction=|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=|AgentNodeComment=|AgentNodeTermType=|AgentSuspended=false|AgentDebug=false|AgentReport=always|^
ID=34791|X=183|Y=487|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=Result1~~backslash~~~~backslash~~plus~~backslash~~~~backslash~~getToken(~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~br~~backslash~~~~backslash~~quot~~backslash~~~~backslash~~)~~backslash~~~~backslash~~plus~~backslash~~~~backslash~~Result2|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_Sygma (Server and Store)\\quot\\; commands:\\quot\\//crlf////crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Sygma (Server and Store)\\comma\\AgentStart\\comma\\AgentStart\\comma\\0\\comma\\//crlf////tab////tab////Created 06-27-2024 22:11:21//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_Sygma (Server and Store)\\comma\\AgentAction\\comma\\284248\\comma\\0\\comma\\Download Invoices//crlf////crlf////tab////tab////Download Invoices//crlf////tab////tab//Result1=execAgentAction(\\quot\\downloadSygmaInvoicesToServer\\quot\\)//crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Sygma (Server and Store)\\comma\\AgentAction\\comma\\781703\\comma\\0\\comma\\Distribute invoices//crlf////crlf////tab////tab////Distribute invoices//crlf////tab////tab//Result2=execAgentAction(\\quot\\distrubuteSygmaInvoices\\quot\\)//crlf////tab////tab//::node\\comma\\L4HxWEciR8sT7E30IKVZXD70_Sygma (Server and Store)\\comma\\AgentTerminate\\comma\\34791\\comma\\0\\comma\\Ok//crlf////tab////tab//agentReportStatus(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Sygma (Server and Store)\\quot\\\\comma\\\\quot\\34791\\quot\\\\comma\\0\\comma\\getToken(\\quot\\AspectHashID\\quot\\)\\comma\\\\quot\\Ok\\quot\\\\comma\\Result1\\plus\\getToken(\\quot\\br\\quot\\)\\plus\\Result2\\comma\\bForceReport\\comma\\now()-tAgentStart))//crlf////tab////tab//scriptSetResult(Result1\\plus\\getToken(\\quot\\br\\quot\\)\\plus\\Result2)//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;06272024//amp//nbsp;221121//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_Sygma//amp//nbsp;(Server//amp//nbsp;and//amp//nbsp;Store)\\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;06-27-2024//amp//nbsp;22:11: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;(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><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;Result1=<span class='keyword'>execAgentAction</span>(\\quot\\downloadSygmaInvoicesToServer\\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;//Distribute//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;Result2=<span class='keyword'>execAgentAction</span>(\\quot\\distrubuteSygmaInvoices\\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'>agentReportStatus</span>(\\quot\\L4HxWEciR8sT7E30IKVZXD70_Sygma//amp//nbsp;(Server//amp//nbsp;and//amp//nbsp;Store)\\quot\\\\comma\\\\quot\\34791\\quot\\\\comma\\0\\comma\\<span class='keyword'>getToken</span>(\\quot\\AspectHashID\\quot\\)\\comma\\\\quot\\Ok\\quot\\\\comma\\Result1\\plus\\<span class='keyword'>getToken</span>(\\quot\\br\\quot\\)\\plus\\Result2\\comma\\bForceReport\\comma\\<span class='keyword'>now</span>()-tAgentStart))<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>(Result1\\plus\\<span class='keyword'>getToken</span>(\\quot\\br\\quot\\)\\plus\\Result2)<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=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 type:expression; expression:htmlConstant(\\quot\\salt\\quot\\\\comma\\\\quot\\__\\quot\\\\comma\\lowercase(getSalt(4)))>//crlf////crlf////crlf//<!include type:driver;//crlf////tab//ver: \\quot\\1.0\\quot\\;//crlf////tab//title: \\quot\\\\quot\\;//crlf////tab//ID: \\quot\\\\quot\\;//crlf////tab//HashID: \\quot\\\\quot\\;//crlf////tab//driver: \\quot\\ASPECT_SUPPORT_SYGMA_INVOICE_DIR_LIST\\quot\\;//crlf////tab//name: \\quot\\\\quot\\;//crlf////tab//systemdriver: \\quot\\false\\quot\\;//crlf////tab//dispose: \\quot\\false\\quot\\;//crlf////tab//state: \\quot\\\\quot\\;//crlf////tab//params: \\quot\\keyexpression=HashID~~pipe~~CacheTtl=0~~pipe~~filespec=c:~~backslash~~aspect7~~backslash~~sygma~~backslash~~pending~~backslash~~*.txt~~pipe~~DriverID=Aspect_Support_Sygma_Invoice_Dir_List~~pipe~~recurse=false~~pipe~~DriverName=__salt__~~pipe~~Metadata=ASPECT_SUPPORT_SYGMA_INVOICE_DIR_LIST\\quot\\;//crlf////tab//keyDescription: \\quot\\\\quot\\;//crlf////tab//display: \\quot\\\\quot\\;//crlf////tab//fields: \\quot\\\\quot\\;//crlf////tab//IncludeFields: \\quot\\\\quot\\;//crlf////tab//ExcludeFields: \\quot\\\\quot\\;//crlf////tab//sort: \\quot\\ID\\quot\\;//crlf////tab//filter: \\quot\\true\\quot\\;//crlf////tab//BaseFilter: \\quot\\\\quot\\;//crlf////tab//class: \\quot\\basic1\\quot\\;//crlf////tab//maxrecords: \\quot\\250\\quot\\;//crlf////tab//startrecord: \\quot\\0\\quot\\;//crlf////tab//style: \\quot\\width:auto\\quot\\;//crlf////tab//_style: \\quot\\float:left;width:100\\percent\\\\quot\\;//crlf////tab//height:\\quot\\auto\\quot\\;//crlf////tab//_maxheight:\\quot\\300px\\quot\\;//crlf////tab//canSelect: \\quot\\false\\quot\\;//crlf////tab//readOnly: \\quot\\false\\quot\\;//crlf////tab//canEdit: \\quot\\false\\quot\\;//crlf////tab//canAdd: \\quot\\false\\quot\\;//crlf////tab//canDelete: \\quot\\false\\quot\\;//crlf////tab//inspectMenu: \\quot\\\\quot\\;//crlf////tab//EmbedValues: \\quot\\\\quot\\;//crlf////tab//EditDialogID: \\quot\\ASPECT_SUPPORT_SYGMA_INVOICE_DIR_LISTDialog\\quot\\;//crlf////tab//DialogHeader: \\quot\\false\\quot\\;//crlf////tab//canCloseDialog: \\quot\\true\\quot\\;//crlf////tab//ExternalParams: \\quot\\\\quot\\;//crlf////tab//ExternalFilters: \\quot\\\\quot\\;//crlf////tab//TableControls: \\quot\\true\\quot\\;//crlf////tab//TableHeader: \\quot\\true\\quot\\;//crlf////tab//TableBorder: \\quot\\true\\quot\\;//crlf////tab//RecordCount: \\quot\\true\\quot\\;//crlf////tab//Timestamp: \\quot\\true\\quot\\;//crlf////tab//SelectDisplay: \\quot\\true\\quot\\;//crlf////tab//EditDisplay: \\quot\\true\\quot\\;//crlf////tab//Menu: \\quot\\\\quot\\;//crlf////tab//faq: \\quot\\\\quot\\;//crlf////tab//procedure: \\quot\\\\quot\\;//crlf////tab//video: \\quot\\\\quot\\;//crlf////tab//Messages: \\quot\\true\\quot\\;//crlf////tab//ChartType: \\quot\\\\quot\\;//crlf////tab//ChartWidth: \\quot\\640\\quot\\;//crlf////tab//ChartHeight: \\quot\\480\\quot\\;//crlf////tab//ChartLabels: \\quot\\Down_45\\quot\\;//crlf////tab//ChartTitle: \\quot\\\\quot\\;//crlf////tab//ChartStyle: \\quot\\display:none\\quot\\;//crlf////tab//RefreshInterval: \\quot\\0\\quot\\;//crlf////tab//RefreshWhenHidden: \\quot\\true\\quot\\;//crlf////tab//RefreshIntervalRemote: \\quot\\0\\quot\\;//crlf////tab//RefreshWhenHiddenRemote: \\quot\\true\\quot\\;//crlf////tab//_Javascript: \\quot\\DocumentID~~pipe~~Widget~~pipe~~ContainerItemID~~pipe~~Params\\quot\\;//crlf////tab//debug: \\quot\\false\\quot\\;//crlf//>^
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>06272024 221121</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\\chart284248\\quot\\ style=\\quot\\position: absolute; top: 0px; left: 0px; width: 120px; height: auto; display: block;\\quot\\><canvas width=\\quot\\120\\quot\\ height=\\quot\\126\\quot\\ style=\\quot\\width: 120px; height: 126px; position: absolute; top: 0px; left: 0px;\\quot\\></canvas><div class=\\quot\\agentstart\\quot\\><b>Sygma (Server and Store)</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\\chart34791\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentTerminate\\quot\\ style=\\quot\\position: absolute; top: 446px; 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\\chart284248\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart781703\\quot\\ style=\\quot\\position: absolute; top: 178px; 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>distrubuteSygmaInvoices<br></td></tr><tr><td><u>Return</u></td><td>Result1</td></tr></tbody></table></div></div><div id=\\quot\\chart781703\\quot\\ isagentdoc=\\quot\\true\\quot\\ content_type=\\quot\\AgentAction\\quot\\ agentchildyesnode=\\quot\\chart34791\\quot\\ style=\\quot\\position: absolute; top: 312px; 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\\>Distribute invoices<hr><table tabsinitialized=\\quot\\true\\quot\\><tbody><tr><td><u>Action</u></td><td>distrubuteSygmaInvoices<br></td></tr><tr><td><u>Return</u></td><td>Result2</td></tr></tbody></table></div></div>^
ID=298449|X=1203|Y=140|W=468|H=247|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=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=<br><br>//crlf//<h1>Testing</h1>//crlf//<include type:script; commands:\\quot\\//crlf////tab////s=execAgentAction(\\quot\\downloadSygmaInvoicesToServer\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab////s=execAgentAction(\\quot\\distrubuteSygmaInvoices\\quot\\\\comma\\\\quot\\\\quot\\)//crlf////tab//return(\\quot\\s=\\quot\\\\plus\\s)//crlf//\\quot\\>^
ID=284248|X=183|Y=219|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=781703|AgentChildNoNode=|AgentSensor=|AgentAction=downloadSygmaInvoicesToServer|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=Result1|AgentNodeComment=Download Invoices|AgentNodeTermType=|^
ID=781703|X=183|Y=353|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=34791|AgentChildNoNode=|AgentSensor=|AgentAction=distrubuteSygmaInvoices|AgentNodeNotes=|AgentNodeParams=|AgentNodeExpression=|AgentNodeActionReturnValue=Result2|AgentNodeComment=Distribute invoices|AgentNodeTermType=|
</widget>