/beta/inventory/editItem.asp

http://github.com/khaneh/Orders · ASP · 527 lines · 443 code · 44 blank · 40 comment · 39 complexity · 508056a099c563023bf59ddc152c3c08 MD5 · raw file

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%><%
  2. 'Inventory (5)
  3. PageTitle= " "
  4. SubmenuItem=6
  5. if not Auth(5 , 6) then NotAllowdToViewThisPage()
  6. %>
  7. <!--#include file="top.asp" -->
  8. <!--#include File="../include_farsiDateHandling.asp"-->
  9. <!--#include File="../include_JS_InputMasks.asp"-->
  10. <%
  11. '-----------------------------------------------------------------------------------------------------
  12. '------------------------------------------------------------------------------ Update Item Properties
  13. '-----------------------------------------------------------------------------------------------------
  14. if request("act")="editPrice" then
  15. StartDate = SqlSafe(request.form("StartDate"))
  16. EndDate = SqlSafe(request.form("EndDate"))
  17. UnitPrice = cdbl(text2value(request.form("UnitPrice")))
  18. autoKey = cdbl(text2value(request.form("autoKey")))
  19. InventoryItem = cdbl(text2value(request.form("InventoryItem")))
  20. CreatedDate = shamsiToday()
  21. CreatedTime = currentTime10()
  22. CreatedBy = session("ID")
  23. if UnitPrice=0 then
  24. response.write "<br><br>"
  25. call showAlert ("!<br><br> .",CONST_MSG_ERROR)
  26. response.end
  27. end if
  28. sql = "SELECT * FROM InventoryItemsUnitPrice WHERE (((StartDate <= '" & StartDate & "') AND (EndDate >= '" & StartDate & "')) OR ((StartDate <= '" & EndDate & "') AND (EndDate >= '" & EndDate & "')) OR ((StartDate >= '" & StartDate & "') AND (EndDate <= '" & EndDate & "')) ) AND (InventoryItem ='" & InventoryItem & "') AND (autoKey <> '" & autoKey & "')"
  29. set RS = conn.Execute (sql)
  30. if not RS.eof then
  31. response.redirect "?itemDetail=" & InventoryItem & "&errMsg=" & Server.URLEncode("!<br><b> .</b><br><br> [ " & replace(RS("StartDate"),"/",".") & " " & replace(RS("EndDate"),"/",".") & "] . <br> [ " & replace(StartDate,"/",".") & " " & replace(EndDate,"/",".") & "] .")
  32. end if
  33. RS.close
  34. if autoKey > 0 then
  35. sql = "UPDATE InventoryItemsUnitPrice SET InventoryItem ='" & InventoryItem & "', UnitPrice ='" & UnitPrice & "', StartDate ='" & StartDate & "', EndDate ='" & EndDate & "', CreatedBy ='" & CreatedBy & "', CreatedDate ='" & CreatedDate & "', CreatedTime ='" & CreatedTime & "' WHERE (autoKey='" & autoKey & "')"
  36. else
  37. sql ="INSERT INTO InventoryItemsUnitPrice (InventoryItem, UnitPrice, StartDate, EndDate, CreatedBy, CreatedDate, CreatedTime) VALUES ('" & InventoryItem & "', '" & UnitPrice & "', '" & StartDate & "', '" & EndDate & "', '" & CreatedBy & "', '" & CreatedDate & "', '" & CreatedTime & "')"
  38. end if
  39. conn.execute(sql)
  40. conn.close
  41. response.redirect "?itemDetail=" & InventoryItem & "&msg=" & Server.URLEncode(" .")
  42. elseif request("submit")=" "then
  43. id = request.form("id")
  44. oldQtty = request.form("oldQtty")
  45. qtty = request.form("qtty")
  46. Unit = request.form("Unit")
  47. comments = request.form("comments")
  48. ItemName = request.form("ItemName")
  49. if cdbl(oldQtty) < cdbl(qtty) then
  50. '---------------------- Increase Item Qtty by Hand
  51. '---------------------- RelatedID = -2 , type = 2
  52. qttyUp = qtty - oldQtty
  53. mySql="INSERT INTO InventoryLog (ItemID, RelatedID, logDate, Qtty, owner, CreatedBy, IsInput, type, comments) VALUES ("& id & ", -2 ,N'"& shamsiToday() & "', "& qttyUp & ", -1 , "& session("id") & ", 1 , 2, N'"& comments & "')"
  54. conn.Execute mySql
  55. response.write "<BR><BR><BR><CENTER><li> "& ItemName & " " & qttyUp& "&nbsp;"&Unit&" </CENTER>"
  56. end if
  57. if cdbl(oldQtty) > cdbl(qtty) then
  58. '---------------------- Decrease Item Qtty by Hand
  59. '---------------------- RelatedID = -2 , type = 2
  60. qttyDown = oldQtty - qtty
  61. mySql = "INSERT INTO InventoryLog (ItemID, RelatedID, Qtty, logDate, owner, CreatedBy, IsInput, type, comments) VALUES ("& ID & ",-2,"& qttyDown& ",N'"& shamsiToday() & "', -1 ,"& session("ID") & ", 0, 2, N'"& comments & "')"
  62. conn.Execute mySql
  63. response.write "<BR><BR><BR><CENTER><li> "& ItemName & " " & qttyDown & "&nbsp;"&Unit&" </CENTER>"
  64. end if
  65. '-----------------------------------------------------------------------------------------------------
  66. '------------------------------------------------------------------------------ Update Item Properties
  67. '-----------------------------------------------------------------------------------------------------
  68. elseif request("submit")=" "then
  69. oldCatID = request.form("oldCatID")
  70. id = request.form("id")
  71. catItem = request.form("catItem")
  72. ItemName = request.form("ItemName")
  73. OldItemID = request.form("OldItemID")
  74. ownerAcc = request.form("ownerAcc")
  75. costingMethod = request.form("cost")
  76. Minim = request.form("Minim")
  77. oldQtty = request.form("oldQtty")
  78. qtty = request.form("qtty")
  79. Unit = request.form("Unit")
  80. outByOrder = request.form("outByOrder")
  81. EditDate = shamsiToday()
  82. EditBy = session("ID")
  83. if outByOrder="on" then
  84. outByOrder = 1
  85. else
  86. outByOrder =0
  87. end if
  88. if cdbl(oldQtty) < cdbl(qtty) then
  89. '---------------------- Request to Increase Item Qtty by Hand
  90. qttyUp = qtty - oldQtty
  91. response.write "<center><br><br>"
  92. response.write "<li> <b> "& ItemName & " </b> <b>" & qttyUp& "&nbsp;"&Unit & " </b> .<br><br> :"
  93. %>
  94. <FORM METHOD=POST ACTION="">
  95. <INPUT TYPE="hidden" name="id" value="<%=id%>">
  96. <INPUT TYPE="hidden" name="oldQtty" value="<%=oldQtty%>">
  97. <INPUT TYPE="hidden" name="qtty" value="<%=qtty%>">
  98. <INPUT TYPE="hidden" name="ItemName" value="<%=ItemName%>">
  99. <INPUT TYPE="hidden" name="Unit" value="<%=Unit%>">
  100. <TEXTAREA NAME="comments" ROWS="5" COLS="20"></TEXTAREA><BR><BR>
  101. <INPUT TYPE="submit" name="submit" value=" ">
  102. </FORM>
  103. </center>
  104. <%
  105. end if
  106. if cdbl(oldQtty) > cdbl(qtty) then
  107. '---------------------- Request to Decrease Item Qtty by Hand
  108. qttyDown = oldQtty - qtty
  109. response.write "<center><br><br>"
  110. response.write "<li> <b> "& ItemName & " </b> <b>" & qttyDown& "&nbsp;"&Unit & " </b> .<br><br> :"
  111. %>
  112. <FORM METHOD=POST ACTION="">
  113. <INPUT TYPE="hidden" name="id" value="<%=id%>">
  114. <INPUT TYPE="hidden" name="oldQtty" value="<%=oldQtty%>">
  115. <INPUT TYPE="hidden" name="qtty" value="<%=qtty%>">
  116. <INPUT TYPE="hidden" name="ItemName" value="<%=ItemName%>">
  117. <INPUT TYPE="hidden" name="Unit" value="<%=Unit%>">
  118. <TEXTAREA NAME="comments" ROWS="5" COLS="20"></TEXTAREA><BR><BR>
  119. <INPUT TYPE="submit" name="submit" value=" ">
  120. </FORM>
  121. </center>
  122. <%
  123. end if
  124. response.write "<BR><BR><TABLE align=center style='border: solid 2pt black'><TR><TD>"
  125. response.write "<li> = " & catItem& "<br>"
  126. response.write "<li> = " & ItemName& "<br>"
  127. response.write "<li> = "
  128. 'if ownerAcc="-1" then
  129. 'response.write " ǁ <br>"
  130. 'else
  131. 'response.write " "& ownerAcc & "<br>"
  132. 'end if
  133. response.write "<li> = " & OldItemID& "<br>"
  134. response.write "<li> = " & costingMethod& "<br>"
  135. response.write "<li> = " & Minim& "<br>"
  136. response.write "<li> = " & oldQtty& "<br>"
  137. if outByOrder=1 then
  138. response.write "<li> "
  139. end if
  140. response.write "<li> = " & Unit& "<br>"
  141. response.write "</TD></TR></TABLE>"
  142. ' Added By Alix 821118
  143. ' -------------------------------
  144. ' Log The Edition Before Updating
  145. conn.Execute("INSERT INTO InventoryItemsEditLog SELECT '"& EditDate & "' AS EditedOn, '"& EditBy & "' AS EditedBy, " & oldCatID & " as oldCategory, * FROM InventoryItems WHERE (ID = "& ID & ")")
  146. ' End of Log
  147. ' -------------------------------
  148. mySql="update InventoryItems set OldItemID="& OldItemID & ", owner="& ownerAcc & ", Name=N'"& ItemName & "', Minim="& Minim & ", Unit=N'"& Unit & "', costingMethod='"& costingMethod & "', outByOrder=" & outByOrder & " where id=" & id
  149. conn.Execute mySql
  150. mySql="update InventoryItemCategoryRelations set Cat_ID="& catItem & " where Item_ID=" & id
  151. conn.Execute mySql
  152. response.write "<center><br> .</center>"
  153. response.end
  154. '-----------------------------------------------------------------------------------------------------
  155. '--------------------------------------------------------------------------------- Edit Qtty's (BATCH)
  156. '-----------------------------------------------------------------------------------------------------
  157. elseif request("submit")=" "then
  158. 'response.write "<br>" & replace(request.form,"&","<br>")
  159. i=0
  160. for each Qtty in request.form("Qtty")
  161. i=i+1
  162. id = request.form("id")(i)
  163. set RS4 = conn.Execute ("SELECT * FROM InventoryItems where id=" & id)
  164. if RS4.eof then
  165. response.write "<br> . Ȑ."
  166. response.end
  167. else
  168. oldQtty = RS4("Qtty")
  169. end if
  170. if clng(oldQtty) < clng(Qtty) then
  171. '---------------------- Increase Item Qtty by Hand
  172. '---------------------- RelatedID = -2
  173. qttyUp = qtty - oldQtty
  174. mySql="INSERT INTO InventoryLog (ItemID, RelatedID, logDate, Qtty, owner, CreatedBy, IsInput, type) VALUES ("& id & ", -2 ,N'"& shamsiToday() & "', "& qttyUp & ", -1 , "& session("id") & ", 1 , 2)"
  175. conn.Execute mySql
  176. end if
  177. if clng(oldQtty) > clng(Qtty) then
  178. '---------------------- Decrease Item Qtty by Hand
  179. '---------------------- RelatedID = -2
  180. qttyDown = oldQtty - qtty
  181. mySql = "INSERT INTO InventoryLog (ItemID, RelatedID, Qtty, logDate, owner, CreatedBy, IsInput, type) VALUES ("& ID & ",-2,"& qttyDown& ",N'"& shamsiToday() & "', -1 ,"& session("ID") & ", 0, 2)"
  182. conn.Execute mySql
  183. end if
  184. next
  185. end if
  186. '-----------------------------------------------------------------------------------------------------
  187. '--------------------------------------------------------------------------------- Report page Hearder
  188. '-----------------------------------------------------------------------------------------------------
  189. if request("itemDetail")="" then
  190. %>
  191. <BR><BR>
  192. <FORM METHOD=POST ACTION="editItem.asp">
  193. <%
  194. catItem1 = request("catItem")
  195. %>
  196. <TABLE dir=rtl align=center width=600>
  197. <TR bgcolor="#DDDDDD" >
  198. <TD align=center > :
  199. <SELECT NAME="catItem" style='font-family: tahoma,arial ; font-size: 9pt; font-weight: bold' size="1" onchange="document.forms[0].submit()">
  200. <option value="-1"> </option>
  201. <option value="-1">------------------</option>
  202. <%
  203. set RS4 = conn.Execute ("SELECT * FROM InventoryItemCategories")
  204. while not (RS4.eof) %>
  205. <OPTION value="<%=RS4("ID")%>"<%
  206. if trim(catItem1) = trim(RS4("ID")) then
  207. response.write " selected "
  208. end if
  209. %>>* <%=RS4("Name")%> </option>
  210. <%
  211. RS4.MoveNext
  212. wend
  213. RS4.close
  214. %>
  215. </SELECT>
  216. </TD>
  217. </TR>
  218. </table>
  219. </FORM>
  220. <%
  221. end if
  222. '-----------------------------------------------------------------------------------------------------
  223. '---------------------------------------------------------------------------- List Items of a category
  224. '-----------------------------------------------------------------------------------------------------
  225. if request("catItem") > 0 then
  226. set RSS=Conn.Execute ("SELECT InventoryItems.ID, InventoryItems.OldItemID, InventoryItems.owner, InventoryItems.Minim, InventoryItems.Name, InventoryItems.Qtty, InventoryItems.CusQtty, InventoryItems.Unit, InventoryItems.costingMethod, InventoryItemCategories.Name AS Expr1 FROM InventoryItems INNER JOIN InventoryItemCategoryRelations ON InventoryItems.ID = InventoryItemCategoryRelations.Item_ID INNER JOIN InventoryItemCategories ON InventoryItemCategoryRelations.Cat_ID = InventoryItemCategories.ID WHERE (InventoryItemCategories.ID ="& catItem1 & ") and InventoryItems.enabled=1 order by OldItemID")
  227. %>
  228. <TABLE dir=rtl align=center width=600>
  229. <TR bgcolor="eeeeee">
  230. <TD><!A HREF="default.asp?s=1"><SMALL> </SMALL></A></TD>
  231. <TD><!A HREF="default.asp?s=2"><SMALL> </SMALL></A></TD>
  232. <TD><!A HREF="default.asp?s=3"><SMALL></SMALL></A></TD>
  233. <TD><!A HREF="default.asp?s=3"><SMALL> </SMALL></A></TD>
  234. <TD><!A HREF="default.asp?s=4"><SMALL> </SMALL></A></TD>
  235. <TD><!A HREF="default.asp?s=5"><SMALL></SMALL></A></TD>
  236. <TD><!A HREF="default.asp?s=6"><SMALL> </SMALL></A></TD>
  237. </TR>
  238. <FORM METHOD=POST ACTION="">
  239. <INPUT TYPE="hidden" name="catItem" value="<%=catItem1%>">
  240. <%
  241. tmpCounter=0
  242. Do while not RSS.eof
  243. tmpCounter = tmpCounter + 1
  244. if tmpCounter mod 2 = 1 then
  245. tmpColor="#FFFFFF"
  246. tmpColor2="#FFFFBB"
  247. Else
  248. tmpColor="#DDDDDD"
  249. tmpColor2="#EEEEBB"
  250. End if
  251. %>
  252. <TR bgcolor="<%=tmpColor%>" height=25>
  253. <TD align=center dir=ltr><%=RSS("OldItemID")%></TD>
  254. <TD><A HREF="editItem.asp?itemDetail=<%=RSS("ID")%>"># <%=RSS("Name")%></A></TD>
  255. <TD align=center dir=ltr>
  256. <% if not Auth(5 , 7) then %>
  257. <%=RSS("Qtty")%>
  258. <% else %>
  259. <INPUT TYPE="hidden" NAME="id" value="<%=RSS("id")%>" style="border:0pt; width:40pt; background-color:transparent">
  260. <INPUT TYPE="text" NAME="Qtty" value="<%=RSS("Qtty")%>" style="border:0pt; width:40pt; background-color:transparent;text-align:center">
  261. <% end if %>
  262. </TD>
  263. <TD align=center dir=ltr><a style="cursor:hand" onclick="window.open('cusItemDetails.asp?id=<%=RSS("ID")%>&name=<%=RSS("Name")%>','CusItemDetails','width=400,height=300')"><%=RSS("CusQtty")%></a></TD>
  264. <TD align=center dir=ltr><%=RSS("Minim")%></TD>
  265. <TD><%=RSS("Unit")%></TD>
  266. <TD><%=RSS("costingMethod")%></TD>
  267. </TR>
  268. <%
  269. RSS.moveNext
  270. Loop
  271. %>
  272. </TABLE><br>
  273. <% if Auth(5 , 7) then %>
  274. <CENTER><INPUT TYPE="submit" name="submit" value=" "></CENTER>
  275. <% end if %>
  276. </FORM>
  277. <%
  278. end if
  279. '-----------------------------------------------------------------------------------------------------
  280. '---------------------------------------------------------------------------------- Details of an item
  281. '-----------------------------------------------------------------------------------------------------
  282. if request("itemDetail")<>"" then
  283. set RS3 = conn.Execute ("SELECT InventoryItemCategories.id as catID, InventoryItems.ID, InventoryItems.outByOrder, InventoryItems.OldItemID, InventoryItems.owner, InventoryItems.Name, InventoryItems.Minim, InventoryItems.Qtty, InventoryItems.Unit, InventoryItems.costingMethod FROM InventoryItems INNER JOIN InventoryItemCategoryRelations ON InventoryItems.ID = InventoryItemCategoryRelations.Item_ID INNER JOIN InventoryItemCategories ON InventoryItemCategoryRelations.Cat_ID = InventoryItemCategories.ID WHERE (InventoryItems.ID = '"& sqlSafe(request("itemDetail")) & "')")
  284. if RS3.EOF then
  285. response.write "<br><br>"
  286. call showAlert ("!<br><br> ",CONST_MSG_ERROR)
  287. response.end
  288. end if
  289. %>
  290. <style>
  291. .table12 {font-family: tahoma; font-size: 8pt; border:}
  292. .table12 TR {height:20px; }
  293. .table12 TH {direction:rtl; font-weight:normal;}
  294. .table12 TD {direction:ltr; }
  295. </style>
  296. <SCRIPT LANGUAGE="JavaScript">
  297. <!--
  298. var noNextField = false;
  299. function copyInfo(index){
  300. var myObj=document.getElementsByTagName("table").item('prices').getElementsByTagName("tr").item(index);
  301. document.all.autoKey.value=myObj.getElementsByTagName("input").item(0).value;
  302. document.all.StartDate.value=myObj.getElementsByTagName("td").item(0).innerText;
  303. document.all.EndDate.value=myObj.getElementsByTagName("td").item(1).innerText;
  304. document.all.UnitPrice.value=myObj.getElementsByTagName("td").item(2).innerText;
  305. document.all.ClearForm.style.visibility="visible";
  306. document.all.BtnSubmit.value=" ";
  307. document.all.StartDate.select();
  308. }
  309. function clearForm(){
  310. document.all.autoKey.value="";
  311. document.all.StartDate.value="";
  312. document.all.EndDate.value="";
  313. document.all.UnitPrice.value="";
  314. document.all.BtnSubmit.value=" ";
  315. document.all.ClearForm.style.visibility="hidden";
  316. document.all.StartDate.select();
  317. }
  318. function hideIT()
  319. {
  320. //alert(document.all.aaa2.value)
  321. if(document.all.aaa2.value==2)
  322. {
  323. document.all.aaa1.style.visibility= 'visible'
  324. document.all.ownerAcc.value = "<%=trim(RS3("owner"))%>"
  325. }
  326. else
  327. {
  328. document.all.aaa1.style.visibility= 'hidden'
  329. document.all.ownerAcc.value = "-1"
  330. }
  331. }
  332. //-->
  333. </SCRIPT>
  334. <BR>
  335. <FORM METHOD=POST ACTION="?">
  336. <INPUT TYPE="hidden" name="id" value="<%=RS3("ID")%>">
  337. <TABLE border=0 align=center>
  338. <TR>
  339. <TD colspan=2 align=center><H3> </H3></TD>
  340. </TR>
  341. <TR>
  342. <TD align=left> </TD>
  343. <TD align=right>
  344. <INPUT TYPE="hidden" name="oldCatID" value="<%=RS3("catID")%>">
  345. <SELECT NAME="catItem" style='font-family: tahoma,arial ; font-size: 9pt; font-weight: bold' size="1">
  346. <option value="-1"> </option>
  347. <option value="-1">------------------</option>
  348. <%
  349. set RS4 = conn.Execute ("SELECT * FROM InventoryItemCategories")
  350. while not (RS4.eof) %>
  351. <OPTION value="<%=RS4("ID")%>"<%
  352. if trim(RS3("catID")) = trim(RS4("ID")) then
  353. response.write " selected "
  354. end if
  355. %>>* <%=RS4("Name")%> </option>
  356. <%
  357. RS4.MoveNext
  358. wend
  359. RS4.close
  360. %>
  361. </SELECT>
  362. </TD>
  363. </TR>
  364. <TR>
  365. <TD align=left> </TD>
  366. <TD align=right><INPUT TYPE="text" NAME="ItemName" value="<%=RS3("Name")%>" size=64></TD>
  367. </TR>
  368. <TR>
  369. <TD align=left> </TD>
  370. <TD align=right><INPUT TYPE="hidden" NAME="ownerAcc" value="-1"><INPUT TYPE="hidden" NAME="cost" value="FIFO"><INPUT TYPE="text" NAME="OldItemID" value="<%=RS3("OldItemID")%>"></TD>
  371. </TR>
  372. <TR>
  373. <TD align=left> </TD>
  374. <TD align=right><INPUT dir=ltr TYPE="text" NAME="Minim" value="<%=RS3("Minim")%>"></TD>
  375. </TR>
  376. <TR>
  377. <TD align=left> </TD>
  378. <TD align=right><INPUT TYPE="hidden" NAME="oldQtty" value="<%=RS3("Qtty")%>"><INPUT dir=ltr TYPE="text" NAME="qtty" value="<%=RS3("Qtty")%>"></TD>
  379. </TR>
  380. <TR>
  381. <TD align=left> </TD>
  382. <TD align=right><INPUT TYPE="text" NAME="Unit" value="<%=RS3("Unit")%>"></TD>
  383. </TR>
  384. <TR>
  385. <TD align=left><INPUT TYPE="checkbox" NAME="outByOrder" <% if RS3("outByOrder") then%> checked <% end if %>></TD>
  386. <TD align=right> </TD>
  387. </TR>
  388. <TR>
  389. <TD align=left></TD>
  390. <TD align=right height=20>
  391. <BR><INPUT TYPE="submit" NamE="submit" value=" ">
  392. </TD>
  393. </TR>
  394. </TABLE>
  395. </FORM>
  396. <%
  397. if Auth(5 , "D") then 'Set Market Price
  398. %>
  399. <hr>
  400. <FORM METHOD=POST ACTION="?act=editPrice">
  401. <TABLE style="border:dashed 1px navy;" align=center>
  402. <TR>
  403. <TD colspan=2 align=center><H3> / BHR</H3></TD>
  404. </TR>
  405. <TR>
  406. <TD align=left> </TD>
  407. <TD align=right width=300><b><%=RS3("Name")%></b></TD>
  408. </TR>
  409. <TR>
  410. <TD colspan=2 align=center>
  411. <%
  412. set RS4 = conn.Execute ("SELECT InventoryItemsUnitPrice.*, Users.RealName AS CreatorName FROM InventoryItemsUnitPrice INNER JOIN Users ON InventoryItemsUnitPrice.CreatedBy = Users.ID WHERE (InventoryItem='" & RS3("ID") & "') ORDER BY StartDate ")
  413. if not RS4.eof then
  414. %>
  415. <TABLE id="prices" class="table12" border=0 cellpadding=2 cellspacing=1 bgcolor="0">
  416. <TR bgcolor="#AAAAAA">
  417. <TH width=75></TD>
  418. <TH width=75></TD>
  419. <TH width=75> </TD>
  420. <TH width=90></TD>
  421. </TR>
  422. <%
  423. while not (RS4.eof)
  424. tmpCounter = tmpCounter + 1
  425. if tmpCounter mod 2 = 1 then
  426. tmpColor="#FFFFFF"
  427. tmpColor2="#FFFFBB"
  428. Else
  429. tmpColor="#DDDDDD"
  430. tmpColor2="#EEEEBB"
  431. End if
  432. %>
  433. <TR bgcolor="<%=tmpColor%>" style="cursor: hand;" onMouseOver="this.style.backgroundColor='<%=tmpColor2%>'" onMouseOut="this.style.backgroundColor='<%=tmpColor%>'" onclick="copyInfo(this.rowIndex)">
  434. <TD><%=RS4("StartDate")%></TD>
  435. <TD><%=RS4("EndDate")%></TD>
  436. <TD><%=Separate(RS4("UnitPrice"))%></TD>
  437. <TD style="direction:rtl" title="<%=RS4("CreatedDate") & "(" & RS4("CreatedTime") & ")"%>">
  438. &nbsp;<%=RS4("CreatorName")%>
  439. <INPUT TYPE="hidden" value="<%=RS4("autoKey")%>">
  440. </TD>
  441. </TR>
  442. <%
  443. RS4.MoveNext
  444. wend
  445. %> </TABLE>
  446. <%
  447. end if
  448. RS4.close
  449. %>
  450. </TD>
  451. </TR>
  452. <TR>
  453. <TD colspan=2 align=center><HR></TD>
  454. </TR>
  455. <TR>
  456. <TD align=left> </TD>
  457. <TD align=right><INPUT dir=ltr TYPE="text" NAME="StartDate" value="" onblur="acceptDate(this)" ></TD>
  458. </TR>
  459. <TR>
  460. <TD align=left> </TD>
  461. <TD align=right><INPUT dir=ltr TYPE="text" NAME="EndDate" value="" onblur="acceptDate(this)" ></TD>
  462. </TR>
  463. <TR>
  464. <TD align=left> ()</TD>
  465. <TD align=right><INPUT TYPE="text" NAME="UnitPrice" value="" onblur="this.value = val2txt(txt2val(this.value))"></TD>
  466. </TR>
  467. <TR>
  468. <TD align=right>
  469. <input type="button" value="" name="ClearForm" onclick="clearForm()" style="visibility:hidden;">
  470. </TD>
  471. <TD align=right height=20>
  472. <INPUT TYPE="hidden" name="autoKey" value="">
  473. <INPUT TYPE="hidden" name="InventoryItem" value="<%=RS3("ID")%>">
  474. <INPUT TYPE="submit" name="BtnSubmit" value=" ">
  475. </TD>
  476. </TR>
  477. </TABLE>
  478. </FORM>
  479. <%
  480. end if
  481. end if
  482. %>
  483. <!--#include file="tah.asp" -->