%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Session.LCID = 1033 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") naction=Request.Form("naction") if criterio22="" then xcriterio22=" Todos " end if if Date_ini="" or Date_ini=null then Date_ini=date()-1 Date_end=date() end if Date_end2=cdate(Date_end) 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), 2) strday2 = Right("00" & Day(Date_end2), 2) strmonth2 = Right("00" & Month(Date_end2), 2) stryear2 = Right("0000" & Year(Date_end2), 2) 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� driver; UID=SYSDBA;PWD=MOLRA; DBNAME=\\desktop-6psmf8k\firebird_db\CARDBOARD20.fdb") '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 'abrir la base, fijate que esta en el directorio que la tienes ... Set Corr2 = Server.CreateObject("ADODB.Recordset") ' seteas el recordset if naction="Pend" then 'lq="SELECT * FROM PCSIN where (jobymd between '" & fechainicial & "' and '" & fechafinal2 & "') and left(STAT,1)<>'T' order by serialval,sujuno" Set Corr2 = dbsql5.Execute("SELECT * FROM PCSINtest where left(STAT,1)<>'T' order by serialval,sujuno") else lq="SELECT * FROM PCSINtest where (jobymd between '" & fechainicial & "' and '" & fechafinal2 & "') and left(STAT,1)='T' order by jobymd, stime,jobjo,etime" Set Corr2 = dbsql5.Execute("SELECT * FROM PCSINtest where (jobymd between '" & fechainicial & "' and '" & fechafinal2 & "') and left(STAT,1)='T' order by jobymd, stime,jobjo,etime") end if 'response.write(lq) if Err.number<>0 then response.write(" Error "&Err.number) else ' lo ejecutas 'xq="SELECT * FROM PCSIN where (jobymd between '" & fechainicial & "' and '" & fechafinal2 & "') and left(STAT,1)='T' order by jobymd, jobjo,sujuno" 'response.write(xq) '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 Set Corrv = Server.CreateObject("ADODB.Recordset") ' seteas el recordset Set Corrv = dbsql5.Execute("SELECT * FROM tblcurrent") ' lo ejecutas set Rsfore0=dbsql3.execute("SELECT * FROM forecast WHERE id=49") 'Set Rsfore = CurrentDb.OpenRecordset(Sqlfore) xday2 = mid(Corrv("hlsec"),7, 2) xmonth2 = mid(Corrv("hlsec"),5, 2) xyear2 = mid(Corrv("hlsec"),1,4) xdate2=xyear2&xmonth2&xday2 'xdate2="20220812" If xdate>xdate2 Then response.write (ErrorNo1) else %>
CORRUGATOR II |
|||||||||||||||||||||||||||||||||
| JOB DATE | SHIFT | TIME | ORDER NO | CUSTOMER | ITEM | FLUTE | COMBINATION | LENGTH | WIDTH | WO | WO 2 | Out | PROD | PROD 2 | +/- | M | M2 | BAD QTY | WORK HOUR | STOP HOUR | AVG SPEED | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <%=Corr2("jobymd")%> | <%=xTurnox%> | <%=lstime&" "&lEtime%> | <%=locwo%> | <%=Corr2("cust")%> | <%=Corr2("Boxname")%> | <%=Corr2("GOL")%> | <%=Corr2("BEHAP")%> | <%=Corr2("Jang")%> | <%=Corr2("WPOK")%> | <% if corr2("JOBSEQ")=1 then pqtyant=cdbl(corr2("pQTY")) %><%=Corr2("PQTY")%> | <%=cdbl(Corr2("PQTY"))*cdbl(Corr2("Pokno"))%> | <%=Corr2("Pokno")%> | <%=cdbl(Corr2("PQTY"))-cdbl(Corr2("PREPQTY"))%> | <%=(cdbl(Corr2("PQTY"))-cdbl(Corr2("PREPQTY")))*cdbl(Corr2("Pokno"))%> | <%=cdbl(Corr2("PQTY"))-cdbl(Corr2("PREPQTY"))-cdbl(Corr2("PQTY"))%> | <% else if pqtyant>0 and corr2("ROWMOVEKEY")="D" then %><%=cdbl(Corr2("TQTY"))-cdbl(pqtyant)%> | <%=(cdbl(Corr2("TQTY"))-cdbl(pqtyant))*cdbl(Corr2("Pokno"))%> | <%=Corr2("Pokno")%> | <%=cdbl(Corr2("PQTY"))-cdbl(Corr2("PREPQTY"))%> | <%=(cdbl(Corr2("PQTY"))-cdbl(Corr2("PREPQTY")))*cdbl(Corr2("Pokno"))%> | <%=cdbl(Corr2("PQTY"))-cdbl(Corr2("PREPQTY"))-cdbl(Corr2("TQTY"))-cdbl(pqtyant)%> | <% pqtyant=0 else%><%=Corr2("TQTY")%> | <%=cdbl(Corr2("TQTY"))*cdbl(Corr2("Pokno"))%> | <%=Corr2("Pokno")%> | <%=cdbl(Corr2("PQTY"))-cdbl(Corr2("PREPQTY"))%> | <%=(cdbl(Corr2("PQTY"))-cdbl(Corr2("PREPQTY")))*cdbl(Corr2("Pokno"))%> | <%=cdbl(Corr2("PQTY"))-cdbl(Corr2("PREPQTY"))-cdbl(Corr2("TQTY"))%> | <% end if end if %><%=formatnumber(lm,0)%> | <%=formatnumber(lm2,0)%> | <%=Corr2("EQTY")%> | <%=worktime%> | <%=downtime%> | <%=Corr2("AVGSPEED")%> |
| <%=lshift%> Shift TOTAL | <%=formatnumber(TOTTARGET2,0)%> | <%=formatnumber(TOTTARGET2q,0)%> | <%=formatnumber(TOTPROD2,0)%> | <%=formatnumber(TOTPROD2q,0)%> | <%=formatnumber(TOTdif2,0)%> | <%=formatnumber(TOTML2,0)%> M |
<%=formatnumber(TOTM22,0)%> M2 |
<%=formatnumber(TOTbad2,0)%> | <%=worktime5%> |
<%=delaytime5%> |
<%=formatnumber(lspeedtot2,0)%> | ||||||||||||||||||||||
| GRAND TOTAL | <%=formatnumber(TOTITEMS,0)%> | <%=formatnumber(TOTTARGET,0)%> |
<%=formatnumber(TOTTARGETq,0)%> |
<%=formatnumber(TOTPROD,0)%> |
<%=formatnumber(TOTPRODq,0)%> |
<%=formatnumber(TOTdif,0)%> |
<%=formatnumber(TOTML,0)%> M |
<%=formatnumber(TOTM2,0)%> M2 |
<%=formatnumber(TOTbad,0)%> |
<%=totwt2%> |
<%=totdt2%> |
<%=formatnumber(lspeedtot,0)%> | |||||||||||||||||||||