<%@ LANGUAGE = "VBScript" %> <%Response.Buffer = False%> <% Session.Timeout = 120 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()-(day(date()))+1 Date_ini=date()-1 Date_end=date()-1 end if dia1=right("00"&day(Date_ini),2) mes1=right("00"&month(Date_ini),2) anno1=right("00"&year(Date_ini),4) 'Date_inii=cdate(dia1+"/"+mes1+"/"+anno1) cfechai=cdbl(anno1+mes1+dia1) dia2=right("00"&day(Date_end),2) mes2=right("00"&month(Date_end),2) anno2=right("00"&year(Date_end),4) 'cfechaf=cdate((dia2+"/"+mes2+"/"+anno2)) cfechaf=cdbl(anno2+mes2+dia2) ''''''''''''''''''''''''''''''' inicio maquinas Dim aturno aturno = Session("turno") If isArray(aturno)=false Then ReDim aturno(60,18) aturno(0,1)="SUPER JUMBO" aturno(1,1)="JUMBO FLEXO" aturno(2,1)="MARTIN-1" aturno(3,1)="MARTIN-2" aturno(4,1)="WARD" aturno(5,1)="ISOWA" aturno(6,1)="ICHIKAWA" aturno(7,1)="LANGSTON" aturno(8,1)="McKinley" aturno(9,1)="MARTIN 3" aturno(10,1)="AIFEIER" aturno(11,1)="MARTIN 4" aturno(12,1)="PIEMME" aturno(13,1)="AUTOMAX 1" aturno(14,1)="AUTOMAX 2" aturno(15,1)="AUTOMAX 3" aturno(16,1)="LABEL(STOCK)" aturno(17,1)="Stock II" aturno(18,1)="LABEL(MANUAL)" aturno(19,1)="GLUING" aturno(20,1)="FOSHAN DUPLEX GLUER" aturno(21,1)="SLITTER" aturno(22,1)="STITCHING" aturno(23,1)="PALLETIZE / STACK" aturno(24,1)="VBOARD" session("turno") = aturno end if aturno = Session("turno") '''''''''''''''''''''''''''''''''''' fin maquinas lturno1t=200 lturno2t=152 lturno3t=116 lturnotot=468 lturno1m=34 lturno2m=24 lturno3m=8 ltotmach=66 lturno1a=14 lturno2a=5 lturno3a=7 ltotaut=26 ''''''''******* PERSONAL POR TURNO strday = Right("00" & Day(Date_ini), 2) strmonth = Right("00" & Month(Date_ini), 2) stryear = Right("00" & Year(Date_ini), 4) strday2 = Right("00" & Day(Date_end), 2) strmonth2 = Right("00" & Month(Date_end), 2) stryear2 = Right("00" & Year(Date_end), 4) fechainicial = CDbl(stryear + strmonth + strday) fechafinal = CDbl(stryear2 + strmonth2 + strday2) '''''''''''''''''''''''''''''''''''''' 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" General Error. Call Support " else %> Report Corrugator datepicker demo
       
Period:  
         
<% header %>

<% '''''''''''calcula strday = Right("00" & Day(Date_ini), 2) strmonth = Right("00" & Month(Date_ini), 2) stryear = Right("00" & Year(Date_ini), 4) strday2 = Right("00" & Day(Date_end), 2) strmonth2 = Right("00" & Month(Date_end), 2) stryear2 = Right("00" & Year(Date_end), 4) fechainicial = CStr(stryear + strmonth + strday) fechafinal = CStr(stryear2 + strmonth2 + strday2) 'response.write(fechainicial)&" FI " ' response.write(fechafinal)&" Ff " %>

Production Corrugator Machine
Date: <%=Date_ini%> To: <%=Date_end%> Generated: <%=time%>
<% '************** Inventory 'lturno=0 Dim Rsinven1, Rsinven2, rswip, Rsmachine Dim Sqlinven1, sqlinven2, sqlwip ''''''''''''''''''''''''''''''''''''''' set Rscorr=dbsqlcorr.execute("select GOL,JIJG,JANG,WPOK,QTY,PQTY,SUJUNO,JOBYMD,CUST,BOX_NM,eqty,jtime,dtime,JOBJO,stime,etime from SHPSOUT(nolock) where jobymd between '" & fechainicial & "' and '" & fechafinal & "' order by JOBYMD,JOBJO") If Rscorr.EOF And Rscorr.BOF Then response.Write("No records exist for corr. this date.") Else %>
<% TOTML=0 TOTM2=0 Rscorr.movefirst lturno1=Rscorr("JOBJO") lturno2=Rscorr("JOBJO") Do While Not Rscorr.EOF %> <% totalTiempo = Rscorr("dtime") hores = int((totalTiempo/3600)) aux = int(totalTiempo-(3600*hores)) minuts = int(aux/60) segons = totalTiempo-hores*3600-minuts*60 Downtime = hores&":"&right("00"&minuts,2)&":"&right("00"&segons,2) Tiempo2 = Rscorr("jtime") hores2 = int((Tiempo2/3600)) aux2 = int(Tiempo2-(3600*hores2)) minuts2 = int(aux2/60) segons2 = Tiempo2-hores2*3600-minuts2*60 Worktime = hores2&":"&right("00"&minuts2,2)&":"&right("00"&segons2,2) %> <% TOTTARGET=TOTTARGET+Rscorr("QTY") TOTPROD=TOTPROD+Rscorr("PQTY") TOTML=TOTML+(Rscorr("JANG")*Rscorr("PQTY")/1000) TOTM2=TOTM2+(Rscorr("JANG")*Rscorr("WPOK")*Rscorr("PQTY")/1000000) TOTbad=TOTbad+Rscorr("eQTY") TOTjtime=TOTjtime+Rscorr("jtime") TOTdtime=TOTdtime+Rscorr("dtime") TOTITEMS=TOTITEMS+1 TOTTARGET2=TOTTARGET2+cdbl(Rscorr("QTY")) TOTPROD2=TOTPROD2+cdbl(Rscorr("PQTY")) TOTML2=TOTML2+(Rscorr("JANG")*Rscorr("PQTY")/1000) TOTM22=TOTM22+(Rscorr("JANG")*Rscorr("WPOK")*Rscorr("PQTY")/1000000) TOTbad2=TOTbad2+cdbl(Rscorr("eQTY")) TOTjtime2=TOTjtime2+cdbl(Rscorr("jtime")) TOTdtime2=TOTdtime2+cdbl(Rscorr("dtime")) RsCORR.MoveNext if not RsCORR.eof then shora2=int(mid(RsCORR("STIME"),1,2)&mid(RsCORR("STIME"),4,2)&mid(RsCORR("STIME"),7,2)) Ehora2=int(mid(RsCORR("ETIME"),1,2)&mid(RsCORR("ETIME"),4,2)&mid(RsCORR("ETIME"),7,2)) 'response.write(" sh "&shora2) 'response.write(" eh "&ehora2) if shora2>064959 and shora2<152000 then lturno2="1" end if if shora2>151959 and shora2<232000 then lturno2="2" 'response.write(" t2x "&ehora2) end if if shora2>231959 or shora2<065000 then lturno2="3" end if if shora2<065000 and Ehora2>064959 then 'response.write(" t20 "&ehora2) shora1x=int(mid(RsCORR("STIME"),1,2))*3600 shora2x=int(mid(RsCORR("STIME"),4,2))*60 shora3x=int(mid(RsCORR("STIME"),7,2)) hstartx=shora1x+shora2x+shora3x ehora1x=int(mid(RsCORR("ETIME"),1,2))*3600 ehora2x=int(mid(RsCORR("ETIME"),4,2))*60 ehora3x=int(mid(RsCORR("ETIME"),7,2)) hendx=ehora1x+ehora2x+ehora3x Shift1=24600 Sec1x=int(Shift1-hstartx) Sec2x=int(hendx-Shift1) if Sec2x>Sec1x then lturno2="1" end if end if 'response.write(RsCORR("STIME")&" ") 'response.write(RsCORR("ETIME")&" ") if (RsCORR("STIME")<"15:20:00" and RsCORR("ETIME")>"15:19:59") or (RsCORR("STIME")<"23:20:00" and RsCORR("ETIME")>"23:19:59") then 'response.write(" t21 "&ehora2) shn1=int(mid(RsCORR("STIME"),1,2))*3600 shn2=int(mid(RsCORR("STIME"),4,2))*60 shn3=int(mid(RsCORR("STIME"),7,2)) hstn=shn1+shn2+shn3 ehn1=int(mid(RsCORR("ETIME"),1,2))*3600 ehn2=int(mid(RsCORR("ETIME"),4,2))*60 ehn3=int(mid(RsCORR("ETIME"),7,2)) hend2n=ehn1+ehn2+ehn3 if (shora2<"152000" and Ehora2>"151959") then Shift2=55200 Sec1n=int(Shift2-hstn) Sec2n=int(hend2n-Shift2) if Sec1n>Sec2n then lturno2="1" else lturno2="2" end if 'response.write(" t2 "&Sec2n) end if if (shora2<232000 and Ehora2>231959) then Shift3=84000 Sec1n3=int(Shift3-hstn) Sec2n3=int(hend2n-Shift3) if Sec1n3>Sec2n3 then lturno2="2" else lturno2="3" end if end if end if lturno2=Rscorr("JOBJO") end if 'response.write(" t1 "<urno1) if RsCORR.eof or lturno1<>lturno2 then 'response.write(" t2 "<urno2) if TOTML2>0 and (TOTjtime2+TOTdtime2)>0 then lspeedtot2=int(TOTML2/((TOTjtime2+TOTdtime2)/60)) else lspeedtot2=0 end if if TOTTARGET2>0 then hores5 = int((TOTjtime2/3600)) aux5 = int(TOTjtime2-(3600*hores5)) minuts5 = int(aux5/60) segons5 = TOTjtime2-hores5*3600-minuts5*60 Worktime5 = hores5&":"&right("00"&minuts5,2)&":"&right("00"&segons5,2) %> <% lturno1=lturno2 TOTTARGET2=0 TOTPROD2=0 TOTML2=0 TOTM22=0 TOTbad2=0 TOTjtime2=0 TOTdtime2=0 end if end if LOOP END IF rscorr.close '''''''''''''''''''''''' Tiempod = TOTdtime hores3 = int((Tiempod/3600)) aux3 = int(Tiempod-(3600*hores3)) minuts3 = int(aux3/60) segons3 = Tiempod-hores3*3600-minuts3*60 totdt = 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 totwt = hores4&":"&right("00"&minuts4,2)&":"&right("00"&segons4,2) %>
CORRUGATOR I (Plant 1)
JOB DATE SHIFT TIME W.O. CUSTOMER ITEM FLUTE CMBINATION LENGTH WIDTH WO QTY PROD QTY M M2 BAD Qty WORK TIME DELAY TIME AVG SPEED
<%= Rscorr("JOBYMD")%> <%= Rscorr("JOBJO")%> <%=Rscorr("STIME")&"-"&Rscorr("ETIME")%> <%= Rscorr("SUJUNO")%> <%= Rscorr("CUST")%> <%= Rscorr("BOX_NM")%> <%= Rscorr("GOL")%> <%= Rscorr("JIJG")%> <%= Rscorr("JANG")%> <%= Rscorr("WPOK")%> <%= Rscorr("QTY")%> <%= Rscorr("PQTY")%> <%= formatnumber((Rscorr("JANG")*Rscorr("PQTY")/1000),0)%> <%= formatnumber((Rscorr("JANG")*Rscorr("WPOK")*Rscorr("PQTY")/1000000),0) %><%= Rscorr("EQTY")%> <%= worktime%> <%= downtime%>
    Shift TOTAL               <%=formatnumber(TOTTARGET2,0)%> <%=formatnumber(TOTPROD2,0)%>
<%=formatnumber(TOTML2,0)%> M
<%=formatnumber(TOTM22,0)%> M2
<%=formatnumber(TOTbad2,0)%>
<%=worktime5%>
<%=formatnumber(lspeedtot2,0)%>
    TOTAL       <%=formatnumber(TOTITEMS,0)%>      
<%=FORMATNUMBER(TOTTARGET,0)%> 
<%=FORMATNUMBER(TOTPROD,0) %> 
<%=FORMATNUMBER(TOTML,0) %> M
<%=FORMATNUMBER(TOTM2,0) %> M2
<%=FORMATNUMBER(TOTbad,0) %> 
<%=TOTwt %> hrs
<%=TOTdt %> hrs

 

<% End If Rsfore0.Close Set Rsfore0 = Nothing dbsql3.Close Set dbsql3 = Nothing ''''''''''''' %>