<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% on error resume next Session.Timeout = 420 Server.ScriptTimeout = 5000 busca=request.QueryString("busca") doc=request.QueryString("doc") origen=request.QueryString("origen") Date_ini=Request.Form("Date_ini") Date_end=Request.Form("Date_end") lvende=Request.Form("cvende") criterio22=Request.Form("criterio22") if criterio22="" then xcriterio22=" Todos " end if if Date_ini="" or Date_ini=null then Date_ini=date()-1 Date_end=date()-1 end if Date_end2=cdate(Date_end)+1 Date_end3=cdate(Date_end)+1 turno1="065000" turno2="152000" turno3="232000" '''''''''''calcula strday = Right("00" & Day(Date_ini), 2) strmonth = Right("00" & Month(Date_ini), 2) stryear = Right("0000" & Year(Date_ini), 4) strday2 = Right("00" & Day(Date_end2), 2) strmonth2 = Right("00" & Month(Date_end2), 2) stryear2 = Right("0000" & Year(Date_end2), 4) fechainicial = CStr(stryear & strmonth & strday) fechafinal2 = CStr(stryear2 & strmonth2 & strday2) 'response.write(fechainicial&" ") 'response.write("FF "&fechafinal2) strday2 = Right("00" & Day(Date_end), 2) strmonth2 = Right("00" & Month(Date_end), 2) stryear2 = Right("00" & Year(Date_end), 4) fechafinal = CStr(stryear2 + strmonth2 + strday2) set strConexao = CreateObject("ADODB.Connection") ' seteas la conexion 'strConexao.Open("DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=molra; DBNAME=192.168.0.201:C:\PAUL\data\CARDBOARD20.FDB") 'response.write("Error "&Err.number&" .") 'HandleError Err.number if Err.number<>0 then response.write(" Error "&Err.number) else 'abrir la base, fijate que esta en el directorio que la tienes ... Set Corr2 = Server.CreateObject("ADODB.Recordset") ' seteas el recordset Set Corr2 = dbsql5.Execute("SELECT * FROM tblcurrent") ' lo ejecutas lwo="B20"&mid(replace(Corr2("Didentity"),"-",""),3,10) lqry="SELECT * FROM PCSIN where sujuno='"&lwo&"'" Set rsorder=dbsql5.Execute("SELECT * FROM PCSINtest where stat='A' and sujuno='"&lwo&"'") 'Set Corr2 = strConexao.Execute("SELECT * FROM PCSIN where STAT<>'T' order by STIME,etime") ' lo ejecutas 'response.write(lqry) 'JOBJO,JOBYMD, JOBSEQ xday = Right("00" & Day(Date), 2) xmonth = Right("00" & Month(Date), 2) xyear = Right("00" & Year(Date), 4) xdate=xyear&xmonth&xday Dim Rsfore0 Dim Sqlfore0 ltqty = rsorder("tqty") 'set Rsfore0=dbsql3.execute("SELECT * FROM forecast WHERE id=49") 'xday2 = Right("00" & Rsfore0("month"), 2) 'xmonth2 = Right("00" & Rsfore0("forecast"), 2) 'xyear2 = Right("00" & Rsfore0("year"), 4) 'xdate2=xyear2&xmonth2&xday2 xday2 = mid(Corr2("hlsec"),7, 2) xmonth2 = mid(Corr2("hlsec"),5, 2) xyear2 = mid(Corr2("hlsec"),1,4) 'xdate2=xyear2&xmonth2&xday2 xdate2="20230915" If xdate>xdate2 Then response.write (ErrorNo1) else %> Corrugator II datepicker demo
<% if Not corr2.EOF and Not corr2.BOF then %> <% if Corr2("lspeed")>0 then if cdbl(rsorder("tqty"))-cdbl(Corr2("hcuts"))>0 then ltimeleft=(cdbl(rsorder("tqty"))-cdbl(Corr2("hcuts")))*cint(rsorder("jang"))/1000/cdbl(Corr2("lspeed"))*60 hores = int((ltimeleft/3600)) aux = int(ltimeleft-(3600*hores)) minuts = int(aux/60) segons = int(ltimeleft-hores*3600-minuts*60) left_time = hores&":"&right("00"&minuts,2)&":"&right("00"&segons,2) else ltimeleft=(cdbl(rsorder("hcuts"))-cdbl(Corr2("tqty")))*cint(rsorder("jang"))/1000/cdbl(Corr2("lspeed"))*60 hores = int((ltimeleft/3600)) aux = int(ltimeleft-(3600*hores)) minuts = int(aux/60) segons = int(ltimeleft-hores*3600-minuts*60) left_time = " + "&hores&":"&right("00"&minuts,2)&":"&right("00"&segons,2) end if else ldtime=int(Corr2("segundos2")) dhores = int((ldtime/3600)) daux = int(ldtime-(3600*dhores)) dminuts = int(daux/60) dsegons = int(ldtime-dhores*3600-dminuts*60) down_time = " + "&dhores&":"&right("00"&dminuts,2)&":"&right("00"&dsegons,2) end if %> <% end if corr2.close end if '''''''''''''''''''''''' %>
CORRUGATOR II
Hora:
<%=Time()%>
ORDER: <%=left(Corr2("Didentity"),14)%>
Customer:
<%=left(rsorder("cust"),20)%>
Part Number:
<%=left(rsorder("boxname"),15)%>
SPEED:
<%=Corr2("lspeed")%>
WO/Target: Prod QTY:
<%=rsorder("qty")&"/"<qty%> <%=Corr2("hcuts")%>
Downtime: Time Left:
<%=down_time%> <%=left_time%>
Size:
<%=(cint(rsorder("jang")))&"x"&(cint(rsorder("wpok")))&" / "&rsorder("pokno")%>
<% 'Corr2.Close strConexao.Close Set strConexao=Nothing End If Rsfore0.Close Set Rsfore0 = Nothing dbsql5.Close Set dbsql5 = Nothing ''''''''''''' %>