PageRenderTime 17ms CodeModel.GetById 14ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 1ms

/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
 1<%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%>
 2<!--#include file="../config.asp" -->
 3<%
 4if request("id")="" then
 5	response.write escape ("���� ����� ���� �����" )
 6	response.end
 7end if 
 8
 9if not isnumeric(request("id")) then
10	response.write escape ("���� ����� ���� �����" )
11	response.end
12end if 
13
14
15mySQL = "SELECT ID,name FROM GLAccounts WHERE (HasAppendix = 1) AND (GL = "& openGL & ") AND (ID = "& request("id") & ")"
16Set RS1=Conn.execute(mySQL)
17if RS1.eof then
18	response.write escape ("��� ���� ������ ��� �����" )
19	response.end
20	accountName = ""
21else
22	accountName = RS1("name")
23end if
24RS1.close
25
26mySQL = "SELECT ItemReason FROM AXItemReasonGLAccountRelations WHERE (GL = "& openGL & ") AND (GLAccount = "& request("id") & ")"
27Set RS1=Conn.execute(mySQL)
28if RS1.eof then
29	'Using default reason (sys: AO, reason: Misc.)
30	Reason=6
31else
32	Reason=	cint(RS1("ItemReason"))
33end if
34RS1.close
35
36mySQL="SELECT * FROM AXItemReasons WHERE (ID="& Reason & ")"
37Set RS1=Conn.execute(mySQL)
38sys=			RS1("Acron")
39ReasonName =	RS1("Name")
40
41response.write escape( Reason & "-" & ReasonName & " (" & accountName & ")")
42RS1.close
43conn.close
44%>