<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
|
<%Session.CodePage=65001%>
|
<!--#include virtual="/inc/chkadmin.gds"-->
|
<!--#include virtual="/inc/function.gds"-->
|
<script language=javascript>
|
var ShelvesListArray=new Array()
|
<%
|
ShelvesSearchTXT=trim(Request("ShelvesSearchTXT"))
|
WarehouseID=trim(Request("WarehouseID"))
|
InWarehouseID=trim(Request("InWarehouseID"))
|
OrdType=trim(Request("OrdType"))
|
acc1=trim(Request("page"))
|
if acc1="" then acc1=1
|
acc2=1
|
i=0
|
acc3=0
|
Set rs = Server.CreateObject("ADODB.Recordset")
|
if WarehouseID<>"" then
|
SqlStock="(select isnull(sum(StockQty),0) from MRP_Stock where StItmIDPK=strItmID and StockWarehouseID="&WarehouseID&")"
|
else
|
SqlStock="'--'"
|
end if
|
if InWarehouseID<>"" then
|
SqlInStock="(select isnull(sum(StockQty),0) from MRP_Stock where StItmIDPK=strItmID and StockWarehouseID="&InWarehouseID&")"
|
else
|
SqlInStock="'--'"
|
end if
|
if len(ShelvesSearchTXT)>0 then
|
sql="select id,vID,vtext,vtitle,vType,vMono,vOrder,vOrder2,WarehouseName from dictionary,MRP_Warehouse where WarehouseID=vOrder and vtitle in ('WarehouseShelves') and (vtext like '%"&searchTXT&"%' or vtitle='"&searchTXT&"' or vOrder in (select WarehouseID from MRP_Warehouse where WarehouseName like '%"&searchTXT&"%')) "
|
else
|
sql="select id,vID,vtext,vtitle,vType,vMono,vOrder,vOrder2,WarehouseName from dictionary,MRP_Warehouse where WarehouseID=vOrder and vtitle in ('WarehouseShelves') "
|
end if
|
rs.open Sql,objConn,1,1
|
if not rs.eof then
|
rs.pagesize=10
|
rs.absolutepage=acc1
|
acc2=rs.pagecount
|
acc3=rs.recordcount
|
end if
|
do while not rs.Eof and i<10
|
ShelvesID = rs("id")
|
ShelvesName = rs("vtext")
|
vOrder = rs("vOrder")
|
vOrder2 = rs("vOrder2")
|
WarehouseName = rs("WarehouseName")
|
%>
|
ShelvesListArray[<%=i%>]=new Array("<%=ShelvesID%>","<%=ShelvesName%>","<%=vOrder%>","<%=vOrder2%>","<%=WarehouseName%>")
|
<%i=i+1
|
rs.movenext
|
loop
|
rs.close()
|
%>
|
parent.JS_ShelvesList(ShelvesListArray,<%=acc1%>,<%=acc2%>,'<%=ShelvesSearchTXT%>',<%=acc3%>);
|
</script>
|
<%Response.End%>
|