<%@ LANGUAGE = "VBScript" %> <% Session.Timeout = 120 Server.ScriptTimeout = 5000 fechainicial=Request.Querystring("fecini") fechafinal=Request.Querystring("fecfin") %> <% Response.Buffer = TRUE Response.ContentType = "application/vnd.ms-excel" Response.AddHeader "content-disposition", "inline; filename=Shipping_List"&date()&time()&".xls" %> Shipping List
Shipping List
Date: <%=Date_ini%> To: <%=Date_end%> Generated: <%=time%>
<% '************** Inventory 'lturno=0 Dim Rsinven1, Rsinven2, rswip, Rsmachine Dim Sqlinven1, sqlinven2, sqlwip ''''''''''''''''''''''''''''''''''''''' set Rscorr=dbsql.execute("select '0' choice_click, a.ship_date, a.ship_no, (select cust_nm from stb010t(nolock) where cust_cd = max(a.cust_cd)) as 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('" & fechainicial & "',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 '" & fechainicial &"' and '" & fechafinal &"' 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 %> <% lnumreg=lnumreg+1 RsCORR.MoveNext LOOP END IF rscorr.close set rscorr = nothing '''''''''''''''''''''''' %>
SHIPPING REQUEST
SHIP DATE REQUEST CUSTOMER HOUR: PK-DATE SEQ IVA * *
<%= Rscorr("ship_date")%> <%= left(Rscorr("ship_no"),8)&"-"&right(Rscorr("ship_no"),4)%> <%= Rscorr("CUST_nm")%> <%= Rscorr("time_chk")%> <%= Rscorr("Good_date")%> <%= Rscorr("good_seq")%> <%= Rscorr("chk_tit")%> <%= Rscorr("chk_tit_nm")%> <%= Rscorr("iva_chk")%>
<%= lnumreg %>