%@ LANGUAGE = "VBScript" %>
<%Response.Buffer = False%>
<%
Session("turno")=""
'Session.Timeout = 120
Server.ScriptTimeout = 10000
busca=request.QueryString("busca")
doc=request.QueryString("doc")
origen=request.QueryString("origen")
lorderno=replace(Request.Form("lorderno"),"-","")
lorderseq=Request.Form("lorderseq")
if lorderno="" then
lorderno=origen
end if
lqty=request.Form("lqty")
limprimir = request.form("imprimir")
if limprimir="" and limprimir="" then
'response.Redirect("sheet_id_print_c2.asp")
end if
lqtypallet=Request.Form("lqtypallet")
if lqtypallet="" or lqtypallet=null then
lqtypallet=1
end if
''''''''''''''''''''''''''''''''''''''
%>
<%
'set Rsorder=dbsql3.execute("select * from barcode_rwk where pallet_cnt in ("&limprimir&")")
set Rsorder=dbsql.execute("select a.prod_local, (select code_nm from sta010t(nolock) where major_cd = '0005' and minor_cd = a.prod_local) local_nm, a.plan_date, a.plan_seq, a.goods_class, a.ord_date, dbo.usf_no(case a.goods_class when '1' then 'S' else 'B' end , '1', a.ord_date, a.ord_seq, 4, '-') ord_no, a.ord_seq, a.proc_cd, (select proc_nm from stb160t(nolock) where proc_cd = a.proc_cd) proc_nm, a.team_class, (select code_nm from sta010t(nolock) where major_cd = '2004' and minor_cd = a.team_class) team_nm, c.cust_cd, (select cust_nm from stb010t(nolock) where stb010t.cust_cd = c.cust_cd ) cust_nm, (select mtrl_dis_nm from stb070t(nolock) where stb070t.mtrl_cd = a.mtrl_cd1) mtrl_nm1, (select mtrl_dis_nm from stb070t(nolock) where stb070t.mtrl_cd = a.mtrl_cd2) mtrl_nm2, (select mtrl_dis_nm from stb070t(nolock) where stb070t.mtrl_cd = a.mtrl_cd3) mtrl_nm3, (select mtrl_dis_nm from stb070t(nolock) where stb070t.mtrl_cd = a.mtrl_cd4) mtrl_nm4, (select mtrl_dis_nm from stb070t(nolock) where stb070t.mtrl_cd = a.mtrl_cd5) mtrl_nm5, a.flute_cd, (select flute_nm from stb080t(nolock) where stb080t.flute_cd = a.flute_cd) flute_nm, dbo.usf_size(a.sht_size1, a.sht_size2, 0, 'S') sht_size, dbo.usf_size(c.box_size1, c.box_size2, c.box_size3, 'b') box_size, a.sht_size2, a.sht_size1, case a.goods_class when '1' then (a.real_plan_qty / 200 + 1) + a.real_plan_qty + a.add_s_plan when '2' then (a.real_plan_qty / (select palet_qty from stb080t where flute_cd = a.flute_cd) + 1) + a.real_plan_qty + a.add_b_plan end jisi_qty, case c.sl_size when 0 then case c.scr_tot_size when 0 then c.mae_m2 else case c.poksu when 0 then c.mae_m2 else round(c.scr_tot_size * c.poksu * c.sht_size1 / 1000000,4) end end else round(c.sht_size1 * ( c.sl_size * c.poksu) / 1000000,4) end mae_m2, case a.goods_class when '1' then (a.real_plan_qty / 200 + 1) + a.real_plan_qty + a.add_s_plan when '2' then (a.real_plan_qty / (select palet_qty from stb080t where flute_cd = a.flute_cd) + 1) + a.real_plan_qty + a.add_b_plan end * a.sht_size1 / 1000 plan_m, round((case a.goods_class when '1' then (a.real_plan_qty / 200 + 1) + a.real_plan_qty + a.add_s_plan when '2' then (a.real_plan_qty / (select palet_qty from stb080t where flute_cd = a.flute_cd) + 1) + a.real_plan_qty + a.add_b_plan end) * (case c.sl_size when 0 then case c.scr_tot_size when 0 then c.mae_m2 else case c.poksu when 0 then c.mae_m2 else round(c.scr_tot_size * c.poksu * c.sht_size1 / 1000000,4) end end else round(c.sht_size1 * ( c.sl_size * c.poksu) / 1000000,4) end) ,0) plan_m2, a.poksu, c.scr_size1 + c.scr_size2 + c.scr_size3 + c.scr_size4 + c.scr_size5 + c.scr_size6 + c.scr_size7 scr_tot_size, c.scr_size1, c.scr_size2, c.scr_size3, c.scr_size4, c.scr_size5, c.scr_size6, c.scr_size7, case when c.scr_size1 + c.scr_size2 + c.scr_size3 + c.scr_size4 + c.scr_size5 + c.scr_size6 + c.scr_size7 <> c.scr_tot_size then 'X' else '' end scr_size_chk, c.poksu old_poksu, a.plan_qty, c.nap_date, right(c.nap_date,6) nap_day, c.ord_qty, case len(a.plan_no) when 1 then '000' + a.plan_no when 2 then '00' + a.plan_no when 3 then '0' + a.plan_no else a.plan_no end plan_no, case len(a.lot_no) when 1 then '000' + a.lot_no when 2 then '00' + a.lot_no when 3 then '0' + a.lot_no else a.lot_no end lot_no, case len(a.flute_no) when 1 then '000' + a.flute_no when 2 then '00' + a.flute_no when 3 then '0' + a.flute_no else a.flute_no end flute_no, c.nap_cd, (select nap_nm from stb030t(nolock) where stb030t.crp_id = c.crp_id and stb030t.cust_cd = c.cust_cd and stb030t.nap_cd <> '1' and stb030t.nap_cd = c.nap_cd) nap_nm, (select weight from stb070t(nolock) where stb070t.mtrl_cd = a.mtrl_cd1) mtrl_weight1, (select weight from stb070t(nolock) where stb070t.mtrl_cd = a.mtrl_cd2) mtrl_weight2, (select weight from stb070t(nolock) where stb070t.mtrl_cd = a.mtrl_cd3) mtrl_weight3, (select weight from stb070t(nolock) where stb070t.mtrl_cd = a.mtrl_cd4) mtrl_weight4, (select weight from stb070t(nolock) where stb070t.mtrl_cd = a.mtrl_cd5) mtrl_weight5, c.nap_time, c.note_1, c.note_2, c.note_3, 0 tot_qty, d.proc_nm, case c.scr_size1 when 0 then '' else convert(varchar(04), c.scr_size1) end + case c.scr_size2 when 0 then '' else ' + ' + convert(varchar(04), c.scr_size2) end + case c.scr_size3 when 0 then '' else ' + ' + convert(varchar(04), c.scr_size3) end + case c.scr_size4 when 0 then '' else ' + ' + convert(varchar(04), c.scr_size4) end + case c.scr_size5 when 0 then '' else ' + ' + convert(varchar(04), c.scr_size5) end + case c.scr_size6 when 0 then '' else ' + ' + convert(varchar(04), c.scr_size6) end + case c.scr_size7 when 0 then '' else ' + ' + convert(varchar(04), c.scr_size7) end slsc, d.good_nm, a.scr_qty, case c.coating when '0' then '' when '1' then 'P' when '2' then 'I' when '3' then 'P/I' else '' end coating_nm, c.sl_size, case a.scr_qty when 0 then '' else convert(varchar(04), a.scr_qty) + 'cutting' end sl_nm, case c.sl_size when 0 then case c.scr_tot_size when 0 then 0 else a.sht_size2 - (a.poksu * c.scr_tot_size) end else a.sht_size2 - (a.poksu * c.sl_size) end cut_size, c.box_size1, c.box_size2, c.box_size3, a.real_plan_qty, d.design_no from shb010t a(nolock), sha010t c(nolock) left join ( select a.crp_id, a.goods_class, a.ord_date, a.ord_seq, b.good_nm , b.good_cd, b.design_no, b.sht_note_1, b.sht_note_2, b.sht_note_3, (select proc_nm from stb160t(nolock) where proc_cd = a.proc_cd1) proc_nm from boa010t a(nolock), stb040t b(nolock) where a.cust_cd = b.cust_cd and a.good_cd = b.good_cd ) d on c.goods_class = d.goods_class and c.ord_date = d.ord_date and c.ord_seq = d.ord_seq and c.crp_id = d.crp_id where a.prod_local = '3' and a.crp_id = c.crp_id and a.goods_class = c.goods_class and a.ord_date = "&lorderno&" and a.ord_seq = "&lorderseq&" and c.ord_date = "&lorderno&" and c.ord_seq = "&lorderseq&" and a.crp_id = '10' order by a.prod_local, a.plan_date, a.plan_seq, a.pok_no, a.flute_no, a.lot_no, a.plan_no, c.scr_size1, c.scr_size2, c.scr_size3")
if rsorder.eof and rsorder.bof then
else
'totpage=INT(rsorder("prod_qty")/lqtypallet)+1
'xpage=1
'xtotqty=int(rsorder("prod_qty"))
'lqtypallet2=lqtypallet
'**** Fecha de impresion
lprt_date=(year(date)&right("0"&month(date),2)&right("0"&day(date),2))
rsorder.movefirst
do while not rsorder.eof
' lqtypalletx=right("0000"&lqtypallet2,4)
lweek=int((date-cdate("01/01/"&year(date)))/7)
%>
SINIL INDUSTRY
MATERIAL DE PROCESO
Cliente:
<%=rsorder("cust_nm") %>
Numero de Parte:
<%=left(rsorder("good_nm"),22) %>
Num. Orden:
<%=rsorder("ord_no") %>
Fecha de Produccion:
Cantidad por Tarima:
Numero de Tarima:
Turno:
<%=date()%>
OBSERVACIONES:
CORRUGADORA II
REQUIERE ETIQUETARSE:
SI
NO
SIGUIENTE PROCESO:
INSPECCION 100%
ENGOMAR
PLANTA OFFSET
ENGRAPAR
ENSAMBLAR
TROQUELAR
PALETIZADO
FLEJADO
OTROS
Doc. No. PL-01-F08 REV.02
<%
rsorder.movenext
loop
end if
rsorder.close
set rsorder = nothing
%>