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

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