<%@ 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) '''''''''''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 " '''''''''''''''''''''''''''''''''''''' %> Corrugator I Program datepicker demo
       
Period:  
       
<% header %>

Corrugator Machine I
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 '0' choice_click, a.ship_date, a.ship_no, (select cust_nm from stb010t(nolock) where cust_cd = max(a.cust_cd)) cust_nm, max(a.time_chk) time_chk, isnull(right(max(b.good_date),6),'') good_date, max(b.good_seq) good_seq, max(a.chk_tit) chk_tit, (select left(code_nm,2) from sta010t(nolock) where major_cd = '9015' and minor_cd = max(a.chk_tit)) chk_tit_nm, max(a.iva_chk) iva_chk, max(a.prt_chk) prt_chk, isnull(max(b.sales_qty),0) sales_qty , sum(a.chul_qty) chul_qty from chul010t a(nolock) left outer join ( select a.mov_date, a.mov_seq, max(b.good_date) good_date, max(b.good_seq) good_seq, sum(a.sales_qty) sales_qty from sal012t a(nolock), sal020t b(nolock) where a.chul_date = b.chul_date and a.chul_seq = b.chul_seq and a.chul_sub = b.chul_sub and left(a.mov_date,4) = left('2018',4) group by a.mov_date, a.mov_seq) b on a.ship_no = b.mov_date + b.mov_seq where a.crp_id = '10' and a.ship_date between '20181017' and '20181017' and a.cust_cd <> '20001' and a.cust_cd like '%' and a.good_cd like '%' and a.chk_tit like '%'group by a.ship_date, a.ship_no order by a.ship_date, left(a.ship_no,8) desc, a.ship_no") If Rscorr.EOF And Rscorr.BOF Then response.Write("No records exist for corr. this date.") Else %>
<% TOTML=0 TOTM2=0 Rscorr.movefirst 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") RsCORR.MoveNext 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
PROD DATE(JOBYMD) SHIFT (JOBJO) ORDER NO.(SUJUNO) CUSTOMER(CUST) BOX ITEM(BOX_NM) FLUTE(GOL) PAPER COMBINATION(JIJG) LENGTH(JANG) WIDTH(WPOK) TARGET(QTY) PROD QTY(PQTY) TOTAL LENGTH (M) TOTAL M2 Bad Qty(EQTY) Work Hr Stop Hr
<%= Rscorr("JOBYMD")%> <%= Rscorr("JOBJO")%> <%= 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%>
                 
<%=FORMATNUMBER(TOTTARGET,0)%> 
<%=FORMATNUMBER(TOTPROD,0) %> 
<%=FORMATNUMBER(TOTML,0) %> M
<%=FORMATNUMBER(TOTM2,0) %> M2
<%=FORMATNUMBER(TOTbad,0) %> 
<%=TOTwt %> hrs
<%=TOTdt %> hrs