PageRenderTime 33ms CodeModel.GetById 17ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/beta/purchase/relateInvItemsToPurchOrders.asp

http://github.com/khaneh/Orders
ASP | 491 lines | 416 code | 46 blank | 29 comment | 51 complexity | b0896fdcd434a84aad9e924e529c5247 MD5 | raw file
  1<%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%><%
  2'Purchase (4)
  3PageTitle="����� ���� ����� ��� ����� �� ����� ��� ����"
  4SubmenuItem=5
  5if not Auth(4 , 5) then NotAllowdToViewThisPage()
  6%>
  7<!--#include file="top.asp" -->
  8<!--#include File="../include_farsiDateHandling.asp"-->
  9<!--#include File="../include_JS_InputMasks.asp"-->
 10<style>
 11	.RcpMainTable { font-family:tahoma; font-size: 9pt; border: 2px solid white; padding:0; direction: RTL; width:700px;}
 12	.RcpMainTable Tr {Height:25px; border: 1px solid black;}
 13	.RcpMainTable Input { font-family:tahoma; font-size: 9pt; border: 1px solid gray; text-align:right; direction: LTR;}
 14	.RcpMainTable Select { font-family:tahoma; font-size: 9pt;}
 15
 16	.tblSearch {border: 1 solid #330099; padding:3; direction: RTL;}
 17	.tblSearch th {font-family:tahoma; font-size: 9pt; border-bottom: solid 1pt black; backGround-Color:#CCCC; text-align:center; font-weight:normal;}
 18	.tblSearch td {backGround-Color:#EEEEEE; text-align:right;height:25px;}
 19	.tblSearch input {border: 1px solid gray; }
 20	.tblSearch select {font-family:tahoma; font-size: 8pt; border: 1 solid gray; width:200px; height:50px;}
 21</style>
 22<SCRIPT LANGUAGE="JavaScript">
 23<!--
 24var dialogActive=false;
 25
 26function mask(src){ 
 27	var theKey=event.keyCode;
 28
 29	if (theKey==13){
 30		event.keyCode=9
 31		dialogActive=true
 32		document.all.tmpDlgArg.value="#"
 33		document.all.tmpDlgTxt.value="����� �� ������� �����"
 34		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;');
 35		if (document.all.tmpDlgTxt.value !="") {
 36			var myTinyWindow = window.showModalDialog('../inventory/dialog_selectInvItem.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;');
 37			dialogActive=false
 38			if (document.all.tmpDlgArg.value!="#"){
 39				Arguments=document.all.tmpDlgArg.value.split("#")
 40				src.value=Arguments[0];
 41				document.all.itemName.value=Arguments[1];
 42			}
 43		}
 44	}
 45}
 46
 47function check(src){ 
 48	if (!dialogActive){
 49		badCode = false;
 50		if (window.XMLHttpRequest) {
 51			var objHTTP=new XMLHttpRequest();
 52		} else if (window.ActiveXObject) {
 53			var objHTTP = new ActiveXObject("Microsoft.XMLHTTP");
 54		}
 55		objHTTP.open('GET','../inventory/xml_InventoryItem.asp?id='+src.value,false)
 56		objHTTP.send()
 57		tmpStr = unescape(objHTTP.responseText)
 58		document.all.itemName.value=tmpStr;
 59		}
 60}
 61
 62function maskVendor(src){ 
 63	var theKey=event.keyCode;
 64
 65	if (theKey==13){
 66		event.keyCode=9
 67		dialogActive=true
 68		document.all.tmpDlgArg.value="#"
 69		document.all.tmpDlgTxt.value="����� �� ��� ���� ��� ������:"
 70		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;');
 71		if (document.all.tmpDlgTxt.value !="") {
 72			var myTinyWindow = window.showModalDialog('../ar/dialog_selectAccount.asp?act=select&search='+escape(document.all.tmpDlgTxt.value),document.all.tmpDlgArg,'dialogHeight:500px; dialogWidth:380px; dialogTop:; dialogLeft:; edge:Raised; center:Yes; help:No; resizable:Yes; status:No;');
 73			dialogActive=false
 74			if (document.all.tmpDlgArg.value!="#"){
 75				Arguments=document.all.tmpDlgArg.value.split("#")
 76				src.value=Arguments[0];
 77				document.all.accountName.value=Arguments[1];
 78			}
 79		}
 80	}
 81}
 82
 83function checkVendor(src){ 
 84	if (!dialogActive){
 85		badCode = false;
 86		if (window.XMLHttpRequest) {
 87				var objHTTP=new XMLHttpRequest();
 88			} else if (window.ActiveXObject) {
 89				var objHTTP = new ActiveXObject("Microsoft.XMLHTTP");
 90			}
 91		objHTTP.open('GET','../accounting/xml_CustomerAccount.asp?id='+src.value,false)
 92		objHTTP.send()
 93		tmpStr = unescape(objHTTP.responseText)
 94		//document.all['A1'].innerText= objHTTP.status
 95		//document.all['A2'].innerText= objHTTP.statusText
 96		//document.all['A3'].innerText= objHTTP.responseText
 97		document.all.accountName.value=tmpStr;
 98		}
 99}
100
101
102function setColor(obj)
103{
104	//alert(document.all.purchaseOrderID.length)
105	for(i=0; i<document.all.purchaseOrderID.length; i++)
106		{
107		theTR = document.all.purchaseOrderID[i].parentNode.parentNode
108		theTR.setAttribute("bgColor","<%=AppFgColor%>")
109		}
110	theTR = obj.parentNode.parentNode
111	theTR.setAttribute("bgColor","#FFFFFF")
112}
113
114
115//-->
116</SCRIPT>
117
118<%
119
120'-----------------------------------------------------------------------------------------------------
121'----------------------------------------------------------------- Step2 : Find Related Perchuse Order
122'-----------------------------------------------------------------------------------------------------
123if request.form("Submit")="����� ��� ����� ���� �� �� ����� ���� �� �����"then
124	purchaseOrderID	= request.form("purchaseOrderID")
125	id				= request.form("id")
126	goodName		= request.form("goodName")
127
128	if 	id = "" or purchaseOrderID="" or not (isnumeric(purchaseOrderID) and isnumeric(id)) then
129		
130		response.redirect "?errmsg="& Server.URLEncode("���! ��� ����� ����� ������ ���� ���.&Submit=������&id=" & id)
131	end if
132	
133	type1 = 1 
134	if purchaseOrderID < 0 then type1 = -1 * purchaseOrderID
135
136	mySql="UPDATE InventoryLog set RelatedID = "& purchaseOrderID & ", type ="& type1 & " where id=" & id
137	'response.write "<br>" & mySql
138	'response.end
139	conn.Execute mySql
140
141	response.redirect "?msg="& Server.URLEncode("���� �� ����� " & goodName & " �� ����� ���� ����� "& purchaseOrderID & " ����� ��")
142'-----------------------------------------------------------------------------------------------------
143'----------------------------------------------------------------- Step2 : Find Related Perchuse Order
144'-----------------------------------------------------------------------------------------------------
145elseif request("act")="relate" or request("Submit")="�����" then
146
147	id				= request("id")
148	ChequeDatesFrom	= request.form("ChequeDatesFrom")
149	ChequeDatesTo	= request.form("ChequeDatesTo")
150	purchOrderID	= request.form("purchOrderID")
151	accountID		= request.form("accountID")
152	status			= request.form("status")
153	item			= request.form("item")
154
155	if id = "" or not isNumeric(id) then
156		response.redirect "?msg="& Server.URLEncode("���! ��� ������ ������ ���� ���.")
157	end if 
158
159	set RS3=Conn.Execute ("SELECT InventoryLog.ID, InventoryLog.ItemID, InventoryLog.Qtty, InventoryLog.logDate, InventoryLog.CreatedBy, InventoryLog.comments, InventoryItems.OldItemID, InventoryItems.Name, InventoryItems.Unit, InventoryLog.type FROM InventoryLog INNER JOIN InventoryItems ON InventoryLog.ItemID = InventoryItems.ID WHERE (InventoryLog.id = "& id & ")")	
160
161	response.write "<center><br><br><B>��� ���:</B> ����� ����� ���� ������"
162	if item="" or not isnumeric(item) then
163		item = RS3("OldItemID")
164	end if
165	%>
166	<BR><BR>
167	<FORM METHOD=POST ACTION="?">
168	<INPUT TYPE="hidden" name="ID" value="<%=id%>">
169	<INPUT TYPE="hidden" name="goodName" value="<%=Name%>">
170	<TABLE dir=rtl align=center width=700 cellspacing=0 style="background-color:white">
171	<TR>
172		<TD><B>����� ���� ��� �� �����: </B></TD>
173		<!--TD><%=RS3("id")%></TD-->
174		<TD dir=ltr align=right>(<%=RS3("logDate")%>)</TD>
175		<TD><%=RS3("Name")%></TD>
176		<TD><%=RS3("Qtty")%></TD>
177		<TD><%=RS3("Unit")%></TD>
178		<TD><%=RS3("comments")%> &nbsp;</TD>
179	</TR>
180	</TABLE>
181	<input type="hidden" Name='tmpDlgArg' value=''>
182	<input type="hidden" Name='tmpDlgTxt' value=''>
183	<TABLE align=center class="RcpMainTable">
184	<TR style="height:10pt">
185		<td></td>
186	</TR>
187	<TR>
188		<TD align=right> �� ����� : <INPUT dir="LTR" TYPE="text" NAME="ChequeDatesFrom" maxlength="10" size="10"onblur="acceptDate(this)" onKeyPress="return maskDate(this);" value="<%=ChequeDatesFrom%>"></TD>
189		<TD align=left>
190			���� ������� : <INPUT dir="LTR" TYPE="text" NAME="accountID" maxlength="10" size="10" value="<%=accountID%>" onKeyPress='return maskVendor(this);' onBlur='checkVendor(this);'> &nbsp;&nbsp; <INPUT TYPE="text" NAME="accountName" size=25 readonly value="<%=accountName%>" style="background-color:transparent">	</TD>
191		<TD align=left>
192			����� :� 
193			<select name="status" style="font-size:8pt">
194			<option value="">������ ����</option>
195			<option value="">---------------</option>
196			<option value="OK" <% if status="OK" then %> selected <% end if %>>����� ���</option>
197			<option value="OUT" <% if status="OUT" then %> selected <% end if %>>���� �� ����</option>
198			<option value="CANCEL" <% if status="CANCEL" then %> selected <% end if %>>��� ���</option>
199			</select>
200		</TD>
201	</TR>
202	<TR>
203		<TD align=right>�� ����� :� <INPUT dir="LTR" TYPE="text" NAME="ChequeDatesTo" maxlength="10" size="10" onKeyPress="return maskDate(this);" onblur="acceptDate(this)" value="<%=ChequeDatesTo%>"></TD>
204		<TD align=left>
205			�� ����� ����� : 
206			<INPUT dir="LTR" TYPE="text" NAME="item" maxlength="10" size="10" value="<%=item%>" onKeyPress='return mask(this);' onBlur='check(this);'> &nbsp;&nbsp; <INPUT TYPE="text" NAME="itemName" size=25 readonly value="<%=accountName%>" style="background-color:transparent">
207		</TD>
208		<TD align=left>
209		����� : <INPUT TYPE="text" NAME="purchOrderID" size=4 value="<%=purchOrderID%>">
210		<INPUT class="GenButton" TYPE="submit" name="submit" value="�����" ></TD>
211	</TR>
212	<TR>
213	</TABLE><BR>
214	</FORM>
215	<FORM METHOD=POST ACTION="?">
216	<INPUT TYPE="hidden" name="ID" value="<%=id%>">
217	<TABLE dir=rtl align=center width=700 cellspacing=0>
218	<tr>
219		<TD align=right colspan=3>
220			<INPUT TYPE="radio" onclick="setColor(this)" NAME="purchaseOrderID" value="-3"> ����� ������ 
221		</TD>
222	</TR>
223	<tr>
224		<TD align=right colspan=3>
225			<INPUT TYPE="radio" onclick="setColor(this)" NAME="purchaseOrderID" value="-6"> ���� �� �����
226		</TD>
227	</TR>
228	<tr>
229		<TD align=right colspan=3>
230			<INPUT TYPE="radio" onclick="setColor(this)" NAME="purchaseOrderID" value="-7"> ���� �� ����� ������ / ���� ���� ����<br>
231		</TD>
232	</TR>
233	</TABLE><BR>
234	<%
235	'-------------------------------------------------------------------------------------------------
236	'----------------------------------------------------------------------------- Step3 : Submit form
237	'-------------------------------------------------------------------------------------------------
238	'SELECT PurchaseOrders.*
239	'FROM PurchaseOrders LEFT OUTER JOIN
240	'InventoryLog ON PurchaseOrders.ID = InventoryLog.RelatedID
241	'WHERE (ISNULL(InventoryLog.RelatedID, 0) = 0) AND (PurchaseOrders.IsService = 0)
242	
243	conditions = "(PurchaseOrders.IsService = 0)"
244
245	if ChequeDatesFrom <> "" then
246		conditions = conditions & " and OrdDate >= N'"& ChequeDatesFrom & "' "
247	end if
248
249	if ChequeDatesTo <> "" then
250		conditions = conditions & " and OrdDate <= N'"& ChequeDatesTo & "' "
251	end if
252
253	if status <> "" then
254		conditions = conditions & " and PurchaseOrders.Status = N'"& status & "' "
255	end if
256
257	if purchOrderID <> "" then
258		if isNumeric(purchOrderID) then
259			conditions = conditions & " and PurchaseOrders.ID = "& purchOrderID 
260		end if
261	end if
262
263	if accountID <> "" then
264		if isNumeric(accountID) then
265			conditions = conditions & " and PurchaseOrders.Vendor_ID = "& accountID 
266		end if
267	end if
268
269	if item <> "" then
270		if isNumeric(item) then
271			conditions = conditions & " and InventoryItems.OldItemID = "& item 
272		end if
273	end if
274
275	conditions = conditions & " order by PurchaseOrders.ID DESC "
276
277	'if request.form("Submit")="�����" then
278
279		'mySQL="SELECT PurchaseOrders.*, Accounts.AccountTitle FROM PurchaseOrders INNER JOIN InventoryItems ON PurchaseOrders.TypeID = InventoryItems.ID INNER JOIN Accounts ON PurchaseOrders.Vendor_ID = Accounts.ID WHERE " & conditions
280		'Changed By Kid ! 840219
281		mySQL="SELECT DRV.ID AS LogID,DRV.Qtty AS LogQtty, PurchaseOrders.*, Accounts.AccountTitle FROM PurchaseOrders INNER JOIN InventoryItems ON PurchaseOrders.TypeID = InventoryItems.ID INNER JOIN Accounts ON PurchaseOrders.Vendor_ID = Accounts.ID LEFT OUTER JOIN (SELECT ID, RelatedID, Qtty, type FROM InventoryLog WHERE (IsInput = 1) AND (Voided = 0)) DRV ON PurchaseOrders.ID = DRV.RelatedID WHERE " & conditions
282
283		set RS3=Conn.Execute (mySQL)
284
285		%>
286		<TABLE dir=rtl align=center cellspacing=1 cellpadding=2 bgcolor=0 style='border:1 solid black;'>
287		<!--TR bgcolor="eeeeee" >
288			<TD align=center colspan=6><B>���� �� ����� �� ���� �� ����</B></TD>
289		</TR-->
290		<TR bgcolor="CCCCCC" height="25px">
291			<TD width="80px"># ����� ����</TD>
292			<TD width="65px">�����</TD>
293			<TD width="150px">�������</TD>
294			<TD width="100px">��� ����</TD>
295			<TD width="40px">�����</TD>
296			<TD width="60px">����</TD>
297			<TD width="100px">�����</TD>
298			<TD width="50px">���� ����</TD>
299		</TR>
300		<%
301		Do while not RS3.eof
302			%>
303			<TR bgColor="FFFFFF" style="cursor:hand" onclick="this.getElementsByTagName('input')[0].click();this.getElementsByTagName('input')[0].focus();">	
304				<TD><INPUT TYPE="radio" NAME="purchaseOrderID" onclick="setColor(this)" VALUE="<%=RS3("ID")%>"> <A target="_blank" HREF="outServiceTrace.asp?od=<%=RS3("ID")%>"><%=RS3("ID")%></A> </TD>		
305				<TD><div style="direction:ltr;text-align:center;"><%=RS3("OrdDate")%></div></TD>
306				<TD><%=RS3("AccountTitle")%></TD>
307				<TD><%=RS3("TypeName")%></TD>
308				<TD><%=RS3("Qtty")%></TD>
309				<TD><%=Separate(RS3("Price"))%></TD>
310				<TD><%=RS3("Comment")%> &nbsp;</TD>
311				<TD><A HREF="../inventory/invReport.asp?oldItemID=<%=item%>&logRowID=<%=RS3("LogID")%>" target="_blank"><%=RS3("LogID")%></A> &nbsp; <%=RS3("LogQtty")%></TD>
312			</TR>
313			<%
314		RS3.moveNext
315		Loop
316		%>
317		</TABLE><BR>
318		<%
319	'end if
320	%>
321	<BR><CENTER><INPUT TYPE="submit" name="submit" value="����� ��� ����� ���� �� �� ����� ���� �� �����" class="genButton"></CENTER>
322	</FORM>
323	<%
324	response.write "</center><br>"
325	response.end
326else
327'-----------------------------------------------------------------------------------------------------
328'--------------------------------------------------------------- Step1 : List Unknown Inventory Inputs
329'-----------------------------------------------------------------------------------------------------
330
331	myAnd=" AND "
332	myCriteria= ""
333	if request("chekDate")="on" then
334		FromDate =	sqlSafe(request("FromDate"))
335		if FromDate<>"" then
336			myCriteria= myCriteria & " AND (InventoryLog.logDate >= '" & FromDate & "')"
337		end if
338		ToDate =	sqlSafe(request("ToDate"))
339		if ToDate <> "" then
340			myCriteria= myCriteria & " AND (InventoryLog.logDate <= '" & ToDate & "')"
341		end if
342	end if
343
344	if request("chekItem")="on" then
345		ItemName =	sqlSafe(request("ItemName"))
346		if ItemName <> "" then
347			myCriteria= myCriteria & " AND (REPLACE(InventoryItems.Name,' ','') LIKE N'%" & replace(ItemName," ","")& "%')"
348		end if
349		ItemCat =	request("ItemCat")
350		if ItemCat <> "-1" then
351			myCriteria= myCriteria & " AND (InventoryItemCategoryRelations.Cat_ID='" & ItemCat & "')"
352		end if
353	end if
354
355	if request("chekDesc")="on" then
356		ItemDesc =	request("ItemDesc")
357		if ItemDesc <> "" then
358			myCriteria= myCriteria & " AND (REPLACE(InventoryLog.comments,' ','') LIKE N'%" & replace(ItemDesc," ","")& "%')"
359		end if
360	end if
361
362	if request("ResultsInPage")="" then
363		ResultsInPage= 20
364	else
365		ResultsInPage =	cint(request("ResultsInPage"))
366	end if
367
368	order = "logDate DESC"
369
370
371	%>
372	<br>
373	<hr>
374	<TABLE align=center class='tblSearch' cellspacing=1 bgcolor=#0	>
375	<FORM METHOD=POST ACTION="?">
376	<TR bgcolor=#CCCCCC>
377		<TH colspan=2><INPUT TYPE="checkbox" NAME="chekDate" style='border:none;' <%if request("chekDate")="on" then response.write "checked"%>>�����</TD>
378		<TH colspan=2><INPUT TYPE="checkbox" NAME="chekItem" style='border:none;' <%if request("chekItem")="on" then response.write "checked"%>>����</TD>
379		<TH colspan=2><INPUT TYPE="checkbox" NAME="chekDesc" style='border:none;' <%if request("chekDesc")="on" then response.write "checked"%>>�������</TD>
380	</TR>
381	<TR bgcolor=#F0F0F0>
382		<TD>��:</TD>
383		<TD>
384			<INPUT dir="LTR" TYPE="text" NAME="FromDate" maxlength="10" size="10" onblur="acceptDate(this)" onKeyPress="return maskDate(this);" value="<%=FromDate%>">
385		</TD>
386		<TD>��� </TD>
387		<TD>
388			<INPUT TYPE="text" NAME="ItemName" maxlength="50" style="width:200px;" value="<%=ItemName%>"></TD>
389		<TD>���</TD>
390		<TD>
391			<INPUT TYPE="text" NAME="ItemDesc" maxlength="50" style="width:150px;" value="<%=ItemDesc%>"></TD>
392	</TR>
393	<TR bgcolor=#F0F0F0>
394		<TD>��:</TD>
395		<TD align=left>
396			<INPUT dir="LTR" TYPE="text" NAME="ToDate" maxlength="10" size="10" onblur="acceptDate(this)" onKeyPress="return maskDate(this);" value="<%=ToDate%>">
397		</TD>
398		<TD>����</TD>
399		<TD>
400			<SELECT NAME="ItemCat">
401			<option value="-1">������ ����: </option>
402			<option value="-1">-------------</option>
403<%
404				set RS4 = conn.Execute ("SELECT * FROM InventoryItemCategories")
405				while not (RS4.eof) %>
406					<OPTION value="<%=RS4("ID")%>"<% if trim(ItemCat) = trim(RS4("ID")) then response.write " selected " %>><%=RS4("Name")%> </option>
407<%					RS4.MoveNext
408				wend
409				RS4.close
410				Set RS4 = Nothing
411				%>
412			</SELECT>
413		</TD>
414		<TD>�����</TD>
415		<TD>
416			<INPUT TYPE="text" NAME="ResultsInPage" maxlength="3" style="width:50px;" Value="<%=ResultsInPage%>">
417			<INPUT TYPE="submit" Name="Search" Value="�����" maxlength="50" style="width:95px;border:1 solid black;">
418		</TD>
419	</TR>
420	</FORM>
421	</TABLE>
422	<hr>
423	<FORM METHOD=POST ACTION="?act=relate">
424	<TABLE width=600 align=center class='tblSearch' cellspacing=1 bgcolor=#0>
425	<TR bgcolor="eeeeee" >
426		<TD align=center colspan=6 height=30><B>���� �� �������� �� ���� �������</B></TD>
427	</TR>
428	<TR bgcolor="CCCCCC" height=30>
429		<TH style="width:70px">�����</TD>
430		<TH style="width:200px">��� ����</TD>
431		<TH style="width:50px" >�����</TD>
432		<TH style="width:40px" >����</TD>
433		<TH style="width:150px">�����</TD>
434	</TR>
435	<%
436	'InventoryLog.type = 1			:	Normal 
437	'InventoryLog.RelatedID = -1	:	Not Related
438	'InventoryLog.owner = -1		:	PDHCo.
439	'InventoryLog.Voided = 0		:	not Voided
440	'InventoryLog.IsInput = 1		:	!!
441	'
442	mySQL="SELECT TOP " & ResultsInPage & " InventoryLog.ID, InventoryLog.ItemID, InventoryLog.Qtty, InventoryLog.logDate, InventoryLog.comments, InventoryItems.OldItemID, InventoryItems.Name, InventoryItems.Unit, InventoryLog.type FROM InventoryLog INNER JOIN InventoryItems ON InventoryLog.ItemID = InventoryItems.ID INNER JOIN InventoryItemCategoryRelations ON InventoryItems.ID = InventoryItemCategoryRelations.Item_ID WHERE (InventoryLog.RelatedID = - 1) AND (InventoryLog.type = 1) AND (InventoryLog.owner = - 1) AND (InventoryLog.Voided = 0) AND (InventoryLog.IsInput = 1) " & myCriteria & " ORDER BY " & order
443	set RS3=Conn.Execute (mySQL)	
444	if RS3.eof then
445%>
446		<TR>	
447			<TD height=25 align=center bgcolor=#6699CC colspan=6><B>��� </B></TD>
448		</TR>
449	
450<%
451	else
452		Do While NOT RS3.eof
453%>
454			<TR style="cursor:hand" onclick="go2('<%=RS3("id")%>');">	
455				<TD dir='LTR'><%=RS3("logDate")%></TD>
456				<TD><%=RS3("Name")%></TD>
457				<TD><%=RS3("Qtty")%></TD>
458				<TD><%=RS3("Unit")%></TD>
459				<TD><%=RS3("comments")%> &nbsp;</TD>
460			</TR>
461<%
462		RS3.moveNext
463		Loop
464	End if
465%>
466	</TABLE><BR><BR>	
467	<CENTER><INPUT TYPE="submit" name="submit" value="������" class="genButton" style="width:50pt"></CENTER>
468	</FORM>
469	<%
470	%>
471
472<SCRIPT LANGUAGE="JavaScript">
473<!--
474function go2(id)
475{
476
477	theTR = event.srcElement.parentNode
478	theTDs= theTR.getElementsByTagName('TD')
479	for(i=0;i<theTDs.length;i++){
480		theTDs[i].style.backgroundColor='#FFDDBB';
481	}
482	window.open('relateInvItemsToPurchOrders.asp?act=relate&id='+id); 
483}
484
485
486//-->
487</SCRIPT>
488<%
489end if
490%>
491<!--#include file="tah.asp" -->