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