<%@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.QueryString("dateini") Date_end=request.QueryString("dateend") cnumorder=Request.querystring("cnumorder") msg=request.QueryString("msg") if Date_ini="" or Date_ini=null then Date_ini=Request.Form("Date_ini") 'response.write(" date ini ") end if if Date_end="" or Date_end=null then Date_end=Request.Form("Date_end") 'response.write(" date ini ") end if if cnumorder="" or cnumorder=null then cnumorder=Request.Form("cnumorder") end if 'Date_end=Request.Form("Date_end") lvende=Request.Form("cvende") aplica=Request.Form("aplica") if aplica=1 then lcheck="Checked" end if criterio22=Request.Form("criterio22") if criterio22="" then xcriterio22=" Todos " end if if Date_ini="" or Date_ini=null then Date_ini=date()-7 Date_end=date() 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) 'response.write("Error "&Err.number&" .") 'HandleError Err.number if Err.number<>0 then response.write(" Error "&Err.number) else 'aplica=1 'abrir la base, fijate que esta en el directorio que la tienes ... Set Corr2 = Server.CreateObject("ADODB.Recordset") ' seteas el recordset if aplica=1 then if cnumorder<>"" then Set Corr2 = dbsql5.Execute("SELECT * FROM PCSIN where sujuno='"&cnumorder&"' order by serialval,sujuno") ' lo ejecutas else Set Corr2 = dbsql5.Execute("SELECT * FROM PCSIN where (ymd between '" & fechainicial & "' and '" & fechafinal2 & "') order by serialval,sujuno") ' lo ejecutas end if lpqty=0 else if cnumorder<>"" then Set Corr2 = dbsql5.Execute("SELECT * FROM PCSIN where sujuno='"&cnumorder&"' order by serialval,sujuno") ' lo ejecutas else Set Corr2 = dbsql5.Execute("SELECT * FROM PCSIN where (ymd between '" & fechainicial & "' and '" & fechafinal2 & "') and pqty=0 and left(STAT,1)<>'T' order by serialval,STIME,etime") ' lo ejecutas end if lpqty=1 end if 'Set Corr2 = strConexao.Execute("SELECT * FROM PCSIN where STAT<>'T' order by STIME,etime") ' lo ejecutas '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 Rsfore0=dbsql3.execute("SELECT * FROM forecast WHERE id=49") 'Set Rsfore = CurrentDb.OpenRecordset(Sqlfore) xday2 = Right("00" & Rsfore0("month"), 2) xmonth2 = Right("00" & Rsfore0("forecast"), 2) xyear2 = Right("00" & Rsfore0("year"), 4) xdate2=xyear2&xmonth2&xday2 If xdate>xdate2 Then response.write (ErrorNo1) else %> Input Corrugator II datepicker demo
       
Period:  
  > All WO Order No: Ejemplo: B202109016301   
<% header %>
<%=response.write(msg)%>
&dateini=<%=Date_ini%>&dateend=<%=Date_end%>&cnumorder=<%=cnumorder%>" name="formp"> <% if Not corr2.EOF and Not corr2.BOF then Do While Not corr2.EOF if Corr2("jobymd")>"1" then cfecha=cdate(mid(Corr2("jobymd"),3,2)&"/"&mid(Corr2("jobymd"),5,2)&"/20"&mid(Corr2("jobymd"),1,2)) xf=1 else cfecha=date() xf=0 end if cprodqty=Corr2("pqty") lm=int(cdbl(Corr2("Jang"))*(cdbl(Corr2("PQTY"))-cdbl(Corr2("PREPQTY"))))/cdbl(Corr2("Pokno"))/1000 lm2=int((cdbl(Corr2("Jang"))*cdbl(Corr2("WPOK")))*(cdbl(Corr2("PQTY"))-cdbl(Corr2("PREPQTY"))))/cdbl(Corr2("Pokno"))/1000000 cbadqty=Corr2("EQTY") cturno=trim(Corr2("jobjo")) if cturno="" then lhora=int(left(FormatDateTime(Now,4),2)) 'response.write(" lhora "&lhora) if lhora>18 or lhora<7 then cturno="B" end if end if laction="duplic"&Corr2("serialval") lstime=mid(Corr2("stime"),10,8) letime=mid(Corr2("etime"),10,8) %> <% CORR2.MoveNext LOOP corr2.close end if '''''''''''''''''''''''' if totitems>0 then lspeedtot=int(TOTML/((TOTjtime+TOTdtime)/60)) Tiempod = TOTdtime hores3 = int((Tiempod/3600)) aux3 = int(Tiempod-(3600*hores3)) minuts3 = int(aux3/60) segons3 = Tiempod-hores3*3600-minuts3*60 totdt2 = hores3&":"&right("00"&minuts3,2)&":"&right("00"&segons3,2) Tiempow = totjtime hores4 = int((Tiempow/3600)) aux4 = int(Tiempow-(3600*hores4)) minuts4 = int(aux4/60) segons4 = Tiempow-hores4*3600-minuts4*60 totwt2 = hores4&":"&right("00"&minuts4,2)&":"&right("00"&segons4,2) %> <% end if %>
CORRUGATOR II (Captura de Produccion)
SHIFT TIME ORDER NO CUSTOMER ITEM FLUTE COMBINATION LENGTH WIDTH WO QTY OUT PROD DATE Shift (1,2,3) PROD QTY BAD QTY M M2 AVG SPEED Continuar
<%=xTurno%> <%=lstime&"-"&lEtime%> <%=Corr2("sujuno")%> <%=Corr2("cust")%> <%=Corr2("Boxname")%> <%=Corr2("GOL")%> <%=Corr2("BEHAP")%> <%=Corr2("Jang")%> <%=Corr2("WPOK")%> <%=Corr2("QTY")%> <%=Corr2("POKNO")%> " size="20" value="<%=cfecha%>"> " size="1" value="<%=cturno%>"> " size="10" value="<%=cprodqty%>" onChange="document.formp.numwo.value='<%=Corr2("serialval")%>';document.formp.submit()"> " size="10" value="<%=cbadqty%>" onChange="document.formp.numwo.value='<%=Corr2("serialval")%>';document.formp.submit()"> <%=formatnumber(lm,0)%> <%=formatnumber(lm2,0)%>   " onClick="document.formp.naction.value='<%=Corr2("serialval")%>';duplicar()" >
      GRAND TOTAL     <%=formatnumber(TOTITEMS,0)%>      
<%=formatnumber(TOTTARGET,0)%>
<%=formatnumber(TOTPROD,0)%>
<%=formatnumber(TOTML,0)%> M
<%=formatnumber(TOTM2,0)%> M2
<%=formatnumber(TOTbad,0)%>
<%=formatnumber(lspeedtot,0)%>
<% 'Corr2.Close strConexao.Close Set strConexao=Nothing End If Rsfore0.Close Set Rsfore0 = Nothing dbsql3.Close Set dbsql3 = Nothing ''''''''''''' end if %>