/beta/bank/CheqMoeen.asp

http://github.com/khaneh/Orders · ASP · 486 lines · 419 code · 54 blank · 13 comment · 51 complexity · c7b9714dfd911680c735ef81667f25c2 MD5 · raw file

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%><%
  2. 'Bank (10 [=A])
  3. PageTitle= " "
  4. SubmenuItem=6
  5. if not Auth("A" , 6) then NotAllowdToViewThisPage()
  6. %>
  7. <!--#include file="top.asp" -->
  8. <!--#include File="../include_farsiDateHandling.asp"-->
  9. <!--#include File="../include_JS_InputMasks.asp"-->
  10. <style>
  11. .RcpTable { font-family:tahoma; font-size: 9pt; border:0; padding:0; }
  12. .RcpMainTable { font-family:tahoma; font-size: 9pt; border:0; padding:0; background-color: #558855; text-align:right; direction: right-to-left;}
  13. .RcpMainTableTH { background-color: #C3C300;}
  14. .RcpMainTableTR { background-color: #CCCC88; border: 0; }
  15. .RcpRowInput { font-family:tahoma; font-size: 9pt; border: none; background-color: #F0F0F0; text-align:right;}
  16. .RcpRowInput2 { font-family:tahoma; font-size: 9pt; border: 1px solid black; background-color: #F0F0F0; text-align:right;}
  17. .RcpHeadInput { font-family:tahoma; font-size: 9pt; border: none; background-color: #CCCC88; text-align:center;}
  18. .RcpHeadInput2 { font-family:tahoma; font-size: 9pt; border: none; background-color: #AACC77; text-align:center;}
  19. .RcpHeadInput3 { font-family:tahoma; font-size: 9pt; border: 1px solid black; background-color: #D0E0FF; text-align:right; direction: right-to-left;}
  20. .RcpGenInput { font-family:tahoma; font-size: 9pt; border: none; text-align:right; direction: left-to-righ;}
  21. .GenButton { font-family:tahoma; font-size: 9pt; border: 1px solid black; }
  22. .CustGenTable { font-family:tahoma; font-size: 9pt;}
  23. .CustGenInput { font-family:tahoma; font-size: 9pt;}
  24. </STYLE>
  25. <%
  26. '---------------------------------------------
  27. '---------------------------- ShowErrorMessage
  28. '---------------------------------------------
  29. function ShowErrorMessage(msg)
  30. response.write "<table align='center' cellpadding='5'><tr><td bgcolor='#FFCCCC' dir='rtl' align='center'> ! <br>"& msg & "<br></td></tr></table><br>"
  31. end function
  32. '-----------------------------------------------------------------------------------------------------
  33. '------------------------------------------------------------------------------------- Submit Transfer
  34. '-----------------------------------------------------------------------------------------------------
  35. if request("act")="submit" then
  36. accountID = request.form("accountID")
  37. accountName = request.form("accountName")
  38. GLMemoDate = request.form("GLMemoDate")
  39. '----- Check GL is closed
  40. if (session("IsClosed")="True") then
  41. Conn.close
  42. response.redirect "?errMsg=" & Server.URLEncode("! .")
  43. end if
  44. '----
  45. creationDate =shamsiToday()
  46. CreationTime = currentTime10()
  47. if GLMemoDate="" or not(isnumeric(accountID)) then
  48. call showAlert( "! " , CONST_MSG_ERROR )
  49. response.end
  50. end if
  51. for cheques = 1 to request.form("ChequeNos").count
  52. Item = request.form("Items")(cheques)
  53. accTitle = request.form("accTitles")(cheques)
  54. ChequeNo = request.form("ChequeNos")(cheques)
  55. ChequeDate = request.form("ChequeDates")(cheques)
  56. Bank = request.form("Banks")(cheques)
  57. shobe = request.form("shobe")(cheques)
  58. jaari = request.form("jaari")(cheques)
  59. Description = request.form("Description")(cheques)
  60. Amount = text2value(request.form("Amounts")(cheques))
  61. if ChequeNo="" or ChequeDate="" or Amount="0" or not(isnumeric(amount)) then
  62. call showAlert( "! " , CONST_MSG_ERROR )
  63. response.end
  64. end if
  65. next
  66. mySQL="SELECT ISNULL(MAX(GLDocID),0) AS LastMemo FROM GLDocs WHERE GL='"& OpenGL & "'"
  67. Set RS1=conn.Execute (mySQL)
  68. GLMemoNo = RS1("LastMemo") + 1
  69. mySQL="INSERT INTO GLDocs (GL, GLDocID, GLDocDate, CreatedDate, createdBy, IsTemporary) VALUES ("& OpenGL& " , "& GLMemoNo & ", N'"& GLMemoDate & "' , N'"& creationDate & "', "& session("id") & ", 1)"
  70. conn.Execute(mySQL)
  71. mySQL="SELECT max(ID) as GLDoc FROM GLDocs where GLDocID="& GLMemoNo
  72. set RS1=conn.execute(mySQL)
  73. GLDoc=RS1("GLDoc")
  74. for cheques = 1 to request.form("ChequeNos").count
  75. Item = request.form("Items")(cheques)
  76. accTitle = request.form("accTitles")(cheques)
  77. ChequeNo = request.form("ChequeNos")(cheques)
  78. ChequeDate = request.form("ChequeDates")(cheques)
  79. Bank = request.form("Banks")(cheques)
  80. shobe = request.form("shobe")(cheques)
  81. jaari = request.form("jaari")(cheques)
  82. Description = request.form("Description")(cheques)
  83. Amount = text2value(request.form("Amounts")(cheques))
  84. if jaari<> "" then jaari=" " & jaari
  85. if Bank = -1 then Bank = ""
  86. theDescription = " " & ChequeNo & " " & ChequeDate & " " & Bank & " " & shobe & " " & jaari & " " & Description
  87. mySQL="INSERT INTO GLRows ( GLDoc, GLAccount, Amount, Description, IsCredit, Ref1, Ref2) VALUES ( "& GLDoc & ", "& Item & ", "& Amount & ", N'"& theDescription & "', 1, N'"& ChequeNo &"', N'"& ChequeDate &"')"
  88. conn.Execute(mySQL)
  89. mySQL="INSERT INTO GLRows ( GLDoc, GLAccount, Amount, Description, IsCredit, Ref1, Ref2) VALUES ( "& GLDoc & ", "& accountID & ", "& Amount & ", N'"& theDescription & " " & accTitle & "', 0, N'"& ChequeNo &"' , N'"& ChequeDate &"')"
  90. conn.Execute(mySQL)
  91. next
  92. response.redirect "../accounting/GLMemoDocShow.asp?id="&GLDoc&"&msg= "
  93. 'response.write replace(request.form,"&", "<br>")
  94. response.end
  95. '-----------------------------------------------------------------------------------------------------
  96. '---------------------------------------------------------------------------------------- Search Form
  97. '-----------------------------------------------------------------------------------------------------
  98. elseif request("act")="" then
  99. %>
  100. <BR><BR>
  101. <input type="hidden" Name='tmpDlgArg' value=''>
  102. <input type="hidden" Name='tmpDlgTxt' value=''>
  103. <FORM METHOD=POST ACTION="?act=submit">
  104. <table class="RcpMainTable" Cellspacing="1" Cellpadding="0" Width="690" align="center">
  105. <tr class="RcpMainTableTH">
  106. <TD colspan="10"><TABLE class="RcpTable" Border="0" Width="100%" Cellspacing="1" Cellpadding="0" Dir="RTL"><TR>
  107. <TD align="left">:</TD>
  108. <TD align="right" width="5">
  109. <INPUT class="RcpGenInput" TYPE="text" maxlength="5" size="5" tabIndex="1" dir="LTR" name="accountID" onKeyPress='return maskTop(this);' onBlur='checkTop(this);' >
  110. </TD>
  111. <TD align="right">
  112. <INPUT TYPE="text" NAME="accountName" size=40 readonly value="<%=accountName%>" style="background-color:transparent; border:0pt">
  113. </TD>
  114. <TD align="left">:</TD>
  115. <TD><TABLE class="RcpTable">
  116. <TR>
  117. <TD dir="LTR">
  118. <INPUT class="RcpGenInput" NAME="GLMemoDate" tabIndex="1" TYPE="text" maxlength="10" size="10" value="<%=shamsiToday()%>" onblur="acceptDate(this)">
  119. </TD>
  120. <TD dir="RTL">: <font color=white><%=weekdayname(weekday(date))%> <span dir=rtl><%=shamsiToday()%></span></font></TD>
  121. </TR>
  122. </TABLE></TD>
  123. </TR></TABLE></TD>
  124. </tr>
  125. <tr class="RcpMainTableTR">
  126. <TD colspan="10"><div>
  127. <TABLE class="RcpTable" Cellspacing="1" Cellpadding="0" Dir="RTL" bgcolor="#558855">
  128. <tr>
  129. <td class="RcpHeadInput" align='center' width="25px"> # </td>
  130. <td class="RcpHeadInput"><INPUT class="RcpHeadInput" readonly TYPE="text" value="" size="6" tabindex="9999"></td>
  131. <td class="RcpHeadInput"><INPUT class="RcpHeadInput" readonly TYPE="text" value="" size="14" tabindex="9999"></td>
  132. <td class="RcpHeadInput"><INPUT class="RcpHeadInput" readonly TYPE="text" value=" " size="10" tabindex="9999"></td>
  133. <td class="RcpHeadInput"><INPUT class="RcpHeadInput" readonly TYPE="text" value=" " size="10" tabindex="9999"></td>
  134. <td class="RcpHeadInput"><INPUT class="RcpHeadInput" readonly TYPE="text" Value="" size="8" tabindex="9999"></td>
  135. <td class="RcpHeadInput"><INPUT class="RcpHeadInput" readonly TYPE="text" Value="" size="8" tabindex="9999"></td>
  136. <td class="RcpHeadInput"><INPUT class="RcpHeadInput" readonly TYPE="text" Value="" size="8" tabindex="9999"></td>
  137. <td class="RcpHeadInput"><INPUT class="RcpHeadInput" readonly TYPE="text" Value="" size="16" tabindex="9999" ></td>
  138. <td class="RcpHeadInput"><INPUT class="RcpHeadInput" readonly TYPE="text" Value="" size="10" tabindex="9999" ></td>
  139. </tr>
  140. </TABLE></div></TD>
  141. </TR>
  142. <tr class="RcpMainTableTR">
  143. <TD colspan="10" dir="RTL"><div style="overflow:auto; height:250px;width:690px;">
  144. <TABLE class="RcpTable" Border="0" Cellspacing="1" Cellpadding="0" Dir="RTL" bgcolor="#558855">
  145. <Tbody id="ChequeLines">
  146. <%
  147. for i=1 to 1
  148. %>
  149. <tr bgcolor='#F0F0F0' onclick="currentRow=this.rowIndex;" >
  150. <td align='center' width="25px"> <%=i%> </td>
  151. <td dir="LTR"><INPUT class="RcpRowInput" TYPE="text" NAME="Items" maxlength="5" size="5" onKeyPress="return mask(this);" tabIndex="2" onBlur='check(this);'></td>
  152. <td dir="RTL"><INPUT class="RcpRowInput" TYPE="text" NAME="accTitles" size="14" onKeyPress="return mask(this);" tabIndex="9999" readonly></td>
  153. <td dir="LTR"><INPUT class="RcpRowInput" TYPE="text" NAME="ChequeNos" size="10" onKeyPress="return mask(this);" tabIndex="2" ></td>
  154. <td dir="LTR" ><INPUT class="RcpRowInput" TYPE="text" NAME="ChequeDates" maxlength="10" size="10" onKeyPress="return maskDate(this);" onblur="acceptDate(this)" tabIndex="2"></td>
  155. <td dir="RTL">
  156. <select name="Banks" class=inputBut style="width:60; " tabIndex="2">
  157. <option value="-"> </option>
  158. <option value="-">---------------------------------</option>
  159. <option value=""> </option>
  160. <option value=""> </option>
  161. <option value=""> </option>
  162. <option value="Ӂ"> Ӂ </option>
  163. <option value=""> </option>
  164. <option value=""> </option>
  165. <option value=""> </option>
  166. <option value=""> </option>
  167. <option value=""> </option>
  168. <option value=""> </option>
  169. <option value=""> </option>
  170. <option value=""> </option>
  171. </select>
  172. </td>
  173. <td dir="RTL"><INPUT class="RcpRowInput" TYPE="text" NAME="shobe" size="8" tabIndex="2"></td>
  174. <td dir="RTL"><INPUT class="RcpRowInput" TYPE="text" NAME="jaari" size="8" tabIndex="2"></td>
  175. <td dir="RTL"><INPUT class="RcpRowInput" TYPE="text" NAME="Description" size="16" tabIndex="2"></td>
  176. <td dir="LTR"><INPUT class="RcpRowInput" TYPE="text" NAME="Amounts" size="10" onKeyPress="return mask(this);" onBlur="setPrice(this);" tabIndex="2"></td>
  177. </tr>
  178. <%
  179. next
  180. %>
  181. <tr bgcolor='#F0F0F0' onclick="currentRow=this.rowIndex;" >
  182. <td colspan="15">
  183. <INPUT class="RcpGenInput" TYPE="button" value="" onkeyDown="if(event.keyCode==9) return false;" tabIndex="3" onClick="addRow(this.parentNode.parentNode.rowIndex);">
  184. </td>
  185. </tr>
  186. </Tbody></TABLE></div>
  187. <div ALIGN=LEFT>
  188. <TABLE Border="1" Cellspacing="1" Cellpadding="0" Dir="RTL">
  189. <tr>
  190. <td class="RcpHeadInput" align='center' >
  191. </td>
  192. <td class="RcpHeadInput" align='center' width="25px"> </td>
  193. <td class="RcpHeadInput"><INPUT class="RcpHeadInput" readonly TYPE="text" Value=":" size="10" tabindex="9999"></td>
  194. <td class="RcpHeadInput"><INPUT class="RcpHeadInput3" readonly dir="LTR" TYPE="text" Name="TotalAmount" size="15" tabindex="9999"></td>
  195. </tr>
  196. </TABLE></div></TD>
  197. </TR>
  198. </table><br><CENTER>
  199. <TABLE class="RcpTable" Border="0" Cellspacing="5" Cellpadding="1" Dir="RTL">
  200. <tr>
  201. <td align='center' bgcolor="#000000"><INPUT class="RcpGenInput" style="text-align:center" TYPE="button" value="" onclick="if (document.getElementsByName('TotalAmount')[0].value!='0') CheckAndSubmit();"></td>
  202. <td align='center' bgcolor="#000000"><INPUT class="RcpGenInput" style="text-align:center" TYPE="button" value="" onclick="document.close();"></td>
  203. </tr>
  204. </TABLE></CENTER>
  205. </FORM>
  206. <SCRIPT LANGUAGE="JavaScript">
  207. <!--
  208. document.all.accountID.focus();
  209. var dialogActive=false;
  210. //===================================================
  211. function maskTop(src){
  212. var theKey=event.keyCode;
  213. if (theKey==13){
  214. event.keyCode=9
  215. dialogActive=true
  216. document.all.tmpDlgArg.value="#"
  217. document.all.tmpDlgTxt.value=" :"
  218. var myTinyWindow = window.showModalDialog('../dialog_GenInput.asp',document.all.tmpDlgTxt,'dialogHeight:200px; dialogWidth:440px; dialogTop:; dialogLeft:; edge:None; center:Yes; help:No; resizable:No; status:No;');
  219. if (document.all.tmpDlgTxt.value !="") {
  220. var myTinyWindow = window.showModalDialog('../accounting/dialog_selectGL.asp?act=select&name='+escape(document.all.tmpDlgTxt.value),document.all.tmpDlgArg,'dialogHeight:500px; dialogWidth:380px; dialogTop:; dialogLeft:; edge:Raised; center:Yes; help:No; resizable:Yes; status:No;');
  221. dialogActive=false
  222. if (document.all.tmpDlgArg.value!="#"){
  223. Arguments=document.all.tmpDlgArg.value.split("#")
  224. src.value=Arguments[0];
  225. document.all.accountName.value=Arguments[1];
  226. }
  227. }
  228. }
  229. }
  230. //===================================================
  231. function checkTop(src){
  232. if (!dialogActive){
  233. badCode = false;
  234. if (window.XMLHttpRequest) {
  235. var objHTTP=new XMLHttpRequest();
  236. } else if (window.ActiveXObject) {
  237. var objHTTP = new ActiveXObject("Microsoft.XMLHTTP");
  238. }
  239. objHTTP.open('GET','../accounting/xml_GLAccount.asp?id='+src.value,false)
  240. objHTTP.send()
  241. tmpStr = unescape( objHTTP.responseText)
  242. document.all.accountName.value=tmpStr;
  243. }
  244. }
  245. //===================================================
  246. function mask(src){
  247. var theKey=event.keyCode;
  248. rowNo=src.parentNode.parentNode.rowIndex;
  249. invTable=document.getElementById("ChequeLines");
  250. theRow=invTable.getElementsByTagName("tr")[rowNo];
  251. if (src.name=="Items"){
  252. if (theKey==13){
  253. event.keyCode=9
  254. dialogActive=true
  255. document.all.tmpDlgArg.value="#"
  256. document.all.tmpDlgTxt.value=" :"
  257. var myTinyWindow = window.showModalDialog('../dialog_GenInput.asp',document.all.tmpDlgTxt,'dialogHeight:200px; dialogWidth:440px; dialogTop:; dialogLeft:; edge:None; center:Yes; help:No; resizable:No; status:No;');
  258. if (document.all.tmpDlgTxt.value !="") {
  259. var myTinyWindow = window.showModalDialog('../accounting/dialog_selectGL.asp?act=select&name='+escape(document.all.tmpDlgTxt.value),document.all.tmpDlgArg,'dialogHeight:500px; dialogWidth:380px; dialogTop:; dialogLeft:; edge:Raised; center:Yes; help:No; resizable:Yes; status:No;');
  260. dialogActive=false
  261. if (document.all.tmpDlgArg.value!="#"){
  262. Arguments=document.all.tmpDlgArg.value.split("#")
  263. src.value=Arguments[0];
  264. invTable.getElementsByTagName("tr")[rowNo].getElementsByTagName("td")[2].getElementsByTagName("Input")[0].value=Arguments[1];
  265. }
  266. invTable.getElementsByTagName("tr")[rowNo].getElementsByTagName("td")[3].getElementsByTagName("Input")[0].focus();
  267. }
  268. }
  269. else if (theKey >= 48 && theKey <= 57 ) {
  270. //alert(theKey)
  271. //src.value=''
  272. return true;
  273. }
  274. else {
  275. return false;
  276. }
  277. }
  278. }
  279. //===================================================
  280. function check(src){
  281. invTable=document.getElementById("ChequeLines");
  282. if (src.name=="Items"){
  283. rowNo=src.parentNode.parentNode.rowIndex;
  284. rowsCount=document.getElementsByName("Items").length;
  285. if (!dialogActive){
  286. if (src.value=='0' ){
  287. if (rowNo == 0 && rowsCount == 1) {
  288. src.focus();
  289. }
  290. else{
  291. if (confirm(" Ͽ")){
  292. delRow(rowNo);
  293. return false;
  294. }
  295. else{
  296. src.focus();
  297. }
  298. }
  299. }
  300. else {
  301. badCode = false;
  302. if (window.XMLHttpRequest) {
  303. var objHTTP=new XMLHttpRequest();
  304. } else if (window.ActiveXObject) {
  305. var objHTTP = new ActiveXObject("Microsoft.XMLHTTP");
  306. }
  307. objHTTP.open('GET','../accounting/xml_GLAccount.asp?id='+src.value,false)
  308. objHTTP.send()
  309. tmpStr = unescape( objHTTP.responseText)
  310. invTable.getElementsByTagName("tr")[rowNo].getElementsByTagName("td")[2].getElementsByTagName("Input")[0].value= tmpStr
  311. if (tmpStr==" ")
  312. {
  313. if (rowNo == 0 && rowsCount == 1) {
  314. src.focus();
  315. }
  316. else{
  317. if (confirm(" Ͽ")){
  318. delRow(rowNo);
  319. return false;
  320. }
  321. else{
  322. src.focus();
  323. }
  324. }
  325. }
  326. }
  327. }
  328. }
  329. }
  330. //===================================================
  331. function delRow(rowNo){
  332. chqTable=document.getElementById("ChequeLines");
  333. theRow=chqTable.getElementsByTagName("tr")[rowNo];
  334. chqTable.removeChild(theRow);
  335. for (rowNo=0; rowNo < document.getElementsByName("ChequeNos").length; rowNo++){
  336. chqTable.getElementsByTagName("tr")[rowNo].getElementsByTagName("td")[0].innerText= rowNo+1;
  337. }
  338. }
  339. //===================================================
  340. function addRow(rowNo){
  341. chqTable=document.getElementById("ChequeLines");
  342. theRow=chqTable.getElementsByTagName("tr")[rowNo];
  343. newRow=document.createElement("tr");
  344. newRow.setAttribute("bgColor", '#f0f0f0');
  345. tempTD=document.createElement("td");
  346. tempTD.innerHTML=rowNo+1
  347. tempTD.setAttribute("align", 'center');
  348. tempTD.setAttribute("width", '25');
  349. newRow.appendChild(tempTD);
  350. tempTD=document.createElement("td");
  351. tempTD.setAttribute("dir", 'LTR');
  352. tempTD.innerHTML='<INPUT class="RcpRowInput" TYPE="text" NAME="Items" maxlength="5" size="5" onKeyPress="return mask(this);" tabIndex="2" onBlur="check(this);">'
  353. newRow.appendChild(tempTD);
  354. tempTD=document.createElement("td");
  355. tempTD.setAttribute("dir", 'RTL');
  356. tempTD.innerHTML='<INPUT class="RcpRowInput" TYPE="text" NAME="accTitles" size="14" onKeyPress="return mask(this);" tabIndex="9999" readonly>'
  357. newRow.appendChild(tempTD);
  358. tempTD=document.createElement("td");
  359. tempTD.setAttribute("dir", 'LTR');
  360. tempTD.innerHTML='<INPUT class="RcpRowInput" TYPE="text" NAME="ChequeNos" size="10" onKeyPress="return mask(this);" tabIndex="2" >'
  361. newRow.appendChild(tempTD);
  362. tempTD=document.createElement("td");
  363. tempTD.setAttribute("dir", 'LTR');
  364. tempTD.innerHTML='<INPUT class="RcpRowInput" TYPE="text" NAME="ChequeDates" maxlength="10" size="10" onKeyPress="return maskDate(this);" onblur="acceptDate(this)" tabIndex="2">'
  365. newRow.appendChild(tempTD);
  366. tempTD=document.createElement("td");
  367. tempTD.setAttribute("dir", 'RTL');
  368. tempTD.innerHTML=chqTable.getElementsByTagName("tr")[0].getElementsByTagName("td")[5].innerHTML
  369. newRow.appendChild(tempTD);
  370. tempTD=document.createElement("td");
  371. tempTD.setAttribute("dir", 'RTL');
  372. tempTD.innerHTML='<INPUT class="RcpRowInput" TYPE="text" NAME="shobe" size="8" tabIndex="2">'
  373. newRow.appendChild(tempTD);
  374. tempTD=document.createElement("td");
  375. tempTD.setAttribute("dir", 'RTL');
  376. tempTD.innerHTML='<INPUT class="RcpRowInput" TYPE="text" NAME="jaari" size="8" tabIndex="2">'
  377. newRow.appendChild(tempTD);
  378. tempTD=document.createElement("td");
  379. tempTD.setAttribute("dir", 'RTL');
  380. tempTD.innerHTML='<INPUT class="RcpRowInput" TYPE="text" NAME="Description" size="16" tabIndex="2">'
  381. newRow.appendChild(tempTD);
  382. tempTD=document.createElement("td");
  383. tempTD.setAttribute("dir", 'LTR');
  384. tempTD.innerHTML='<INPUT class="RcpRowInput" TYPE="text" NAME="Amounts" size="10" onKeyPress="return mask(this);" onBlur="setPrice(this);" tabIndex="2">'
  385. newRow.appendChild(tempTD);
  386. chqTable.insertBefore(newRow,theRow);
  387. chqTable.getElementsByTagName("tr")[rowNo].getElementsByTagName("td")[1].getElementsByTagName("Input")[0].focus();
  388. }
  389. //===================================================
  390. function setPrice(src){
  391. myRow=src.parentNode.parentNode.rowIndex
  392. if (src.name=="Amounts" && document.getElementsByName("ChequeNos")[myRow].value==''){
  393. src.value=0;
  394. }
  395. else{
  396. src.value=val2txt(txt2val(src.value));
  397. }
  398. //cashAmount=parseInt(txt2val(document.getElementsByName("CashAmount")[0].value));
  399. //totalAmount = cashAmount;
  400. totalAmount = 0;
  401. for (rowNo=0; rowNo < document.getElementsByName("Amounts").length; rowNo++){
  402. totalAmount += parseInt(txt2val(document.getElementsByName("Amounts")[rowNo].value));
  403. }
  404. document.all.TotalAmount.value = val2txt(totalAmount);
  405. }
  406. //===================================================
  407. function CheckAndSubmit()
  408. {
  409. document.forms[0].submit()
  410. invTable=document.getElementById("ChequeLines");
  411. document.all.sss.value=document.forms[0].innerHTML
  412. //document.forms[0].submit()
  413. /*alert(joindocument.all.Items.value)
  414. return false
  415. if (document.all.Items.value=="" )
  416. {
  417. alert(" ")
  418. return false
  419. }
  420. else
  421. {
  422. document.forms[0].submit()
  423. return true
  424. }
  425. */
  426. }
  427. //-->
  428. </SCRIPT>
  429. <%
  430. end if
  431. %>
  432. <!--#include file="tah.asp" -->