/beta/bank/xml_AXItemReasonGLAccountRelations.asp
http://github.com/khaneh/Orders · ASP · 44 lines · 37 code · 6 blank · 1 comment · 6 complexity · 40750846eaf98b182d50d4cb5440ec85 MD5 · raw file
- <%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%>
- <!--#include file="../config.asp" -->
- <%
- if request("id")="" then
- response.write escape (" " )
- response.end
- end if
-
- if not isnumeric(request("id")) then
- response.write escape (" " )
- response.end
- end if
-
-
- mySQL = "SELECT ID,name FROM GLAccounts WHERE (HasAppendix = 1) AND (GL = "& openGL & ") AND (ID = "& request("id") & ")"
- Set RS1=Conn.execute(mySQL)
- if RS1.eof then
- response.write escape (" " )
- response.end
- accountName = ""
- else
- accountName = RS1("name")
- end if
- RS1.close
-
- mySQL = "SELECT ItemReason FROM AXItemReasonGLAccountRelations WHERE (GL = "& openGL & ") AND (GLAccount = "& request("id") & ")"
- Set RS1=Conn.execute(mySQL)
- if RS1.eof then
- 'Using default reason (sys: AO, reason: Misc.)
- Reason=6
- else
- Reason= cint(RS1("ItemReason"))
- end if
- RS1.close
-
- mySQL="SELECT * FROM AXItemReasons WHERE (ID="& Reason & ")"
- Set RS1=Conn.execute(mySQL)
- sys= RS1("Acron")
- ReasonName = RS1("Name")
-
- response.write escape( Reason & "-" & ReasonName & " (" & accountName & ")")
- RS1.close
- conn.close
- %>