<%@ LANGUAGE = "VBScript" %> <%Response.Buffer = False%> <% Session("turno")="" 'Session.Timeout = 120 Server.ScriptTimeout = 10000 busca=request.QueryString("busca") Date_ini=Request.Form("Date_ini") Date_end=Request.Form("Date_end") cwh=Request.Form("cwh") cshift=Request.Form("cshift") ccte=Request.Form("ccte") citem=Request.Form("citem") cmaquina=Request.Form("cmaquina") if Date_ini="" or Date_ini=null then Date_ini=date() end if if Date_end="" or Date_end=null then Date_end=date() end if if cwh="" or cwh=null or cwh="0" then cwh="%" end if if ccte="" or ccte=null then ccte="%" end if if citem="" or citem=null then citem="%" end if if cshift="" or cshift=null or cshift="4" then cshift="%" end if if cmaquina="" or cmaquina=null or cmaquina="000" then cmaquina="%" end if 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) lfecfinal= CStr(stryear2 & strmonth2 & strday2) lfecinicial=CStr(stryear & strmonth & strday) set Rsmaquinas=dbsql.execute("SELECT * FROM stb160t a(nolock)") '''''''''''''''''''''''''''''''''''''' %> Transfer by Machine datepicker demo
     
W/H Shift Customer Item
Machine:    


<% if busca="ok" then ldate= "20" & mid(lorderno,2,6) lseq= mid(lorderno,9,4) as_local_cd=cwh ldatei= lfecinicial ldatef= lfecfinal as_cust_cd= ccte as_good_cd= citem as_class= cshift as_loc_no= "%" as_item_class= "%" 'response.write(ldatei&" ") 'response.write(ldatef) 'response.write(as_local_cd) 'response.write(as_class) 'response.write(as_cust_cd) 'response.write(as_good_cd) 'response.write(" maq "&cmaquina) set Rstrans=dbsql.execute("select b.local_cd, (select code_nm from sta010t(nolock) where major_cd = '9016' and minor_cd = b.local_cd) local_nm, right(a.real_trans ,6) trans_date, (select proc_nm from stb160t(nolock) where proc_cd = a.proc_cd1) proc_nm, (select proc_nm from stb160t(nolock) where proc_cd = a.proc_cd) proc_nm2, (select cust_nm from stb010t(nolock) where cust_cd = b.cust_cd) cust_nm, b.item, b.ord_no, a.pallet_cnt, b.qty prod_qty, b.price, c.mae_m2, round(b.qty * b.price,3) prod_amt, round(c.mae_m2 * b.qty,0) prod_m2, (select code_nm from sta010t(nolock) where major_cd = '2004' and minor_cd = a.trans_class) work_gubun, case isnull(b.loc_no,'') when '' then '' else (select code_nm from sta010t(nolock) where major_cd = '9160' and minor_cd = b.loc_no) end loc_no, a.trans_time, a.proc_cd, right(a.prt_date,6) prt_day, 1 cnt from bar_code a(nolock), inout_table b(nolock), boa010t c(nolock), stb040t d(nolock) where a.bar_code = b.bar_code and b.class = '1' and b.prod_flag = '1' and a.chk_bit = '1' and a.crp_id = '10' and b.local_cd like '" & as_local_cd & "' and a.goods_class = c.goods_class and a.ord_date = c.ord_date and a.ord_seq = c.ord_seq and c.cust_cd = d.cust_cd and c.good_cd = d.good_cd and a.real_trans between '" & ldatei & "' and '" & ldatef & "' and b.cust_cd like '" & as_cust_cd & "' and b.item like '" & as_good_cd & "' and a.trans_class like '" & as_class & "' and b.loc_no like '" & as_loc_no & "' and d.item_class like '" & as_item_class & "' and a.proc_cd1 like '" & cmaquina & "' order by a.proc_cd1,b.local_cd, a.real_trans , a.trans_class, case when a.trans_date <> a.real_trans then '1' else '0' end , a.trans_time, b.cust_cd, b.item, b.ord_no, a.pallet_cnt") if Rstrans.eof and Rstrans.bof then else %> <% 'totpage=INT(rsorder("plan_qty")/lqtypallet)+1 'xpage=1 'xtotqty=int(rsorder("plan_QTY")) 'lqtypallet2=lqtypallet lfield=chr(47) lloteno="B"&trim(lorderno) ltotpallet=0 ltotqty=0 ltotm2=0 ltotamt=0 do while not Rstrans.eof 'lqtypalletx=right("0000"&rsorder("pallet_qty"),4) %> <% ltotpallet=ltotpallet+1 ltotqty=ltotqty+cdbl(Rstrans("prod_qty")) ltotm2=ltotm2+cdbl(Rstrans("prod_m2")) ltotamt=ltotamt+cdbl(Rstrans("prod_amt")) Rstrans.movenext loop %> <% if ltotm2>0 then %> <% else %> <% end if if ltotamt>0 then %> <% else %> <% end if %>
TRANSFER BY MACHINE
W/H  TransDate  Shift  Machine  Customer  Item  M2  Price  Ord No  Cnt  In Qty  Total M2  Amount  Location  Trans Time  Print Date 
<%=Rstrans("local_nm")%>  <%=Rstrans("trans_date")%>  <%=Rstrans("work_gubun")%>  <%=Rstrans("proc_nm")%>  <%=Rstrans("cust_nm")%>  <%=Rstrans("item")%>  <%=Rstrans("mae_m2")%> <%=Rstrans("price")%> <%=Rstrans("ord_no")%> <%=Rstrans("pallet_cnt")%> <%=Rstrans("prod_qty")%> <%=Rstrans("prod_m2")%> <%=Rstrans("prod_amt")%> <%=Rstrans("loc_no")%> <%=Rstrans("trans_time")%> <%=Rstrans("prt_day")%>
        SUM       <%=ltotpallet%>   <%=ltotqty%><%=ltotm2%><%=ltotm2%><%=formatnumber(ltotamt,0)%><%=ltotamt%>     
<% end if Rstrans.close set Rstrans = nothing end if %>