%@ LANGUAGE = "VBScript" %>
<%
busca=request.QueryString("busca")
doc=request.QueryString("doc")
origen=request.QueryString("origen")
invoice=Request.Form("invoice")
Date_ini=Request.Form("Date_ini")
Date_end=Request.Form("Date_end")
lvende=Request.Form("cvende")
laccion=Request.Form("accion")
criterio22=Request.Form("criterio22")
if criterio22="" then
xcriterio22=" Todos "
end if
if Date_ini="" or Date_ini=null then
Date_ini=date()
end if
Date_end=date()
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)
''''''''''''''''''''''''''''''''''''''
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 = CDbl(stryear + strmonth + strday)
fechafinal = CDbl(stryear2 + strmonth2 + strday2)
''''''''''''''''''''''''''''''''''''''
%>
Vendor List
datepicker demo
<%
header
if busca="" or busca=null then
origen=doc
end if
%>
Customer List
<%
if busca="ok" then
sla="/"
cero1="00"
cero2="0000"
'''''''''''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 "
layer=weekday(date()-1)
If layer = 1 Then
lfecinicial=date()-3
lfecfinal=date()-3
else
if layer=7 then
lfecinicial=date()-2
lfecfinal=date()-2
else
lfecinicial=date()-1
lfecfinal=date()-1
end if
end if
strdaybook = Right("00" & Day(lfecinicial), 2)
strmonthbook = Right("00" & Month(lfecinicial), 2)
stryearbook = Right("00" & Year(lfecinicial), 4)
lfechabook1 = CStr(stryearbook + strmonthbook + strdaybook)
lfechabook2 = CStr(stryearbook + strmonthbook + strdaybook)
If lvende = "" Then
vendedor_i = "00000"
vendedor_f = "99999"
Else
if cdbl(lvende)=0 then
vendedor_i = "00000"
vendedor_f = "99999"
else
vendedor_i = lvende
vendedor_f = lvende
end if
End If
Dim Rsinven1, Rsdetalle,RsInvoice,RsInvoice2
Dim Sqlmir1, sqlmir2, sqlInvoice, sqlInvoice2
linvoice=right("00"&invoice,4)
'response.write("fac "&linvoice)
'response.write(" fec "&fechainicial)
if laccion="2" then
set Rsinven1=dbsql2.execute("SELECT A.Cust_Cd, A.Cust_Nm, A.Cust_full_Nm, A.Repre_Nm, A.Uptae, A.Jongmok, A.Addr_1, A.Addr_2, A.Addr_3, A.Tel_No, A.Fax_No, a.sub_nm, A.sub_Addr_1, A.sub_Addr_2, A.sub_Addr_3, A.sub_Tel_No, A.sub_Fax_No, (select code_nm from sta010t (nolock) where major_cd = '9001' and minor_cd = a.sale_cd) sale_nm, (select code_nm from sta010t (nolock) where major_cd = '9000' and minor_cd = a.manage_cd) manage_nm, a.st_date FROM Stb010t A (nolock) Where a.cust_class like '%' and a.cust_kind like '%' and a.repre_nm like '%' and a.cust_kind='2' Order By a.cust_cd")
%>
Customer List Offset
<%
else
'set Rsinven1=dbsql.execute("SELECT a.cust_cd, a.cust_nm, a.cust_full_nm, a.cust_class,end_chk, a.repre_nm, a.addr_1, a.addr_2, a.addr_3, a.addr_4, a.tel_no, a.fax_no, a.sub_nm, a.sub_addr_1, a.sub_addr_2, a.sub_addr_3, a.sub_addr_4, a.sub_tel_no, a.sub_fax_no, a.decision_cd, a.sale_cd, a.manage_cd, a.credit_yn, a.credit_date, a.credit_amt, a.charge_nm, a.charge_type, a.charge_tel, a.email, a.email_2, a.saupja_no, a.uptae FROM stb010t a(nolock) where left(a.cust_cd,1) in ('6')")
set Rsinven1=dbsql.execute("SELECT A.Cust_Cd, A.Cust_Nm, A.Cust_full_Nm, A.Repre_Nm, A.Uptae, A.Jongmok, A.Addr_1, A.Addr_2, A.Addr_3, A.Tel_No, A.Fax_No, a.sub_nm, A.sub_Addr_1, A.sub_Addr_2, A.sub_Addr_3, A.sub_Tel_No, A.sub_Fax_No, (select code_nm from sta010t (nolock) where major_cd = '9001' and minor_cd = a.sale_cd) sale_nm, (select code_nm from sta010t (nolock) where major_cd = '9000' and minor_cd = a.manage_cd) manage_nm, a.st_date FROM Stb010t A (nolock) Where a.cust_class like '%' and a.cust_kind like '%' and a.repre_nm like '%' and a.cust_kind='2' Order By a.cust_cd")
%>
Customer List Planta1
<%
end if
%>
| Code: |
Company Name: |
Full name: |
Repre_Nm: |
Buss Type: |
Product: |
Addr_1: |
Tel: |
Fax: |
sub_nm: |
Addr_2: |
Sales man: |
Manage: |
St Date: |
<%
Do While Not Rsinven1.EOF
%>
| <%=Rsinven1("cust_cd")%> |
<%=Rsinven1("cust_nm")%> |
<%=Rsinven1("cust_full_nm")%> |
<%=Rsinven1("Repre_Nm")%> |
<%=Rsinven1("Uptae")%> |
<%=Rsinven1("Jongmok")%> |
<%=Rsinven1("addr_1")%> |
<%=Rsinven1("addr_2")%> |
<%=Rsinven1("addr_3")%> |
<%=Rsinven1("tel_no")%> |
<%=Rsinven1("fax_no")%> |
<%=Rsinven1("sub_nm")%> |
<%=Rsinven1("sub_addr_1")%> |
<%=Rsinven1("sub_addr_2")%> |
<%=Rsinven1("sub_addr_3")%> |
<%=Rsinven1("sale_nm")%> |
<%=Rsinven1("manage_nm")%> |
<%=Rsinven1("st_date")%> |
<%
Rsinven1.MoveNext
Loop
Rsinven1.Close
Set Rsinven1 = Nothing
'**************end inventory
%>
<%
end if
%>