Loading 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.crp_id, a.chul_date, a.chul_seq, right(a.chul_date,6) + '-' + a.chul_seq chul_no, a.chul_sub, a.goods_class, a.ord_date, a.ord_seq, b.ord_no, a.local_cd, (select code_nm from sta010t(nolock) where major_cd = '9020' and minor_cd = a.local_cd) local_nm, a.loc_no, (select code_nm from sta010t(nolock) where major_cd = '9160' and minor_cd = a.loc_no) loc_nm, a.loc_sub, a.chul_qty, b.cust_cd, (select cust_nm from stb010t where cust_cd = (b.cust_cd)) cust_nm, b.item, a.desc_1, a.prod_date, right(a.prod_date,6) prod_day, a.note, (select code_nm from sta010t(nolock) where major_cd = '9015' and minor_cd = a.chk_tit) chk_tit, a.po_no, a.chul_price, isnull(a1.sales_qty,0) sales_qty, a.iva_chk, case when isnull(a1.sales_qty,0) > 0 then 1 else 0 end sales_cnt, a.prt_chk, a.lease_no, a.inout_seq, b.chk, b.date_seq from sal012t a(nolock) left outer join ( select crp_id, chul_date, chul_seq, chul_sub, sum(sales_qty) sales_qty from sal020t(nolock) group by crp_id, chul_date, chul_seq, chul_sub) a1 on a.crp_id = a1.crp_id and a.chul_date = a1.chul_date and a.chul_seq = a1.chul_seq and a.chul_sub = a1.chul_sub, inout_table b(nolock) where a.crp_id = b.crp_id and b.class = '3' and a.chul_date = b.job_date and a.local_cd = b.local_cd and a.inout_seq = b.job_date + b.seq + b.date_seq and 'B1' + substring(a.ord_date,3,6) + '-' + a.ord_seq = b.ord_no and a.loc_no = b.loc_no and a.prod_date = b.prod_date and a.crp_id = '10' and a.local_cd ='2' and a.chul_date between '" & fechainicial &"' and '" & fechafinal &"' and b.cust_cd like '%' and b.item like '%' order by b.item, b.ord_no")
If Rscorr.EOF And Rscorr.BOF Then
response.Write("No records exist for corr. this date.")
Else
%>
LOADING
DATE
REQUEST
CUSTOMER
ITEM:
ORDER
W/H
QTY
Price*
PO
Dest*
Location
<%
TOTML=0
TOTM2=0
Rscorr.movefirst
Do While Not Rscorr.EOF
%>
<%= Rscorr("chul_date")%>
<%= Rscorr("chul_no")%>
<%= Rscorr("CUST_nm")%>
<%= Rscorr("item")%>
<%= Rscorr("ord_no")%>
<%= Rscorr("local_nm")%>
<%= Rscorr("chul_qty")%>
<%= Rscorr("chul_price")%>
<%= Rscorr("po_no")%>
<%= Rscorr("chk_tit")%>
<%= Rscorr("loc_nm")%>
<%
lnumreg=lnumreg+1
RsCORR.MoveNext
LOOP
END IF
rscorr.close
set rscorr = nothing
''''''''''''''''''''''''
%>