/beta/bank/Contra.asp

http://github.com/khaneh/Orders · ASP · 1008 lines · 813 code · 129 blank · 66 comment · 53 complexity · 53498b599f7085ea8cc08b9d61f9c59f MD5 · raw file

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%><%
  2. 'Bank (10 [=A])
  3. PageTitle= ""
  4. SubmenuItem=9
  5. if not Auth("A" , 9) then NotAllowdToViewThisPage()
  6. %>
  7. <!--#include file="top.asp" -->
  8. <!--#include File="../include_farsiDateHandling.asp"-->
  9. <!--#include File="../include_JS_InputMasks.asp"-->
  10. <style>
  11. .GenInput { font-family:tahoma; font-size: 9pt; border: 1px solid black; text-align:right; }
  12. .GenButton { font-family:tahoma; font-size: 9pt; border: 1px solid black; }
  13. .dateLine {background-Color:#003399;color:#FFFF00;}
  14. .row {}
  15. .row1 {background-Color:#99FFCC;}
  16. .row2 {background-Color:#66CC99;}
  17. .row3 {background-Color:#AADDFF;}
  18. .row9 {background-Color:#FFCC00;t:#66CC00;}
  19. </style>
  20. <BR><BR>
  21. <%
  22. Function showDate(inpStr)
  23. ' if len(inpStr)=6 then
  24. ' showDate = left(inpStr,2) & "." & mid(inpStr,3,2) & "." & right(inpStr,2)
  25. ' else
  26. ' showDate = "Error"
  27. ' end if
  28. showDate = replace(inpStr,"/",".")
  29. End Function
  30. Function WriteBlankRows (inpRemainedRows)
  31. For tmpCnt = 1 to inpRemainedRows
  32. %> <TR height=20>
  33. <TD colspan=5>&nbsp;</TD>
  34. </TR>
  35. <% Next
  36. End Function
  37. Function convertDate(inpStr)
  38. if len(inpStr)=10 then
  39. convertDate = mid(inpStr,3,2) & mid(inpStr,6,2) & right(inpStr,2)
  40. else
  41. convertDate = "Error"
  42. end if
  43. End Function
  44. Function lookupDescCode(inpBank, inpCode)
  45. result = inpBank & "," & inpCode ' = "&nbsp;"
  46. Select Case result
  47. ' Tejarat
  48. Case "1,6":
  49. result = " "
  50. Case "1,7":
  51. result = " "
  52. Case "1,8":
  53. result = " "
  54. Case "1,11":
  55. result = " "
  56. Case "1,13":
  57. result = ""
  58. Case "1,22":
  59. result = " ()"
  60. Case "1,28":
  61. result = " "
  62. Case "1,33":
  63. result = " "
  64. Case "1,38":
  65. result = " "
  66. Case "1,42":
  67. result = " "
  68. Case "1,43":
  69. result = " "
  70. Case "1,125":
  71. result = " "
  72. Case "1,251":
  73. result = " "
  74. Case "1,122":
  75. result = " ( )"
  76. Case "1,291":
  77. result = "ѐ "
  78. Case "1,162":
  79. result = " "
  80. Case "1,262":
  81. result = " ( )"
  82. Case "1,223":
  83. result = " "
  84. Case "1,253":
  85. result = " "
  86. Case "1,222":
  87. result = " ( )"
  88. Case "1,273":
  89. result = " "
  90. Case "1,211":
  91. result = " "
  92. Case "1,261":
  93. result = " "
  94. Case "1,161":
  95. result = " "
  96. Case "1,254":
  97. result = " "
  98. Case "1,":
  99. result = ""
  100. Case "1,":
  101. result = ""
  102. ' Sepah
  103. Case "2,1":
  104. result = " "
  105. Case "2,2":
  106. result = " "
  107. Case "2,3":
  108. result = ""
  109. Case "2,4":
  110. result = ""
  111. Case "2,5":
  112. result = ""
  113. Case "2,9":
  114. result = ""
  115. Case "2,11":
  116. result = ""
  117. Case "2,12":
  118. result = " "
  119. Case "2,15":
  120. result = " "
  121. End Select
  122. lookupDescCode = result
  123. End Function
  124. Function lookupBankType(inpGLAccount)
  125. Select Case inpGLAccount
  126. Case "12001":
  127. result = "1" ' Tejarat
  128. Case "12004":
  129. result = "1" ' Tejarat
  130. Case "12002":
  131. result = "2" ' Sepah
  132. Case else:
  133. result = "Error"
  134. End Select
  135. lookupBankType = result
  136. End Function
  137. Function lookupBankAccountNo(inpGLAccount)
  138. Select Case inpGLAccount
  139. Case "12001":
  140. result = "0033624050"
  141. Case "12004":
  142. result = "0033624816"
  143. Case "12002":
  144. result = "000434419"
  145. Case else:
  146. result = "Error"
  147. End Select
  148. lookupBankAccountNo = result
  149. End Function
  150. '-----------------------------------------------------------------------------------------------------
  151. '---------------------------------------------------------------------------- Show Remained Un Related
  152. '-----------------------------------------------------------------------------------------------------
  153. if request("act")="showAll" then
  154. '----- Check GL is closed
  155. if (session("IsClosed")="True") then
  156. Conn.close
  157. response.redirect "?errMsg=" & Server.URLEncode("! .")
  158. end if
  159. '----
  160. StartDate = request.QueryString("StartDate")
  161. EndDate = request.QueryString("EndDate")
  162. BankGLAccount = cint(request.QueryString("BankGLAccount"))
  163. BankAccountNo = lookupBankAccountNo(BankGLAccount)
  164. BankType = lookupBankType(BankGLAccount)
  165. GLRowsViewName = "VIEW_Contra_Remained_GLRows_" & openGL & "_" & BankGLAccount
  166. BankRowsViewName = "VIEW_Contra_Remained_BankRows_" & BankAccountNo
  167. 'Creating Temporary Table
  168. mySQL="DELETE FROM BankContradiction_TempDates"
  169. Conn.Execute(mySQL)
  170. ' mySQL="INSERT INTO BankContradiction_TempDates ([Date], MaxRows) SELECT LEFT(ISNULL(GLRowDates.[Date], '') + ISNULL(BankLogDates.[Date], ''), 10) AS [date], CASE WHEN ISNULL(GLRowDates.CntGLRow, 0) > ISNULL(BankLogDates.CntBankLog, 0) THEN GLRowDates.CntGLRow ELSE BankLogDates.CntBankLog END AS MaxRows FROM (SELECT GLDocDate AS [Date], COUNT(*) AS CntGLRow FROM " & GLRowsViewName & " GROUP BY GLDocDate) GLRowDates FULL OUTER JOIN (SELECT [Date], COUNT(*) AS CntBankLog FROM " & BankRowsViewName & " GROUP BY [Date]) BankLogDates ON GLRowDates.[Date] = BankLogDates.[Date] WHERE (LEFT(ISNULL(GLRowDates.[Date], '') + ISNULL(BankLogDates.[Date], ''), 10) >= '" & StartDate & "') AND (LEFT(ISNULL(GLRowDates.[Date], '') + ISNULL(BankLogDates.[Date], ''), 10) <= '" & EndDate & "') ORDER BY GLRowDates.[Date]"
  171. mySQL="INSERT INTO BankContradiction_TempDates ([Date], MaxRows) SELECT LEFT(ISNULL(GLRowDates.[Date], '') + ISNULL(BankLogDates.[Date], ''), 10) AS [date], CASE WHEN ISNULL(GLRowDates.CntGLRow, 0) > ISNULL(BankLogDates.CntBankLog, 0) THEN GLRowDates.CntGLRow ELSE BankLogDates.CntBankLog END AS MaxRows FROM (SELECT GLDocDate AS [Date], COUNT(*) AS CntGLRow FROM EffectiveGLRows WHERE (GL = " & openGL & ") AND (GLAccount = " & BankGLAccount & ") GROUP BY GLDocDate) GLRowDates FULL OUTER JOIN (SELECT [Date], COUNT(*) AS CntBankLog FROM BankLog WHERE (AccountNo = " & BankAccountNo & ") GROUP BY [Date]) BankLogDates ON GLRowDates.[Date] = BankLogDates.[Date] WHERE (LEFT(ISNULL(GLRowDates.[Date], '') + ISNULL(BankLogDates.[Date], ''), 10) >= '" & StartDate & "') AND (LEFT(ISNULL(GLRowDates.[Date], '') + ISNULL(BankLogDates.[Date], ''), 10) <= '" & EndDate & "') ORDER BY GLRowDates.[Date]"
  172. Conn.Execute(mySQL)
  173. %>
  174. <table align=center>
  175. <tr>
  176. <td valign=top>
  177. <!-- GL Rows -->
  178. <TABLE cellpadding=2 cellspacing=1 border=1 width=370>
  179. <TR>
  180. <TD colspan=5><B> <%=BankGLAccount%></B></TD>
  181. </TR>
  182. <%
  183. ' mySQL="SELECT BankContradiction_TempDates.[Date] AS BaseDate, BankContradiction_TempDates.MaxRows, BankingGLRows.*, ISNULL(BankContradictionRelations.Type,0) AS Type, BankContradictionRelations.Description AS RelationDesc, Users.RealName AS Creator, BankContradictionRelations.CreatedDate, BankContradictionRelations.CreatedTime FROM BankContradictionRelations INNER JOIN Users ON BankContradictionRelations.CreatedBy = Users.ID RIGHT OUTER JOIN (SELECT ID, isCredit, Amount, Description, GLDoc, GLDocID, GLDocDate FROM EffectiveGLRows WHERE (GL = " & openGL & ") AND (GLAccount = " & BankGLAccount & ")) BankingGLRows ON BankContradictionRelations.GLRowID = BankingGLRows.ID RIGHT OUTER JOIN BankContradiction_TempDates ON BankingGLRows.GLDocDate = BankContradiction_TempDates.[Date] ORDER BY BankContradiction_TempDates.[Date]"
  184. mySQL="SELECT BankContradiction_TempDates.[Date] AS BaseDate, BankContradiction_TempDates.MaxRows, ISNULL(BankContradictionRelations.Type, 0) AS Type, BankingGLRows.ID, BankingGLRows.isCredit, BankingGLRows.Amount, BankingGLRows.Description, BankingGLRows.GLDoc, BankingGLRows.GLDocID, BankingGLRows.GLDocDate FROM BankContradictionRelations RIGHT OUTER JOIN (SELECT ID, isCredit, Amount, Description, GLDoc, GLDocID, GLDocDate FROM EffectiveGLRows WHERE (GL = " & openGL & ") AND (GLAccount = " & BankGLAccount & ")) BankingGLRows ON BankContradictionRelations.GLRowID = BankingGLRows.ID RIGHT OUTER JOIN BankContradiction_TempDates ON BankingGLRows.GLDocDate = BankContradiction_TempDates.[Date] GROUP BY BankContradiction_TempDates.[Date], BankContradiction_TempDates.MaxRows, ISNULL(BankContradictionRelations.Type, 0), BankingGLRows.ID, BankingGLRows.Amount, BankingGLRows.Description, BankingGLRows.GLDoc, BankingGLRows.GLDocID, BankingGLRows.GLDocDate, BankingGLRows.isCredit ORDER BY BankContradiction_TempDates.[Date], BankingGLRows.isCredit DESC, BankingGLRows.Amount"
  185. Set RSDates = Conn.Execute(mySQL)
  186. if NOT RSDates.eof then
  187. RemainedRows = 0
  188. BaseDate = ""
  189. TempCount = 1
  190. Do While NOT RSDates.eof
  191. RowsCount = clng(RSDates("MaxRows"))
  192. if BaseDate = RSDates("BaseDate") then
  193. RemainedRows = RemainedRows - 1
  194. TempCount = TempCount + 1
  195. else
  196. Call WriteBlankRows (RemainedRows)
  197. %>
  198. <TR class="dateLine">
  199. <TD colspan=5><%=showDate(RSDates("BaseDate"))%></TD>
  200. </TR>
  201. <%
  202. RemainedRows = RowsCount - 1
  203. TempCount = 1
  204. end if
  205. if not isnull(RSDates("ID")) then
  206. if RSDates("isCredit") then
  207. Debit="&nbsp;"
  208. Credit=Separate(RSDates("Amount"))
  209. else
  210. Debit=Separate(RSDates("Amount"))
  211. Credit="&nbsp;"
  212. end if
  213. rowType = cint(RSDates("Type"))
  214. if rowType = 1 then
  215. RowTitle=" 1:" & vbCrLf & "ۡ Ρ "
  216. elseif rowType = 2 then
  217. RowTitle=" 2:" & vbCrLf & " "
  218. elseif rowType = 3 then
  219. RowTitle=" 3:" & vbCrLf & " "
  220. elseif rowType = 9 then
  221. RowTitle=""
  222. 'RowTitle="" & vbCrLf & " " & RSDates("Creator") & " " & RSDates("CreatedDate")
  223. 'if RSDates("RelationDesc") <> "" then RowTitle = RowTitle & vbCrLf & ": " & RSDates("RelationDesc")
  224. else
  225. RowTitle=" "
  226. end if
  227. %>
  228. <TR class="row<%=rowType%>" title="<%=RowTitle%>" height=20>
  229. <TD width=30><%=RSDates("GLDocID")%></TD>
  230. <TD title="<%=RSDates("Description")%>" style="cursor:col-resize;"><%=Left(RSDates("Description"),20) & ".."%></TD>
  231. <TD width=70><%=Debit%></TD>
  232. <TD width=70><%=Credit%></TD>
  233. <TD width=20 style="cursor:crosshair;" onclick="slctGLRow(this)">
  234. <input type="hidden" Value="<%=RSDates("ID")%>">
  235. </TD>
  236. </TR>
  237. <%
  238. else
  239. Call WriteBlankRows (1)
  240. End if
  241. BaseDate = RSDates("BaseDate")
  242. RSDates.moveNext
  243. Loop
  244. end if
  245. RSDates.close
  246. Call WriteBlankRows (RemainedRows)
  247. %>
  248. </TABLE>
  249. </td>
  250. <td></td>
  251. <td valign=top>
  252. <!-- Bank Rows -->
  253. <TABLE cellpadding=2 cellspacing=1 border=1 width=350>
  254. <TR>
  255. <TD colspan=5><B> </B></TD>
  256. </TR>
  257. <%
  258. ' mySQL = "SELECT BankContradiction_TempDates.[Date] AS BaseDate, BankContradiction_TempDates.MaxRows, allBankRows.*, BankContradictionRelations.Description, ISNULL(BankContradictionRelations.Type,0) AS Type, BankContradictionRelations.Description AS RelationDesc, Users.RealName AS Creator, BankContradictionRelations.CreatedDate, BankContradictionRelations.CreatedTime FROM BankContradiction_TempDates LEFT OUTER JOIN Users INNER JOIN BankContradictionRelations ON Users.ID = BankContradictionRelations.CreatedBy RIGHT OUTER JOIN (SELECT * FROM BankLog WHERE AccountNo = " & BankAccountNo & ") allBankRows ON BankContradictionRelations.BankLogID = allBankRows.autoKey ON BankContradiction_TempDates.[Date] = allBankRows.[Date] ORDER BY BankContradiction_TempDates.[Date]"
  259. mySQL = "SELECT BankContradiction_TempDates.[Date] AS BaseDate, BankContradiction_TempDates.MaxRows, ISNULL(BankContradictionRelations.Type, 0) AS Type, allBankRows.AccountNo, allBankRows.CheqNo, allBankRows.[Date], allBankRows.isDebit, allBankRows.Amount, allBankRows.DescCode, allBankRows.BankType, allBankRows.autoKey FROM BankContradiction_TempDates LEFT OUTER JOIN BankContradictionRelations RIGHT OUTER JOIN (SELECT * FROM BankLog WHERE AccountNo = " & BankAccountNo & ") allBankRows ON BankContradictionRelations.BankLogID = allBankRows.autoKey ON BankContradiction_TempDates.[Date] = allBankRows.[Date] GROUP BY BankContradiction_TempDates.[Date], BankContradiction_TempDates.MaxRows, ISNULL(BankContradictionRelations.Type, 0), allBankRows.AccountNo, allBankRows.CheqNo, allBankRows.[Date], allBankRows.Amount, allBankRows.DescCode, allBankRows.BankType, allBankRows.autoKey, allBankRows.isDebit ORDER BY BankContradiction_TempDates.[Date], allBankRows.isDebit, allBankRows.Amount"
  260. Set RSDates = Conn.Execute(mySQL)
  261. if NOT RSDates.eof then
  262. RemainedRows = 0
  263. BaseDate = ""
  264. TempCount = 1
  265. Do While NOT RSDates.eof
  266. RowsCount = clng(RSDates("MaxRows"))
  267. if BaseDate = RSDates("BaseDate") then
  268. RemainedRows = RemainedRows - 1
  269. TempCount = TempCount + 1
  270. else
  271. Call WriteBlankRows (RemainedRows)
  272. %>
  273. <TR class="dateLine">
  274. <TD colspan=5><%=showDate(RSDates("BaseDate"))%></TD>
  275. </TR>
  276. <%
  277. RemainedRows = RowsCount - 1
  278. TempCount = 1
  279. end if
  280. if not isnull(RSDates("AutoKey")) then
  281. 'crosshair
  282. if RSDates("isDebit") then
  283. Debit=Separate(cdbl(RSDates("Amount")))
  284. Credit="&nbsp;"
  285. else
  286. Debit="&nbsp;"
  287. Credit=Separate(cdbl(RSDates("Amount")))
  288. end if
  289. rowType = cint(RSDates("Type"))
  290. if rowType = 1 then
  291. RowTitle=" 1:" & vbCrLf & "ۡ Ρ "
  292. elseif rowType = 2 then
  293. RowTitle=" 2:" & vbCrLf & " "
  294. elseif rowType = 3 then
  295. RowTitle=" 3:" & vbCrLf & " "
  296. elseif rowType = 9 then
  297. RowTitle=""
  298. 'RowTitle="" & vbCrLf & " " & RSDates("Creator") & " " & RSDates("CreatedDate")
  299. 'if RSDates("RelationDesc") <> "" then RowTitle = RowTitle & vbCrLf & ": " & RSDates("RelationDesc")
  300. else
  301. RowTitle=" "
  302. end if
  303. %>
  304. <TR class="row<%=rowType%>" title="<%=RowTitle%>" height=20>
  305. <TD width=20 style="cursor:crosshair;" onclick="slctBnkRow(this)">
  306. <input type="hidden" Value="<%=RSDates("AutoKey")%>">
  307. </TD>
  308. <TD width=80 style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:col-resize;"><NoBr><%=lookupDescCode(BankType,RSDates("DescCode"))%></NoBr></TD>
  309. <TD width=70><%=Debit%></TD>
  310. <TD width=70><%=Credit%></TD>
  311. <TD width=30><%=RSDates("CheqNo")%></TD>
  312. </TR>
  313. <%
  314. else
  315. Call WriteBlankRows (1)
  316. End if
  317. BaseDate = RSDates("BaseDate")
  318. RSDates.moveNext
  319. Loop
  320. end if
  321. RSDates.close
  322. Call WriteBlankRows (RemainedRows)
  323. %>
  324. </TABLE>
  325. </td>
  326. </tr>
  327. <tr height="5">
  328. <td align='center' colspan="3">
  329. <table>
  330. <tr>
  331. <td>
  332. <FORM METHOD=POST ACTION="?act=delRelations&StartDate=<%=Server.URLEncode(StartDate)%>&EndDate=<%=Server.URLEncode(EndDate)%>&BankGLAccount=<%=Server.URLEncode(BankGLAccount)%>&NextAct=showAll">
  333. <span id="Relations"></span>
  334. <INPUT TYPE="submit" value=" " class="GenButton" onclick="this.disabled=true;submit();">
  335. </FORM>
  336. </td>
  337. <td>
  338. <FORM METHOD=POST ACTION="?act=autoRelate&StartDate=<%=Server.URLEncode(StartDate)%>&EndDate=<%=Server.URLEncode(EndDate)%>&BankGLAccount=<%=Server.URLEncode(BankGLAccount)%>&NextAct=showAll">
  339. <INPUT TYPE="submit" value=" " class="GenButton" onclick="this.disabled=true;submit();">
  340. </FORM>
  341. </td>
  342. <td>
  343. <FORM METHOD=POST ACTION="?act=showRemained&StartDate=<%=Server.URLEncode(StartDate)%>&EndDate=<%=Server.URLEncode(EndDate)%>&BankGLAccount=<%=Server.URLEncode(BankGLAccount)%>&NextAct=showAll">
  344. <INPUT TYPE="submit" value=" " class="GenButton" onclick="this.disabled=true;submit();">
  345. </FORM>
  346. </td>
  347. </tr>
  348. </table>
  349. </td>
  350. </tr>
  351. </table>
  352. <script language="JavaScript">
  353. <!--
  354. //---------------------------------------------
  355. var slctRowClr='#FFFF00'
  356. var rltdRowClr='#99FF88'
  357. var sRltdRowClr='#9988FF'
  358. var delRowClr='#FF0055'
  359. function slctGLRow(src){
  360. if (confirm(" Ͽ\n")){
  361. src.onclick="";
  362. src.setAttribute("bgColor",delRowClr);
  363. src.title=" "
  364. document.getElementById("Relations").innerHTML+="<input type='hidden' name='GLRow' value='"+src.getElementsByTagName("input")[0].value+"'>"
  365. }
  366. }
  367. function slctBnkRow(src){
  368. if (confirm(" Ͽ\n")){
  369. src.onclick="";
  370. src.setAttribute("bgColor",delRowClr);
  371. src.title=" "
  372. document.getElementById("Relations").innerHTML+="<input type='hidden' name='BnkRow' value='"+src.getElementsByTagName("input")[0].value+"'>"
  373. }
  374. }
  375. //-->
  376. </script>
  377. <%
  378. '-----------------------------------------------------------------------------------------------------
  379. '---------------------------------------------------------------------------- Show Remained Un Related
  380. '-----------------------------------------------------------------------------------------------------
  381. elseif request("act")="showRemained" then
  382. '----- Check GL is closed
  383. if (session("IsClosed")="True") then
  384. Conn.close
  385. response.redirect "?errMsg=" & Server.URLEncode("! .")
  386. end if
  387. '----
  388. if request.QueryString("StartDate")<>"" then
  389. ' Use QueryString Data
  390. StartDate = request.QueryString("StartDate")
  391. EndDate = request.QueryString("EndDate")
  392. BankGLAccount = cint(request.QueryString("BankGLAccount"))
  393. BankAccountNo = lookupBankAccountNo(BankGLAccount)
  394. BankType = lookupBankType(BankGLAccount)
  395. else
  396. ' Use Form Data
  397. set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
  398. mySmartUpload.Upload
  399. StartDate = mySmartUpload.Form("StartDate") '"840101"
  400. EndDate = mySmartUpload.Form("EndDate") '"841019"
  401. BankGLAccount = cint(mySmartUpload.Form("BankGLAccount")) '"841019"
  402. BankAccountNo = lookupBankAccountNo(BankGLAccount)
  403. BankType = lookupBankType(BankGLAccount)
  404. If not mySmartUpload.Files(1).IsMissing Then
  405. ' We have a FILE uploaded
  406. ' Save The File
  407. SavedFileName = "./LogFiles/" & lookupBankAccountNo(BankGLAccount) & ".TXT"
  408. mySmartUpload.Files(1).SaveAs(SavedFileName)
  409. ' Read and Insert
  410. Dim oFS
  411. Dim oFile
  412. Dim oStream
  413. If BankGLAccount = 12001 OR BankGLAccount = 12004 then
  414. 'Tejarat
  415. Set oFS = Server.CreateObject("Scripting.FileSystemObject")
  416. Set oFile = oFS.GetFile(Server.MapPath(SavedFileName))
  417. Set oStream = oFile.OpenAsTextStream(1, -2) '1:ForReading , -2:TristateUseDefault
  418. Do While Not oStream.AtEndOfStream
  419. theLine=oStream.ReadLine
  420. if len(theLine) > 39 then
  421. BankAccountNo = mid(theLine,2,10) 'left(theLine,10)
  422. CheckNo = mid(theLine,12,6)
  423. mmoDate = "13" & mid(theLine,18,2) & "/" & mid(theLine,20,2) & "/" & mid(theLine,22,2)
  424. isDebit = mid(theLine,24,1)
  425. amount = mid(theLine,25,13)
  426. DescCode = mid(theLine,38,3)
  427. mySQL="INSERT INTO BankLog (AccountNo, CheqNo, [Date], isDebit, Amount, DescCode, BankType)" &_
  428. "VALUES ('" & BankAccountNo & "','" & CheckNo & "','" & mmoDate & "','" & isDebit & "','" & amount & "','" & DescCode & "','1')"
  429. Conn.Execute(mySQL)
  430. else
  431. exit do
  432. end if
  433. Loop
  434. oStream.Close
  435. Set oFS = Nothing
  436. Set oFile = Nothing
  437. Set oStream = Nothing
  438. 'Removing Duplicate Rows
  439. mySQL="DELETE FROM BankLog WHERE (autoKey IN (SELECT MAX(autoKey) AS RepeatedLine FROM BankLog GROUP BY AccountNo, CheqNo, [Date], Amount, DescCode, BankType, isDebit HAVING (COUNT(*) > 1)))"
  440. Conn.Execute(mySQL)
  441. elseif BankGLAccount = 12002 then
  442. 'Sepah
  443. Set oFS = Server.CreateObject("Scripting.FileSystemObject")
  444. Set oFile = oFS.GetFile(Server.MapPath(SavedFileName))
  445. Set oStream = oFile.OpenAsTextStream(1, -2) '1:ForReading , -2:TristateUseDefault
  446. Do While Not oStream.AtEndOfStream
  447. theLine=oStream.ReadLine
  448. if theLine <> "" then
  449. BankAccNo = left(theLine,9)
  450. mmoDate = "13" & mid(theLine,10,2) & "/" & mid(theLine,12,2) & "/" & mid(theLine,14,2)
  451. CheckNo = mid(theLine,19,6)
  452. amount = mid(theLine,39,14)
  453. StupidMinusSign = mid(theLine,52,1)
  454. if not isnumeric(StupidMinusSign) then
  455. amount = "-" & left(amount,13) & (asc(StupidMinusSign) - 112)
  456. end if
  457. isDebit = 2 - cint(mid(theLine,53,1))
  458. DescCode = mid(theLine,54,2)
  459. if isDebit <> 2 then
  460. mySQL="INSERT INTO BankLog (AccountNo, CheqNo, [Date], isDebit, Amount, DescCode, BankType)" &_
  461. "VALUES ('" & BankAccNo & "','" & CheckNo & "','" & mmoDate & "','" & isDebit & "','" & amount & "','" & DescCode & "','2')"
  462. Conn.Execute(mySQL)
  463. end if
  464. else
  465. exit do
  466. end if
  467. Loop
  468. oStream.Close
  469. Set oFS = Nothing
  470. Set oFile = Nothing
  471. Set oStream = Nothing
  472. 'Removing Duplicate Rows
  473. mySQL="DELETE FROM BankLog WHERE (autoKey IN (SELECT MAX(autoKey) AS RepeatedLine FROM BankLog GROUP BY AccountNo, CheqNo, [Date], Amount, DescCode, BankType, isDebit HAVING (COUNT(*) > 1)))"
  474. Conn.Execute(mySQL)
  475. else
  476. 'Error
  477. End If
  478. End If
  479. end if
  480. ' CREATE VIEW VIEW_Contra_Remained_GLRows_84_12001
  481. ' AS
  482. ' SELECT ID, GLDocID, GLDocDate COLLATE SQL_Latin1_General_CP1_CI_AS AS [Date], IsCredit, Amount, Description
  483. ' FROM EffectiveGLRows
  484. ' WHERE (GL = 84) AND (GLAccount = 12001) AND (ID NOT IN
  485. ' (SELECT GLRowID
  486. ' FROM BankContradictionRelations))
  487. '
  488. ' - - - - - - - -
  489. '
  490. ' CREATE VIEW dbo.VIEW_Contra_Remained_BankRows_0033624050
  491. ' AS
  492. ' SELECT autoKey, CheqNo, [Date] COLLATE SQL_Latin1_General_CP1_CI_AS AS [Date], isDebit, Amount, DescCode, AccountNo
  493. ' FROM dbo.BankLog
  494. ' WHERE (AccountNo = 0033624050) AND (autoKey NOT IN
  495. ' (SELECT BankLogID
  496. ' FROM BankContradictionRelations))
  497. '
  498. GLRowsViewName = "VIEW_Contra_Remained_GLRows_" & openGL & "_" & BankGLAccount
  499. BankRowsViewName = "VIEW_Contra_Remained_BankRows_" & BankAccountNo
  500. 'Creating Temporary Table
  501. mySQL="DELETE FROM BankContradiction_TempDates"
  502. Conn.Execute(mySQL)
  503. mySQL="INSERT INTO BankContradiction_TempDates ([Date], MaxRows) SELECT LEFT(ISNULL(GLRowDates.[Date], '') + ISNULL(BankLogDates.[Date], ''), 10) AS [date], CASE WHEN ISNULL(GLRowDates.CntGLRow, 0) > ISNULL(BankLogDates.CntBankLog, 0) THEN GLRowDates.CntGLRow ELSE BankLogDates.CntBankLog END AS MaxRows FROM (SELECT [Date], COUNT(*) AS CntGLRow FROM " & GLRowsViewName & " GROUP BY [Date]) GLRowDates FULL OUTER JOIN (SELECT [Date], COUNT(*) AS CntBankLog FROM " & BankRowsViewName & " GROUP BY [Date]) BankLogDates ON GLRowDates.[Date] = BankLogDates.[Date] WHERE (LEFT(ISNULL(GLRowDates.[Date], '') + ISNULL(BankLogDates.[Date], ''), 10) >= '" & StartDate & "') AND (LEFT(ISNULL(GLRowDates.[Date], '') + ISNULL(BankLogDates.[Date], ''), 10) <= '" & EndDate & "') ORDER BY GLRowDates.[Date]"
  504. Conn.Execute(mySQL)
  505. %>
  506. <table align=center>
  507. <tr>
  508. <td valign=top>
  509. <!-- GL Rows -->
  510. <TABLE cellpadding=2 cellspacing=1 border=1 width=350>
  511. <TR>
  512. <TD colspan=5><B> <%=BankGLAccount%></B></TD>
  513. </TR>
  514. <%
  515. mySQL="SELECT BankContradiction_TempDates.[Date] AS BaseDate, BankContradiction_TempDates.MaxRows, " & GLRowsViewName & ".* FROM BankContradiction_TempDates LEFT OUTER JOIN " & GLRowsViewName & " ON BankContradiction_TempDates.[Date] = " & GLRowsViewName & ".[Date] ORDER BY BankContradiction_TempDates.[Date], " & GLRowsViewName & ".IsCredit DESC, " & GLRowsViewName & ".Amount"
  516. Set RSDates = Conn.Execute(mySQL)
  517. if NOT RSDates.eof then
  518. RemainedRows = 0
  519. BaseDate = ""
  520. TempCount = 1
  521. Do While NOT RSDates.eof
  522. RowsCount = clng(RSDates("MaxRows"))
  523. if BaseDate = RSDates("BaseDate") then
  524. RemainedRows = RemainedRows - 1
  525. TempCount = TempCount + 1
  526. else
  527. Call WriteBlankRows (RemainedRows)
  528. %>
  529. <TR class="dateLine">
  530. <TD colspan=5><%=showDate(RSDates("BaseDate"))%></TD>
  531. </TR>
  532. <%
  533. RemainedRows = RowsCount - 1
  534. TempCount = 1
  535. end if
  536. if not isnull(RSDates("ID")) then
  537. if RSDates("isCredit") then
  538. Debit="&nbsp;"
  539. Credit=Separate(RSDates("Amount"))
  540. else
  541. Debit=Separate(RSDates("Amount"))
  542. Credit="&nbsp;"
  543. end if
  544. %>
  545. <TR height="20">
  546. <TD width=30><%=RSDates("GLDocID")%></TD>
  547. <TD title="<%=RSDates("Description")%>" style="cursor:col-resize;"><%=Left(RSDates("Description"),20) & ".."%></TD>
  548. <TD width=70><%=Debit%></TD>
  549. <TD width=70><%=Credit%></TD>
  550. <TD width=20 style="cursor:crosshair;" onclick="slctGLRow(this)">
  551. <input type="hidden" Value="<%=RSDates("ID")%>">
  552. </TD>
  553. </TR>
  554. <%
  555. else
  556. Call WriteBlankRows (1)
  557. End if
  558. BaseDate = RSDates("BaseDate")
  559. RSDates.moveNext
  560. Loop
  561. end if
  562. RSDates.close
  563. Call WriteBlankRows (RemainedRows)
  564. %>
  565. </TABLE>
  566. </td>
  567. <td></td>
  568. <td valign=top>
  569. <!-- Bank Rows -->
  570. <TABLE cellpadding=2 cellspacing=1 border=1 width=350>
  571. <TR>
  572. <TD colspan=5><B> </B></TD>
  573. </TR>
  574. <%
  575. mySQL = "SELECT BankContradiction_TempDates.[Date] AS BaseDate, BankContradiction_TempDates.MaxRows, " & BankRowsViewName & ".* FROM BankContradiction_TempDates LEFT OUTER JOIN " & BankRowsViewName & " ON BankContradiction_TempDates.[Date] = " & BankRowsViewName & ".[Date] ORDER BY BankContradiction_TempDates.[Date], " & BankRowsViewName & ".isDebit, " & BankRowsViewName & ".Amount"
  576. Set RSDates = Conn.Execute(mySQL)
  577. if NOT RSDates.eof then
  578. RemainedRows = 0
  579. BaseDate = ""
  580. TempCount = 1
  581. Do While NOT RSDates.eof
  582. RowsCount = clng(RSDates("MaxRows"))
  583. if BaseDate = RSDates("BaseDate") then
  584. RemainedRows = RemainedRows - 1
  585. TempCount = TempCount + 1
  586. else
  587. Call WriteBlankRows (RemainedRows)
  588. %>
  589. <TR class="dateLine">
  590. <TD colspan=5><%=showDate(RSDates("BaseDate"))%></TD>
  591. </TR>
  592. <%
  593. RemainedRows = RowsCount - 1
  594. TempCount = 1
  595. end if
  596. if not isnull(RSDates("AutoKey")) then
  597. 'crosshair
  598. if RSDates("isDebit") then
  599. Debit=Separate(cdbl(RSDates("Amount")))
  600. Credit="&nbsp;"
  601. else
  602. Debit="&nbsp;"
  603. Credit=Separate(cdbl(RSDates("Amount")))
  604. end if
  605. %>
  606. <TR height="20">
  607. <TD width=20 style="cursor:crosshair;" onclick="slctBnkRow(this)">
  608. <input type="hidden" Value="<%=RSDates("AutoKey")%>">
  609. </TD>
  610. <TD width=80 style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:col-resize;"><NoBr><%=lookupDescCode(BankType,RSDates("DescCode"))%></NoBr></TD>
  611. <TD width=70><%=Debit%></TD>
  612. <TD width=70><%=Credit%></TD>
  613. <TD width=30><%=RSDates("CheqNo")%></TD>
  614. </TR>
  615. <%
  616. else
  617. Call WriteBlankRows (1)
  618. End if
  619. BaseDate = RSDates("BaseDate")
  620. RSDates.moveNext
  621. Loop
  622. end if
  623. RSDates.close
  624. Call WriteBlankRows (RemainedRows)
  625. %>
  626. </TABLE>
  627. </td>
  628. </tr>
  629. <tr height="5">
  630. <td align='center' colspan="3">
  631. <table>
  632. <tr>
  633. <td>
  634. <FORM METHOD=POST ACTION="?act=submitRelations&StartDate=<%=Server.URLEncode(StartDate)%>&EndDate=<%=Server.URLEncode(EndDate)%>&BankGLAccount=<%=Server.URLEncode(BankGLAccount)%>&NextAct=showRemained">
  635. <span id="Relations"></span>
  636. <INPUT TYPE="submit" value=" " class="GenButton" onclick="this.disabled=true;submit();">
  637. </FORM>
  638. </td>
  639. <td>
  640. <FORM METHOD=POST ACTION="?act=autoRelate&StartDate=<%=Server.URLEncode(StartDate)%>&EndDate=<%=Server.URLEncode(EndDate)%>&BankGLAccount=<%=Server.URLEncode(BankGLAccount)%>&NextAct=showRemained">
  641. <INPUT TYPE="submit" value=" " class="GenButton" onclick="this.disabled=true;submit();">
  642. </FORM>
  643. </td>
  644. <td>
  645. <FORM METHOD=POST ACTION="?act=showAll&StartDate=<%=Server.URLEncode(StartDate)%>&EndDate=<%=Server.URLEncode(EndDate)%>&BankGLAccount=<%=Server.URLEncode(BankGLAccount)%>&NextAct=showRemained">
  646. <INPUT TYPE="submit" value=" " class="GenButton" onclick="this.disabled=true;submit();">
  647. </FORM>
  648. </td>
  649. </tr>
  650. </table>
  651. </td>
  652. </tr>
  653. </table>
  654. <script language="JavaScript">
  655. <!--
  656. //---------------------------------------------
  657. var slctRowClr='#FFFF00'
  658. var rltdRowClr='#99FF88'
  659. var sRltdRowClr='#9988FF'
  660. var slctdGLRow = null
  661. var slctdBnkRow = null
  662. var numRelations=1;
  663. //---------------------------------------------
  664. function DslctGLRow(src){
  665. if (src){
  666. src.parentNode.setAttribute("bgColor","");
  667. }
  668. }
  669. function slctGLRow(src){
  670. DslctGLRow(slctdGLRow)
  671. if (slctdGLRow == src){
  672. if (confirm(" Ͽ\n")){
  673. relate(true);
  674. return;
  675. }
  676. slctdGLRow = null
  677. }
  678. else{
  679. slctdGLRow = src
  680. src.parentNode.setAttribute("bgColor",slctRowClr)
  681. relate(false);
  682. }
  683. }
  684. //---------------------------------------------
  685. function DslctBnkRow(src){
  686. if (src){
  687. src.parentNode.setAttribute("bgColor","");
  688. }
  689. }
  690. function slctBnkRow(src){
  691. DslctBnkRow(slctdBnkRow)
  692. if (slctdBnkRow == src){
  693. if (confirm(" Ͽ\n")){
  694. relate(true);
  695. return;
  696. }
  697. slctdBnkRow = null
  698. }
  699. else{
  700. slctdBnkRow = src
  701. src.parentNode.setAttribute("bgColor",slctRowClr)
  702. relate(false);
  703. }
  704. }
  705. //---------------------------------------------
  706. function relate(singleRow){
  707. var BnkRow=0;
  708. var GLRow=0;
  709. var desc='';
  710. var tmpDlgTxt= new Object();
  711. tmpDlgTxt.value = ' : ';
  712. if (singleRow)
  713. {
  714. if (slctdBnkRow){
  715. BnkRow = slctdBnkRow.getElementsByTagName("input")[0].value
  716. slctdBnkRow.setAttribute("bgColor",sRltdRowClr)
  717. slctdBnkRow.innerHTML+=numRelations
  718. }
  719. else if (slctdGLRow){
  720. GLRow = slctdGLRow.getElementsByTagName("input")[0].value
  721. slctdGLRow.setAttribute("bgColor",sRltdRowClr)
  722. slctdGLRow.innerHTML+=numRelations
  723. }
  724. }
  725. else if (slctdBnkRow && slctdGLRow){
  726. BnkRow = slctdBnkRow.getElementsByTagName("input")[0].value
  727. GLRow = slctdGLRow.getElementsByTagName("input")[0].value
  728. slctdBnkRow.setAttribute("bgColor",rltdRowClr)
  729. slctdBnkRow.innerHTML+=numRelations
  730. slctdGLRow.setAttribute("bgColor",rltdRowClr)
  731. slctdGLRow.innerHTML+=numRelations
  732. }
  733. else{
  734. return;
  735. }
  736. dialogActive=true
  737. window.showModalDialog('../dialog_GenInput.asp',tmpDlgTxt,'dialogHeight:200px; dialogWidth:440px; dialogTop:; dialogLeft:; edge:None; center:Yes; help:No; resizable:No; status:No;');
  738. dialogActive=false
  739. desc=tmpDlgTxt.value
  740. numRelations++;
  741. document.getElementById("Relations").innerHTML+="<input type='hidden' name='BnkRow' value='"+BnkRow+"'>"
  742. document.getElementById("Relations").innerHTML+="<input type='hidden' name='GLRow' value='"+GLRow+"'>"
  743. document.getElementById("Relations").innerHTML+="<input type='hidden' name='Desc' value='"+escape(desc.replace("'","`"))+"'>"
  744. DslctBnkRow(slctdBnkRow)
  745. DslctBnkRow(slctdGLRow)
  746. slctdBnkRow = null
  747. slctdGLRow = null
  748. }
  749. //-->
  750. </script>
  751. <%
  752. elseif request("act")="autoRelate" then
  753. '----- Check GL is closed
  754. if (session("IsClosed")="True") then
  755. Conn.close
  756. response.redirect "?errMsg=" & Server.URLEncode("! .")
  757. end if
  758. '----
  759. StartDate = request.QueryString("StartDate")
  760. EndDate = request.QueryString("EndDate")
  761. BankGLAccount = cint(request.QueryString("BankGLAccount"))
  762. BankAccountNo = clng(lookupBankAccountNo(BankGLAccount))
  763. ' Type 1: Amount + Date + CheqNo
  764. mySQL="INSERT INTO BankContradictionRelations (BankLogID, GLRowID, Description, Type, CreatedBy, CreatedDate, CreatedTime) SELECT BankLog.autoKey AS BankLogID, RemainedGLRows.GLRowID, '' AS Description, 1 AS Type, '" & session ("ID") & "' AS CreatedBy, '" & shamsiToday() & "' AS CreatedDate, '" & currentTime10() & "' AS CreatedTime FROM BankLog INNER JOIN (SELECT ID AS GLRowID, CONVERT(bigint, Ref1) AS CheqNo, GLDocDate AS [Date], 1 - IsCredit AS IsDebit, Amount FROM dbo.EffectiveGLRows WHERE (GL = " & openGL & ") AND (GLAccount = " & BankGLAccount & ") AND (ID NOT IN (SELECT GLRowID FROM BankContradictionRelations))) RemainedGLRows ON BankLog.[Date] = RemainedGLRows.[Date] COLLATE Arabic_CI_AS AND BankLog.Amount = RemainedGLRows.Amount AND BankLog.isDebit = RemainedGLRows.IsDebit AND BankLog.CheqNo = RemainedGLRows.CheqNo WHERE (BankLog.AccountNo = " & BankAccountNo & ")"
  765. Conn.Execute(mySQL)
  766. response.write "Type 1: OK<BR><BR>"
  767. ' Type 2: Amount + Date + CheqNo
  768. mySQL="INSERT INTO BankContradictionRelations (BankLogID, GLRowID, Description, Type, CreatedBy, CreatedDate, CreatedTime) SELECT BankLog.autoKey AS BankLogID, RemainedGLRows.GLRowID, '' AS Description, 2 AS Type, '" & session ("ID") & "' AS CreatedBy, '" & shamsiToday() & "' AS CreatedDate, '" & currentTime10() & "' AS CreatedTime FROM BankLog INNER JOIN (SELECT ID AS GLRowID, CONVERT(bigint, Ref1) AS CheqNo, 1 - IsCredit AS IsDebit, Amount FROM dbo.EffectiveGLRows WHERE (GL = " & openGL & ") AND (GLAccount = " & BankGLAccount & ") AND (ID NOT IN (SELECT GLRowID FROM BankContradictionRelations))) RemainedGLRows ON BankLog.Amount = RemainedGLRows.Amount AND BankLog.isDebit = RemainedGLRows.IsDebit AND BankLog.CheqNo = RemainedGLRows.CheqNo WHERE (BankLog.AccountNo = " & BankAccountNo & ")"
  769. Conn.Execute(mySQL)
  770. response.write "Type 2: OK<BR><BR>"
  771. ' Type 3: Amount + Date
  772. mySQL="INSERT INTO BankContradictionRelations (BankLogID, GLRowID, Description, Type, CreatedBy, CreatedDate, CreatedTime) SELECT BankLog.autoKey AS BankLogID, RemainedGLRows.GLRowID, '' AS Description, 3 AS Type, '" & session ("ID") & "' AS CreatedBy, '" & shamsiToday() & "' AS CreatedDate, '" & currentTime10() & "' AS CreatedTime FROM BankLog INNER JOIN (SELECT ID AS GLRowID, GLDocDate AS [Date], 1 - IsCredit AS IsDebit, Amount FROM dbo.EffectiveGLRows WHERE (GL = " & openGL & ") AND (GLAccount = " & BankGLAccount & ") AND (ID NOT IN (SELECT GLRowID FROM BankContradictionRelations))) RemainedGLRows ON BankLog.[Date] = RemainedGLRows.[Date] COLLATE Arabic_CI_AS AND BankLog.Amount = RemainedGLRows.Amount AND BankLog.isDebit = RemainedGLRows.IsDebit WHERE (BankLog.AccountNo = " & BankAccountNo & ")"
  773. Conn.Execute(mySQL)
  774. response.write "Type 3: OK<BR><BR>"
  775. response.redirect "?act=" & request("NextAct") & "&StartDate=" & Server.URLEncode(StartDate) & "&EndDate=" & Server.URLEncode(EndDate) & "&BankGLAccount=" & Server.URLEncode(BankGLAccount) & "&msg=" & Server.URLEncode(" .")
  776. elseif request("act")="submitRelations" then
  777. StartDate = request.QueryString("StartDate")
  778. EndDate = request.QueryString("EndDate")
  779. BankGLAccount = cint(request.QueryString("BankGLAccount"))
  780. for i=1 to request.form("BnkRow").count
  781. BankRow = cdbl(request.form("BnkRow")(i))
  782. GLRow = cdbl(request.form("GLRow")(i))
  783. Desc = unescape(request.form("Desc")(i))
  784. ' Type = 9 Means Manual
  785. mySQL="INSERT INTO BankContradictionRelations (BankLogID, GLRowID, Description, Type, CreatedBy, CreatedDate, CreatedTime) VALUES " &_
  786. "('"& BankRow & "', '"& GLRow & "', N'"& sqlSafe(Desc) & "', '9', '"& session("ID") & "', '"& ShamsiToday() & "', '"& currentTime10() & "')"
  787. conn.Execute(mySQL)
  788. next
  789. response.redirect "?act=" & request("NextAct") & "&StartDate=" & Server.URLEncode(StartDate) & "&EndDate=" & Server.URLEncode(EndDate) & "&BankGLAccount=" & Server.URLEncode(BankGLAccount) & "&msg=" & Server.URLEncode(" .")
  790. elseif request("act")="delRelations" then
  791. StartDate = request.QueryString("StartDate")
  792. EndDate = request.QueryString("EndDate")
  793. BankGLAccount = cint(request.QueryString("BankGLAccount"))
  794. for i=1 to request.form("BnkRow").count
  795. BankRow = cdbl(request.form("BnkRow")(i))
  796. mySQL="DELETE FROM BankContradictionRelations WHERE (BankLogID='" & BankRow & "')"
  797. conn.Execute(mySQL)
  798. next
  799. for i=1 to request.form("GLRow").count
  800. GLRow = cdbl(request.form("GLRow")(i))
  801. mySQL="DELETE FROM BankContradictionRelations WHERE (GLRowID='" & GLRow & "')"
  802. conn.Execute(mySQL)
  803. next
  804. response.redirect "?act=" & request("NextAct") & "&StartDate=" & Server.URLEncode(StartDate) & "&EndDate=" & Server.URLEncode(EndDate) & "&BankGLAccount=" & Server.URLEncode(BankGLAccount) & "&msg=" & Server.URLEncode(" .")
  805. '-----------------------------------------------------------------------------------------------------
  806. '----------------------------------------------------------------------------- Get parameters and file
  807. '-----------------------------------------------------------------------------------------------------
  808. elseif request("act")="" then
  809. %>
  810. <input type="hidden" Name='tmpDlgArg' value=''>
  811. <input type="hidden" Name='tmpDlgTxt' value=''>
  812. <FORM METHOD=POST ACTION="?act=showRemained" onsubmit="return isEmpty()" ENCTYPE="multipart/form-data">
  813. <TABLE align=center style="border:1pt solid white">
  814. <TR>
  815. <TD>
  816. :
  817. </TD>
  818. <TD>
  819. <INPUT class="GenInput" style='direction:LTR;text-align:left;' NAME="StartDate" TYPE="text" maxlength="10" size="10" value="<%=Session("OpenGLStartDate")%>" onblur="acceptDate(this)">
  820. </TD>
  821. </TR>
  822. <TR>
  823. <TD>
  824. :
  825. </TD>
  826. <TD>
  827. <INPUT class="GenInput" style='direction:LTR;text-align:left;' NAME="EndDate" TYPE="text" maxlength="10" size="10" value="<%=shamsiToday()%>" onblur="acceptDate(this)">
  828. </TD>
  829. </TR>
  830. <TR>
  831. <TD>
  832. :
  833. </TD>
  834. <TD>
  835. <select name="BankGLAccount" class=inputBut style="width:200; ">
  836. <option value="-1"> </option>
  837. <option value="12001">12001 - 24050 ()</option>
  838. <option value="12004">12004 - 24816 ()</option>
  839. <option value="12002">12002 - Ӂ 4344/19 ()</option>
  840. </select>
  841. </TD>
  842. </TR>
  843. <TR>
  844. <TD> </TD>
  845. <TD>
  846. <INPUT TYPE="FILE" NAME="LogFile" class=inputBut style="width:200; ">
  847. </TD>
  848. </TR>
  849. <TR>
  850. <TD colspan='2' height='2' ><hr></TD>
  851. </TR>
  852. <TR>
  853. <TD colspan='2' align='center'>
  854. <INPUT TYPE="submit" value=" " class='GenButton' onclick="this.disabled=true;submit();"><br><br>
  855. </TD>
  856. </TR>
  857. </TABLE>
  858. </FORM>
  859. <BR><BR>
  860. <SCRIPT LANGUAGE="JavaScript">
  861. <!--
  862. var dialogActive=false;
  863. function isEmpty()
  864. {
  865. Bank = document.all.BankGLAccount.value
  866. if(Bank==-1){
  867. alert("! ")
  868. return false
  869. }
  870. else{
  871. return true;
  872. }
  873. }
  874. //-->
  875. </SCRIPT>
  876. <%
  877. end if
  878. %>
  879. <!--#include file="tah.asp" -->