<%@ 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 " '''''''''''''''''''''''''''''''''''''' %> Shipping List Program datepicker demo
       
Period:  
       
<% header %>

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 '''''''''''''''''''''''' %>
SHIPPING REQUEST
SHIP DATE REQUEST CUSTOMER HOUR: PK-DATE SEQ IVA * *
<%= Rscorr("ship_date")%> <%= Rscorr("ship_no")%> <%= Rscorr("CUST_nm")%> <%= Rscorr("time_chk")%> <%= Rscorr("Good_date")%> <%= Rscorr("good_seq")%> <%= Rscorr("chk_tit")%> <%= Rscorr("chk_tit_nm")%> <%= Rscorr("iva_chk")%>
<%= lnumreg%>