PageRenderTime 29ms CodeModel.GetById 21ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/beta/bank/payment.asp

http://github.com/khaneh/Orders
ASP | 131 lines | 104 code | 15 blank | 12 comment | 12 complexity | b604fa5b0609d3b669c649ad65833078 MD5 | raw file
  1<%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%><%
  2'Bank (10 [=A])
  3PageTitle= "������ ������"
  4SubmenuItem=5
  5if not Auth("A" , 5) then NotAllowdToViewThisPage()
  6
  7%>
  8<!--#include file="top.asp" -->
  9<!--#include File="../include_farsiDateHandling.asp"-->
 10<!--#include File="../include_JS_InputMasks.asp"-->
 11<%
 12
 13'-----------------------------------------------------------------------------------------------------
 14'-------------------------------------------------------------------------------------- Submit Payment
 15'-----------------------------------------------------------------------------------------------------
 16if request.form("Submit")="������" then
 17	VouchID = request.form("VouchID")
 18
 19	if VouchID<>"" then
 20
 21		response.redirect "../bank/cheq.asp?act=enterCheque&VouchID="& VouchID
 22		
 23	end if
 24end if
 25
 26'-----------------------------------------------------------------------------------------------------
 27'-------------------------------------------------------------------------------- Show Voucher Details
 28'-----------------------------------------------------------------------------------------------------
 29if request("VouchID")<> "" then
 30
 31	response.write "<br><br>"
 32	call showAlert("������� ��� ���� ���.<br><br>��� ������ ����� �� ��� ���� �� ����� .<br><br>���� ���� �� �� �� �� ���� �� ��� ���� ����� ��� ��� �� �� ����� �� ���� ���� Ȑ����. <br><br>��� ����� �� ����.<br><br>���� �� <A HREF='../AP/AccountReport.asp?act=showVoucher&voucher="& request("VouchID") & "'><B>�����</B></A> �� �����." , CONST_MSG_ALERT)
 33	response.end
 34end if
 35
 36'-----------------------------------------------------------------------------------------------------
 37'------------------------------------------------------------------------------------------------ Main
 38'-----------------------------------------------------------------------------------------------------
 39set RSS=Conn.Execute ("SELECT Vouchers.*, APItems.RemainedAmount FROM Vouchers INNER JOIN APItems ON Vouchers.id = APItems.Link WHERE (Vouchers.paid = 0) AND (Vouchers.Verified = 1) AND (APItems.Type = 6) and (APItems.RemainedAmount>0)" )
 40%>
 41<BR><BR><BR>
 42<FORM METHOD=POST ACTION="payment.asp">
 43<TABLE dir=rtl align=center width=680  cellspacing=0>
 44<TR bgcolor="eeeeee" >
 45	<TD align=center colspan=8><B>��������� ������ ����</B></TD>
 46</TR>
 47<TR bgcolor="eeeeee" >
 48	<TD style="border-bottom: solid 1pt black" width=10><!A HREF="default.asp?s=1"><SMALL>#</SMALL></A></TD>
 49	<TD style="border-bottom: solid 1pt black"><INPUT TYPE="checkbox" NAME="" disabled></TD>
 50	<TD style="border-bottom: solid 1pt black; border-left: solid 1pt black" width=120><!A HREF="default.asp?s=3"><SMALL>�������</SMALL></A></TD>
 51	<TD style="border-bottom: solid 1pt black; border-left: solid 1pt black"><!A HREF="default.asp?s=1"><SMALL>����� ������</SMALL></A></TD>
 52	<TD style="border-bottom: solid 1pt black; border-left: solid 1pt black"><!A HREF="default.asp?s=2"><SMALL>���� </SMALL></A></TD>
 53	<TD style="border-bottom: solid 1pt black; border-left: solid 1pt black"><!A HREF="default.asp?s=2"><SMALL>����� </SMALL></A></TD>
 54	<TD style="border-bottom: solid 1pt black; border-left: solid 1pt black" width=80><!A HREF="default.asp?s=2"><SMALL>����� ���� </SMALL></A></TD>
 55	<TD style="border-bottom: solid 1pt black; width="><!A HREF="default.asp?s=4"><SMALL>�����</SMALL></A></TD>
 56</TR>
 57<%
 58tmpCounter=0
 59Do while not RSS.eof
 60	tmpCounter = tmpCounter + 1
 61	if tmpCounter mod 2 = 1 then
 62		tmpColor="#FFFFFF"
 63		tmpColor2="#FFFFBB"
 64	Else
 65		tmpColor="#FFFFFF"
 66		tmpColor2="#FFFFBB"
 67		'tmpColor="#DDDDDD"
 68		'tmpColor2="#EEEEBB"
 69	End if 
 70
 71set RST=Conn.Execute ("SELECT * FROM Accounts WHERE (ID = "& RSS("VendorID") & ")" )
 72
 73set RSF=Conn.Execute ("SELECT VoucherLines.*, PurchaseOrders.Status FROM VoucherLines INNER JOIN PurchaseOrders ON VoucherLines.RelatedPurchaseOrderID = PurchaseOrders.ID WHERE (VoucherLines.Voucher_ID = "& RSS("ID") & ")" )
 74
 75DisableFlag = ""
 76vouchLines = ""
 77Do while not RSF.eof
 78	vouchLines = vouchLines & "<A HREF='../purchase/outServiceTrace.asp?od=" & RSF("RelatedPurchaseOrderID") & "'>" & RSF("LineTitle") & "</a><br> (�����: " & RSF("qtty") & " - ����: " & RSF("price") & ") <br> "
 79	if RSF("status") <> "OK" then DisableFlag=" disabled"
 80RSF.moveNext
 81Loop
 82%>
 83<TR <%=DisableFlag%>  Title="<% 
 84			Comment = RSS("Comment")
 85			if Comment<>"-" then
 86				response.write "�����: " & Comment
 87			else
 88				response.write "����� �����"
 89			end if
 90		%>" bgcolor="<%=tmpColor%>">
 91	<TD  style="border-bottom: solid 1pt black"><A target="_blank" HREF="../AP/AccountReport.asp?act=showVoucher&voucher=<%=RSS("id")%>" ><%=RSS("id")%></A></TD>
 92	<TD style="border-bottom: solid 1pt black"><INPUT TYPE="checkbox" NAME="VouchID" VALUE="<%=RSS("id")%>"  onclick="setColor(this)"></TD>
 93	<TD style="border-bottom: solid 1pt black; border-left: solid 1pt black"><%=RST("AccountTitle")%></TD>
 94	<TD style="border-bottom: solid 1pt black; border-left: solid 1pt black"><%=RSS("title")%></TD>
 95	<TD style="border-bottom: solid 1pt black; border-left: solid 1pt black"><%=RSS("totalPrice")%></TD>
 96	<TD style="border-bottom: solid 1pt black; border-left: solid 1pt black"><%=RSS("RemainedAmount")%></TD>
 97	<TD style="border-bottom: solid 1pt black; border-left: solid 1pt black"><span dir=ltr><%=RSS("CreationDate")%></span><br> (<%=RSS("CreationTime")%>)</small></TD>
 98	<TD style="border-bottom: solid 1pt black"> &nbsp;<%=vouchLines%></TD>
 99</TR>
100<% 
101RSS.moveNext
102Loop
103%>
104</TABLE><br>
105<center><INPUT TYPE="submit" Name="Submit" Value="������" class="inputBut" style="width:150px;" tabIndex="14">
106</form>
107</center>
108
109
110<SCRIPT LANGUAGE="JavaScript">
111<!--
112tmpColor="#FFFFFF"
113tmpColor2="#FFFFBB"
114
115function setColor(obj)
116{
117	for(i=0; i<document.all.VouchID.length; i++)
118		{
119		theTR = document.all.VouchID[i].parentNode.parentNode
120		if (document.all.VouchID[i].checked)
121			theTR.setAttribute("bgColor",tmpColor2)
122		else
123			theTR.setAttribute("bgColor",tmpColor)
124		}
125	//theTR = obj.parentNode.parentNode
126	//theTR.setAttribute("bgColor","#FFFFFF")
127}
128//-->
129</SCRIPT>
130
131<!--#include file="tah.asp" -->