/beta/shopfloor/orderDesk.asp

http://github.com/khaneh/Orders · ASP · 575 lines · 498 code · 47 blank · 30 comment · 52 complexity · c345353b7794eed840a867e3484fa607 MD5 · raw file

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%><%
  2. 'shopfloor (3)
  3. PageTitle=" "
  4. SubmenuItem=6
  5. if not Auth(3 , 6) then NotAllowdToViewThisPage()
  6. 'OutService Page Request
  7. 'By Alix - Last changed: 81/01/13
  8. %>
  9. <!--#include file="top.asp" -->
  10. <!--#include File="../include_farsiDateHandling.asp"-->
  11. <!--#include File="../include_UtilFunctions.asp"-->
  12. <STYLE>
  13. .GetCustTbl {font-family:tahoma; background-color: #DDDDDD; width:630; direction: RTL; }
  14. .GetCustTbl td {padding:2; font-size: 9pt; height:25;}
  15. .GetCustInp { font-family:tahoma; font-size: 9pt;}
  16. .CusTableHeader {background-color: #33AACC; text-align: center; font-weight:bold;}
  17. .CustContactTable {font-family:tahoma; width:100%; border:1 solid black; direction: RTL; background-color:#CCCCCC;}
  18. .CustContactTable td {padding:5;}
  19. .CustTable {font-family:tahoma; width:80%; border:1 solid black; direction: RTL; background-color:black;}
  20. .CustTable td {padding:5;}
  21. .CustTable a {text-decoration:none;color:#000088}
  22. .CustTable a:hover {text-decoration:underline;}
  23. .CusTD1 {background-color: #CCCC66; text-align: left; font-weight:bold;}
  24. .CusTD2 {background-color: #DDDDDD; direction: LTR; text-align: right; font-size:9pt;}
  25. .CusTD3 {background-color: #DDDDDD; direction: LTR; text-align: center; font-size:9pt;}
  26. .CusTD4 {background-color: #CCCC66; direction: LTR; text-align: center; font-size:9pt;}
  27. .CustTable4 {font-family:tahoma; direction: RTL; width:100%; height:100%; background-color:#C3DBEB;}
  28. .repHeader td{text-align: center; font-size:7pt;}
  29. </STYLE>
  30. <%
  31. '-----------------------------------------------------------------------------------------------------
  32. '------------------------------------------------------------------------ Edit Order Desk Items Action
  33. '-----------------------------------------------------------------------------------------------------
  34. if request("act")="doEdit" then
  35. 'response.write "<br>" & replace(request.form,"&","<br>")
  36. 'response.end
  37. for i = 1 to request.form("id").count
  38. radif_sefareshat = request.form("radif_sefareshat")(i)
  39. size = request.form("size")(i)
  40. forms = request.form("forms")(i)
  41. tirag = request.form("tirag")(i)
  42. zinc = request.form("zinc")(i)
  43. is2roo = request.form("is2roo")(i)
  44. colorStatus = request.form("colorStatus")(i)
  45. lastEditedBy = session("id")
  46. lastEditedDate = shamsiToday()
  47. orderDeskItemID = request.form("id")(i)
  48. mySQL2="UPDATE orderDesk SET [size] = '" & size & "', forms =" & forms & ", Tirag ='" & Tirag & "', Zinc ='" & Zinc & "', is2roo ='" & is2roo & "', colorStatus ='" & colorStatus & "', lastEditedBy =" & lastEditedBy & ", lastEditedDate ='" & lastEditedDate & "' where id=" & orderDeskItemID
  49. conn.execute(mySQL2)
  50. next
  51. response.redirect "orderDesk.asp"
  52. end if
  53. '-----------------------------------------------------------------------------------------------------
  54. '----------------------------------------------------------------------------- Add to Order Desk Table
  55. '-----------------------------------------------------------------------------------------------------
  56. if request("submit")="" then
  57. 'response.write "==" & replace(request.form, "&", "<br>")
  58. radif_sefareshat = request.form("radif_sefareshat")
  59. size = request.form("size")
  60. forms = request.form("forms")
  61. tirag = request.form("tirag")
  62. zinc = request.form("zinc")
  63. is2roo = request.form("is2roo")
  64. colorStatus = request.form("colorStatus")
  65. createdBy = session("id")
  66. createdDate = shamsiToday()
  67. mySQL="INSERT INTO orderDesk (order_ID, [size], forms, Tirag, Zinc, is2roo, colorStatus, createdBy, createdDate) VALUES (" & radif_sefareshat & ", '" & size & "', '" & forms & "', '" & tirag & "', '" & zinc & "', '" & is2roo & "', '" & colorStatus & "'," & createdBy & ", '" & createdDate & "')"
  68. conn.execute(mySQL)
  69. response.redirect "orderDesk.asp"
  70. end if
  71. '-----------------------------------------------------------------------------------------------------
  72. '------------------------------------------------------------------------------ Print Order Desk Items
  73. '-----------------------------------------------------------------------------------------------------
  74. if request("submit")=" " then
  75. %>
  76. <BR> <BR>
  77. <CENTER>
  78. <% ReportLogRow = PrepareReport ("orderDesk.rpt", "alak", ".", "/beta/dialog_printManager.asp?act=Fin") %>
  79. <INPUT TYPE="button" value=" ǁ " Class="GenButton" style="border:1 solid blue;" onclick="printThisReport(this,<%=ReportLogRow%>);">
  80. </CENTER>
  81. <BR>
  82. <iframe name=f1 id=f1 src="/CRReports/?Id=<%=ReportLogRow%>" align=center style="width:750; height:410; border-style: none" border=0 FRAMEBORDER=0 scrollbars=no></iframe>
  83. <%
  84. response.end
  85. '-----------------------------------------------------------------------------------------------------
  86. '------------------------------------------------------------------------------ Print Order Desk Items
  87. '-----------------------------------------------------------------------------------------------------
  88. elseif request("submit")="ǁ " then
  89. mySQL2="UPDATE orderDesk SET selected4print = 0 WHERE (selected4print = 1)"
  90. conn.execute(mySQL2)
  91. for i = 1 to request.form("id").count
  92. orderDeskItemID = request.form("id")(i)
  93. mySQL2="UPDATE orderDesk SET selected4print = 1 WHERE id=" & orderDeskItemID
  94. conn.execute(mySQL2)
  95. next
  96. 'response.redirect "orderDesk.asp"
  97. %>
  98. <BR> <BR>
  99. <CENTER>
  100. <% ReportLogRow = PrepareReport ("orderDesk.rpt", "alak", ".", "/beta/dialog_printManager.asp?act=Fin") %>
  101. <INPUT TYPE="button" value=" ǁ " Class="GenButton" style="border:1 solid blue;" onclick="printThisReport(this,<%=ReportLogRow%>);">
  102. </CENTER>
  103. <BR>
  104. <iframe name=f1 id=f1 src="/CRReports/?Id=<%=ReportLogRow%>" align=center style="width:750; height:410; border-style: none" border=0 FRAMEBORDER=0 scrollbars=no></iframe>
  105. <%
  106. response.end
  107. '-----------------------------------------------------------------------------------------------------
  108. '------------------------------------------------------------------------------- Edit Order Desk Items
  109. '-----------------------------------------------------------------------------------------------------
  110. elseif request("submit")="" then
  111. %>
  112. <FORM METHOD=POST ACTION="?act=doEdit"><BR><BR>
  113. <table class="CustTable" cellspacing='1' style='width:95%;' align=center>
  114. <tr>
  115. <td colspan="10" class="CusTableHeader" style="text-align:right;"> </td>
  116. </tr>
  117. <tr>
  118. <td class="CusTD3"><small> </small></td>
  119. <td class="CusTD3"><small> \<font color="aaaaaa"> </small></font></td>
  120. <td class="CusTD3"><small> </small></td>
  121. <td class="CusTD3"><small></small></td>
  122. <td class="CusTD3"><small> </small></td>
  123. <td class="CusTD3"><small>ǎ </small></td>
  124. <td class="CusTD3"><small></small></td>
  125. <td class="CusTD3"><small></small></td>
  126. <td class="CusTD3"><small></small></td>
  127. </tr>
  128. <%
  129. for i = 1 to request.form("id").count
  130. orderDeskItemID = request.form("id")(i)
  131. if not isNumeric(orderDeskItemID) then
  132. call showAlert("! .",CONST_MSG_ERROR)
  133. response.end
  134. end if
  135. mySQL="SELECT orderDesk.*, orders_trace.return_date, orders_trace.company_name, orders_trace.customer_name, orders_trace.order_title FROM orderDesk INNER JOIN orders_trace ON orderDesk.order_ID = orders_trace.radif_sefareshat where id=" & orderDeskItemID
  136. Set RS1 = conn.execute(mySQL)
  137. if RS1.eof then
  138. call showAlert("! .",CONST_MSG_ERROR)
  139. response.end
  140. end if
  141. %>
  142. <TR bgcolor="#FFFFFF"><INPUT TYPE="hidden" name="id" value="<%=RS1("id")%>">
  143. <TD dir="LTR" align='right'><%=RS1("return_date")%></TD>
  144. <TD><A HREF="../shopfloor/manageOrder.asp?radif=<%=RS1("order_id")%>" target="_blank"><%=RS1("customer_name")%> - <%=RS1("company_name")%><BR><BR><font color="aaaaaa"><%=RS1("order_title")%></font></A></TD>
  145. <TD dir="LTR" align='center'><INPUT TYPE="hidden" NAME="radif_sefareshat" value="<%=RS1("order_id")%>" size=3><%=RS1("order_id")%></TD>
  146. <TD dir="LTR" align='center'><INPUT TYPE="text" NAME="size" size=5 value="<%=trim(RS1("size"))%>"></TD>
  147. <TD dir="LTR" align='center'><INPUT TYPE="text" NAME="forms" size=3 value="<%=trim(RS1("forms"))%>"></TD>
  148. <TD dir="LTR" align='center'><INPUT TYPE="text" NAME="tirag" size=3 value="<%=trim(RS1("tirag"))%>"></TD>
  149. <TD dir="LTR" align='center'><INPUT TYPE="text" NAME="zinc" size=3 value="<%=trim(RS1("zinc"))%>"></TD>
  150. <TD dir="RTL" align='center'>
  151. <SELECT NAME="is2roo" style="font-family:tahoma; font-size:8pt">
  152. <option value="0" <% if RS1("is2roo")="0" then %>selected<% end if %>> </option>
  153. <option value="1" <% if RS1("is2roo")="1" then %>selected<% end if %>></option>
  154. <option value="2" <% if RS1("is2roo")="2" then %>selected<% end if %>></option>
  155. <option value="3" <% if RS1("is2roo")="3" then %>selected<% end if %>></option>
  156. </SELECT>
  157. </TD>
  158. <TD dir="RTL" align='center'>
  159. <SELECT NAME="colorStatus" style="font-family:tahoma; font-size:8pt">
  160. <option value="0" <% if RS1("colorStatus")="0" then %>selected<% end if %>></option>
  161. <option value="1" <% if RS1("colorStatus")="1" then %>selected<% end if %>></option>
  162. <option value="2" <% if RS1("colorStatus")="2" then %>selected<% end if %>></option>
  163. </SELECT>
  164. </TD>
  165. </TR>
  166. <%
  167. next
  168. %>
  169. </table>
  170. <CENTER><BR>
  171. <INPUT TYPE="submit" value=""> <INPUT TYPE="button" value="" onclick="javascript:history.go(-1)">
  172. </CENTER>
  173. </FORM>
  174. <%
  175. response.end
  176. end if
  177. '-----------------------------------------------------------------------------------------------------
  178. '------------------------------------------------------------------------------- Show Order Desk Table
  179. '-----------------------------------------------------------------------------------------------------
  180. %>
  181. <TABLE class="RepTable" width='100%' align='center' >
  182. <TR>
  183. <td align=left>:</td>
  184. <td align=right>
  185. <INPUT NAME="SearchBox" TYPE="Text" style="border:1 solid black;width:150px;" Value="" onKeyPress="return handleSearch();"></td>
  186. <td align=left><A HREF="#openOrders"> <FONT face="Wingdings" size=8>H</FONT></A></td>
  187. </TR>
  188. </TABLE>
  189. <TaBlE class="CustTable4" cellspacing="2" cellspacing="2">
  190. <Tr>
  191. <Td colspan="2" valign="top" align="center">
  192. <FORM METHOD=POST ACTION="">
  193. <table class="CustTable" cellspacing='1' style='width:98%;'>
  194. <tr>
  195. <td colspan="13" class="CusTableHeader" style="text-align:left;">
  196. <TABLE width=100% cellspacing=0 cellpadding=0>
  197. <TR>
  198. <TD><B> </B></TD>
  199. <TD align=left>
  200. <INPUT TYPE="submit" name="submit" value=" ">
  201. <INPUT TYPE="submit" name="submit" value="ǁ ">
  202. <INPUT TYPE="submit" name="submit" value=""></TD>
  203. </TR>
  204. </TABLE>
  205. </td>
  206. </tr>
  207. <%
  208. Ord=request("Ord")
  209. select case Ord
  210. case "1":
  211. order= " ORDER BY orders_trace.return_date"
  212. case "-1":
  213. order= " ORDER BY orders_trace.return_date DESC"
  214. case "2":
  215. order= " ORDER BY orders_trace.customer_name"
  216. case "-2":
  217. order= " ORDER BY orders_trace.customer_name DESC"
  218. case "3":
  219. order= " ORDER BY orders_trace.radif_sefareshat"
  220. case "-3":
  221. order= " ORDER BY orders_trace.radif_sefareshat DESC"
  222. case "4":
  223. order= " ORDER BY orderDesk.[size]"
  224. case "-4":
  225. order= " ORDER BY orderDesk.[size] DESC"
  226. case "5":
  227. order= " ORDER BY convert(int,orderDesk.forms)* convert(int,orderDesk.Tirag), orders_trace.return_date"
  228. case "-5":
  229. order= " ORDER BY convert(int,orderDesk.forms)* convert(int,orderDesk.Tirag) DESC, orders_trace.return_date"
  230. case "6":
  231. order= " ORDER BY convert(int,orderDesk.Zinc), orders_trace.return_date"
  232. case "-6":
  233. order= " ORDER BY convert(int,orderDesk.Zinc) DESC , orders_trace.return_date"
  234. case "7":
  235. order= " ORDER BY orderDesk.is2roo"
  236. case "-7":
  237. order= " ORDER BY orderDesk.is2roo DESC"
  238. case "8":
  239. order= " ORDER BY orderDesk.colorStatus"
  240. case "-8":
  241. order= " ORDER BY orderDesk.colorStatus DESC"
  242. case "9":
  243. order= " ORDER BY orders_trace.marhale"
  244. case "-9":
  245. order= " ORDER BY orders_trace.marhale DESC"
  246. case else:
  247. order= " ORDER BY orders_trace.return_date"
  248. Ord=1
  249. end select
  250. mySQL="SELECT orders_trace.return_date, orders_trace.marhale, orders_trace.customer_name, orders_trace.company_name, orders_trace.radif_sefareshat, orders_trace.order_title, orderDesk.id, orderDesk.[size], orderDesk.Tirag, orderDesk.forms, orderDesk.Zinc, orderDesk.is2roo, orderDesk.colorStatus FROM orderDesk INNER JOIN orders_trace ON orderDesk.order_ID = orders_trace.radif_sefareshat INNER JOIN Orders ON orders_trace.radif_sefareshat = Orders.ID where (orders_trace.Type = 2) AND (orders_trace.status = 1) AND (orders_trace.step NOT IN (11, 13, 10)) AND (Orders.Closed = 0)" & order
  251. Set RS1 = conn.execute(mySQL)
  252. if RS1.eof then
  253. %>
  254. <tr>
  255. <td colspan="13" class="CusTD3"></td>
  256. </tr>
  257. <%
  258. else
  259. if ord<0 then
  260. style="background-color: #33CC99;"
  261. arrow="<br><span style='font-family:webdings'>6</span>"
  262. else
  263. style="background-color: #33CC99;"
  264. arrow="<br><span style='font-family:webdings'>5</span>"
  265. end if
  266. %>
  267. <tr class="repHeader" bgcolor="eeeeee" style="cursor:hand;" title=" ">
  268. <td>#</td>
  269. <td onclick='go2Page(1,1);' style="<%if abs(ord)=1 then response.write style%>"> <%if abs(ord)=1 then response.write arrow%></TD>
  270. <td onclick='go2Page(1,2);' style="<%if abs(ord)=2 then response.write style%>"> \ <%if abs(ord)=2 then response.write arrow%></TD>
  271. <td onclick='go2Page(1,9);' style="<%if abs(ord)=9 then response.write style%>"><%if abs(ord)=9 then response.write arrow%></TD>
  272. <td onclick='go2Page(1,3);' style="<%if abs(ord)=3 then response.write style%>"> <%if abs(ord)=3 then response.write arrow%></TD>
  273. <td onclick='go2Page(1,4);' style="<%if abs(ord)=4 then response.write style%>"> <%if abs(ord)=4 then response.write arrow%></TD>
  274. <td onclick='go2Page(1,5);' style="<%if abs(ord)=5 then response.write style%>"> <%if abs(ord)=5 then response.write arrow%></TD>
  275. <td onclick='go2Page(1,6);' style="<%if abs(ord)=6 then response.write style%>"> <%if abs(ord)=6 then response.write arrow%></TD>
  276. <td onclick='go2Page(1,7);' style="<%if abs(ord)=7 then response.write style%>"> <%if abs(ord)=7 then response.write arrow%></TD>
  277. <td onclick='go2Page(1,8);' style="<%if abs(ord)=8 then response.write style%>"> <%if abs(ord)=8 then response.write arrow%></TD>
  278. <td title=''> </TD>
  279. </tr>
  280. <TR bgcolor="black" height="1">
  281. <TD colspan="10" style="padding:0;"></TD>
  282. </TR>
  283. <%
  284. tmpCounter=0
  285. Do while not RS1.eof
  286. tmpCounter = tmpCounter + 1
  287. if tmpCounter mod 2 = 1 then
  288. tmpColor="#FFFFFF"
  289. tmpColor2="#FFFFBB"
  290. Else
  291. tmpColor="#DDDDDD"
  292. tmpColor2="#EEEEBB"
  293. End if
  294. 'alert(this.getElementByTagName('td').items(0).data);
  295. %>
  296. <TR bgcolor="<%=tmpColor%>" onMouseOver="this.style.backgroundColor='<%=tmpColor2%>';this.nextSibling.style.backgroundColor='<%=tmpColor2%>'" onMouseOut="this.style.backgroundColor='<%=tmpColor%>';this.nextSibling.style.backgroundColor='<%=tmpColor%>'">
  297. <TD rowspan=2 style="height:30px;" align=center><%=tmpCounter%><BR><INPUT TYPE="checkbox" NAME="id" value="<%=RS1("id")%>"></TD>
  298. <TD rowspan=2 dir="LTR" align='center'><%=RS1("return_date")%>
  299. </TD>
  300. <TD rowspan=2 colspan=2><A target="_blank" HREF="../shopfloor/manageOrder.asp?radif=<%=RS1("radif_sefareshat")%>"><%=RS1("customer_name")%> - <%=RS1("company_name")%><BR><BR><font color="aaaaaa"><%=RS1("order_title")%></A></font>
  301. </TD>
  302. <TD dir="LTR" align='center'><%=RS1("radif_sefareshat")%></TD>
  303. <TD dir="LTR" align='center'><%=RS1("size")%></TD>
  304. <TD dir="LTR" align='center'><%=RS1("forms")%>*<%=RS1("Tirag")%></TD>
  305. <TD dir="LTR" align='center'> <%=RS1("Zinc")%></TD>
  306. <TD><%
  307. is2roo = ""
  308. if RS1("is2roo")="0" then
  309. is2roo=" "
  310. elseif RS1("is2roo")="1" then
  311. is2roo=""
  312. elseif RS1("is2roo")="2" then
  313. is2roo=""
  314. elseif RS1("is2roo")="3" then
  315. is2roo=""
  316. end if
  317. response.write is2roo
  318. %>&nbsp;</TD>
  319. <TD><%
  320. colorStatus = ""
  321. if RS1("colorStatus")="0" then
  322. colorStatus=""
  323. elseif RS1("colorStatus")="1" then
  324. colorStatus=""
  325. elseif RS1("colorStatus")="2" then
  326. colorStatus=""
  327. end if
  328. response.write colorStatus
  329. %>&nbsp;</TD>
  330. <TD rowspan=2 >
  331. <%
  332. mySQL="SELECT PurchaseOrders.ID, PurchaseRequests.TypeName, PurchaseOrders.Status FROM PurchaseRequests INNER JOIN PurchaseRequestOrderRelations ON PurchaseRequests.ID = PurchaseRequestOrderRelations.Req_ID INNER JOIN PurchaseOrders ON PurchaseRequestOrderRelations.Ord_ID = PurchaseOrders.ID WHERE PurchaseRequests.Order_ID = " & RS1("radif_sefareshat")
  333. Set RS2 = conn.execute(mySQL)
  334. Do while not RS2.eof
  335. if RS2("status")="OK" then
  336. response.write "<IMG SRC='../images/yes.gif' BORDER=0> "
  337. elseif RS2("status")="CANCEL" then
  338. response.write "<IMG SRC='../images/no.gif' BORDER=0> "
  339. else
  340. response.write "<IMG SRC='../images/hum.gif' BORDER=0> "
  341. end if
  342. response.write "<A TARGET='_blank' HREF='../purchase/outServiceTrace.asp?od=" & RS2("ID") & "'>" & RS2("TypeName") & "</A><BR>"
  343. RS2.moveNext
  344. Loop
  345. RS2.close
  346. set RS2=nothing
  347. %><BR>
  348. <%
  349. mySQL="SELECT ItemName FROM InventoryItemRequests where Status <> 'del' and Order_ID=" & RS1("radif_sefareshat")
  350. Set RS3 = conn.execute(mySQL)
  351. Do while not RS3.eof
  352. response.write "<li>" & RS3("ItemName") & "<BR>"
  353. RS3.moveNext
  354. Loop
  355. RS3.close
  356. set RS3=nothing
  357. %>
  358. &nbsp;</TD>
  359. </TR>
  360. <TR bgcolor="<%=tmpColor%>" onMouseOver="this.style.backgroundColor='<%=tmpColor2%>';this.previousSibling.style.backgroundColor='<%=tmpColor2%>'" onMouseOut="this.style.backgroundColor='<%=tmpColor%>';this.previousSibling.style.backgroundColor='<%=tmpColor%>'">
  361. <TD colspan=6 align=center><%=RS1("marhale")%>
  362. </TD>
  363. </TR>
  364. <% RS1.moveNext
  365. Loop
  366. end if
  367. %>
  368. <tr>
  369. <td colspan="12" class="CusTableHeader" style="text-align:left;">
  370. <INPUT TYPE="submit" name="submit" value=" ">
  371. <INPUT TYPE="submit" name="submit" value="ǁ "> <INPUT TYPE="submit" name="submit" value=""></td>
  372. </tr>
  373. </table><BR><BR><BR><BR>
  374. </FORM>
  375. <SCRIPT LANGUAGE="JavaScript">
  376. <!--
  377. function go2Page(p,ord) {
  378. if(ord==0){
  379. ord=<%=Ord%>;
  380. }
  381. else if(ord==<%=Ord%>){
  382. ord= 0-ord;
  383. }
  384. str='?Ord='+escape(ord)+'&p='+escape(p)
  385. window.location=str;
  386. }
  387. //-->
  388. </SCRIPT>
  389. <SCRIPT LANGUAGE="JavaScript">
  390. function documentKeyDown() {
  391. var theKey = window.event.keyCode;
  392. var obj = window.event.srcElement;
  393. if (theKey == 114) {
  394. if (obj.name=="SearchBox"){document.all.SearchBox.value="";};
  395. window.event.keyCode=0;
  396. document.all.SearchBox.focus();
  397. return false;
  398. }
  399. }
  400. document.onkeydown = documentKeyDown;
  401. var lastFund = 0;
  402. var lastSrch = "";
  403. function handleSearch(){
  404. var theKey=event.keyCode;
  405. if (theKey==13){
  406. event.keyCode=0;
  407. srch=document.all.SearchBox.value;
  408. if (srch == '') {
  409. return;
  410. }
  411. if (srch!=lastSrch){
  412. lastFund = 0;
  413. lastSrch=srch;
  414. }
  415. var found = false;
  416. var text = document.body.createTextRange();
  417. found=text.findText(srch)
  418. for (var i=0; i<=lastFund && found ; i++) {
  419. found=text.findText(srch)
  420. text.moveStart("character", 1);
  421. text.moveEnd("textedit");
  422. }
  423. if (found) {
  424. text.moveStart("character", -1);
  425. text.findText(srch);
  426. text.select();
  427. lastFund++;
  428. theRow=text.parentElement();
  429. while(theRow.nodeName!='TR'){
  430. theRow=theRow.parentNode;
  431. }
  432. theRow.scrollIntoView();
  433. }
  434. else{
  435. if (lastFund == '0'){
  436. alert(' "' + srch +'" .');
  437. }
  438. else{
  439. alert(' "' + srch +'" .');
  440. }
  441. lastFund=0;
  442. lastSrch="";
  443. }
  444. }
  445. }
  446. </script>
  447. <%
  448. '-----------------------------------------------------------------------------------------------------
  449. '------------------------------------------------------------------------------- Show Order Desk Table
  450. '-----------------------------------------------------------------------------------------------------
  451. %>
  452. <A name="openOrders"></A>
  453. <TaBlE class="CustTable4" cellspacing="2" cellspacing="2">
  454. <Tr>
  455. <Td colspan="2" valign="top" align="center">
  456. <table class="CustTable" cellspacing='1' style='width:95%;'>
  457. <tr>
  458. <td colspan="12" class="CusTableHeader" style="text-align:right;"> </td>
  459. </tr>
  460. <%
  461. mySQL="SELECT *, orders_trace.radif_sefareshat FROM orders_trace INNER JOIN Orders ON orders_trace.radif_sefareshat = Orders.ID LEFT OUTER JOIN orderDesk ON Orders.ID = orderDesk.order_ID WHERE (orders_trace.Type = 2) AND (orders_trace.status = 1) AND (orders_trace.step NOT IN (11, 13, 10)) AND (Orders.Closed = 0) AND (orderDesk.id IS NULL) ORDER BY orders_trace.radif_sefareshat"
  462. Set RS1 = conn.execute(mySQL)
  463. if RS1.eof then
  464. %>
  465. <tr>
  466. <td colspan="12" class="CusTD3"></td>
  467. </tr>
  468. <%
  469. else
  470. %>
  471. <tr>
  472. <td class="CusTD3"><small> </small></td>
  473. <td class="CusTD3"><small> \<font color="aaaaaa"> </small></font></td>
  474. <td class="CusTD3"><small> </small></td>
  475. <td class="CusTD3"><small></small></td>
  476. <td class="CusTD3"><small> </small></td>
  477. <td class="CusTD3"><small>ǎ </small></td>
  478. <td class="CusTD3"><small></small></td>
  479. <td class="CusTD3"><small></small></td>
  480. <td class="CusTD3"><small></small></td>
  481. <td class="CusTD3"><small> &nbsp; </small></td>
  482. </tr>
  483. <% tmpCounter=0
  484. Do while not RS1.eof
  485. tmpCounter = tmpCounter + 1
  486. if tmpCounter mod 2 = 1 then
  487. tmpColor="#FFFFFF"
  488. tmpColor2="#FFFFBB"
  489. Else
  490. tmpColor="#DDDDDD"
  491. tmpColor2="#EEEEBB"
  492. End if
  493. 'alert(this.getElementByTagName('td').items(0).data);
  494. %> <FORM METHOD=POST ACTION="" onsubmit="document.getElementById('addForm').disabled=true;">
  495. <TR bgcolor="<%=tmpColor%>" onMouseOver="this.style.backgroundColor='<%=tmpColor2%>'" onMouseOut="this.style.backgroundColor='<%=tmpColor%>'">
  496. <TD dir="LTR" align='right'><%=RS1("return_date")%></TD>
  497. <TD><A HREF="../shopfloor/manageOrder.asp?radif=<%=RS1("radif_sefareshat")%>" target="_blank"><%=RS1("customer_name")%> - <%=RS1("company_name")%><BR><BR><font color="aaaaaa"><%=RS1("order_title")%></font></A></TD>
  498. <TD dir="LTR" align='center'><INPUT TYPE="hidden" NAME="radif_sefareshat" value="<%=RS1("radif_sefareshat")%>" size=3><%=RS1("radif_sefareshat")%></TD>
  499. <TD dir="LTR" align='center'><SMALL></SMALL><BR><INPUT TYPE="text" NAME="size" size=5></TD>
  500. <TD dir="LTR" align='center'><SMALL></SMALL><BR><INPUT TYPE="text" NAME="forms" size=3></TD>
  501. <TD dir="LTR" align='center'><SMALL>ǎ</SMALL><BR><INPUT TYPE="text" NAME="tirag" size=3></TD>
  502. <TD dir="LTR" align='center'><SMALL></SMALL><BR><INPUT TYPE="text" NAME="zinc" size=3></TD>
  503. <TD dir="RTL" align='center'><BR>
  504. <SELECT NAME="is2roo" style="font-family:tahoma; font-size:8pt">
  505. <option value="0"> </option>
  506. <option value="1"></option>
  507. <option value="2"></option>
  508. <option value="3"></option>
  509. </SELECT>
  510. </TD>
  511. <TD dir="RTL" align='center'><BR>
  512. <SELECT NAME="colorStatus" style="font-family:tahoma; font-size:8pt">
  513. <option value="0"></option>
  514. <option value="1"></option>
  515. <option value="2"></option>
  516. </SELECT>
  517. </TD>
  518. <TD dir="LTR" align='center'>
  519. <!INPUT TYPE="image" src="../images/add.gif" NAME="submit" value="add" size=3>
  520. <input type="submit" id="addForm" NAME="submit" value="">
  521. </TD>
  522. </TR></FORM>
  523. <% RS1.moveNext
  524. Loop
  525. end if
  526. %>
  527. </table>
  528. <!--#include file="tah.asp" -->