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