?? baobiaook2.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Set ObjReference = Server.CreateObject("jxc1.check")
ObjReference.myfilee()
%>
<!--#include file="../../Connections/jxc.asp" -->
<%
Dim rs
Dim rs_numRows
Set rs = Server.CreateObject("ADODB.Recordset")
rs.ActiveConnection = MM_jxc_STRING
rs.Source = "SELECT * FROM goods ORDER BY hgoodsname ASC"
rs.CursorType = 0
rs.CursorLocation = 2
rs.LockType = 1
rs.Open()
rs_numRows = 0
%>
<%
Dim Recordset2__MMColParam1
Recordset2__MMColParam1 = "2000-1-1"
If (Request.QueryString("time1") <> "") Then
Recordset2__MMColParam1 = Request.QueryString("time1")
End If
%>
<%
Dim Recordset2__MMColParam
Recordset2__MMColParam = "1"
If (rs("hidcode") <> "") Then
Recordset2__MMColParam = rs("hidcode")
End If
%>
<%
Dim Recordset2__MMColParam0
Recordset2__MMColParam0 = "2000-1-1"
If (Request.QueryString("time2") <> "") Then
Recordset2__MMColParam0 = Request.QueryString("time2")
End If
%>
<%
Dim Recordset2__MMColParam4
Recordset2__MMColParam4 = "1"
If (Request.QueryString("ku") <> "") Then
Recordset2__MMColParam4 = Request.QueryString("ku")
End If
%>
<%
Dim Recordset3__MMColParam2
Recordset3__MMColParam2 = "1"
If (request.querystring("ku") <> "") Then
Recordset3__MMColParam2 = request.querystring("ku")
End If
%>
<%
Dim Recordset1__MMColParam4
Recordset1__MMColParam4 = "1"
If (Request.QueryString("ku") <> "") Then
Recordset1__MMColParam4 = Request.QueryString("ku")
End If
%>
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "2000-1-1"
If (Request.QueryString("time1") <> "") Then
Recordset1__MMColParam = Request.QueryString("time1")
End If
%>
<%
Dim Recordset1__MMColParam0
Recordset1__MMColParam0 = "2000-1-1"
If (Request.QueryString("time2") <> "") Then
Recordset1__MMColParam0 = Request.QueryString("time2")
End If
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>報表</title>
<link href="../../CSS.CSS" rel="stylesheet" type="text/css">
</head>
<body>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>報表人<strong><font color="#6AB5FF"><%= session("jxcman")%> </font></strong></td>
</tr>
</table>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999">
<tr bgcolor="#00FFFF">
<td colspan="3" bgcolor="#00FFFF"><div align="center"></div> <div align="center"></div> <div align="center"><%= Request.QueryString("time1") %>到<%= Request.QueryString("time2") %></div></td>
<td colspan="3"><div align="center">進</div></td>
<td colspan="3"><div align="center">銷</div></td>
<td colspan="3"><div align="center">存(<%= Recordset1__MMColParam4 %>)<%= now %></div></td>
</tr>
<tr>
<td width="4%" bgcolor="#00FFFF"><div align="center">序號</div></td>
<td bgcolor="#00FFFF"><div align="center">貨品名</div></td>
<td width="26%" bgcolor="#00FFFF"><div align="center">型號</div></td>
<td width="6%" bgcolor="#00FFFF"><div align="center">數量</div></td>
<td width="6%" bgcolor="#00FFFF"><div align="center">單價(均)</div></td>
<td width="6%" bgcolor="#00FFFF"><div align="center">金額(總)</div></td>
<td width="6%" bgcolor="#00FFFF"><div align="center">數量</div></td>
<td width="6%" bgcolor="#00FFFF"><div align="center">單價(均)</div></td>
<td width="6%" bgcolor="#00FFFF"><div align="center">金額(總)</div></td>
<td width="6%" bgcolor="#00FFFF"><div align="center">數量</div></td>
<td width="6%" bgcolor="#00FFFF"><div align="center">單價(最近)</div></td>
<td width="6%" bgcolor="#00FFFF"><div align="center">金額</div></td>
</tr>
<% dim n
n = 0
do while not rs.eof
n = n+1 %>
<%
Dim Recordset1__MMColParam1
Recordset1__MMColParam1 = "1"
If (rs("hidcode") <> "") Then
Recordset1__MMColParam1 = rs("hidcode")
End If
%>
<%
Dim Recordset1__MMColParam2
Recordset1__MMColParam2 = "1"
If ("有效" <> "") Then
Recordset1__MMColParam2 = "有效"
End If
%>
<%
Dim Recordset2__MMColParam2
Recordset2__MMColParam2 = "有效"
If (Request("MM_EmptyValue") <> "") Then
Recordset2__MMColParam2 = Request("MM_EmptyValue")
End If
%>
<%
Dim Recordset2__MMColParam3
Recordset2__MMColParam3 = "銷給客戶"
If (Request("MM_EmptyValue") <> "") Then
Recordset2__MMColParam3 = Request("MM_EmptyValue")
End If
%>
<%
Dim Recordset1__MMColParam3
Recordset1__MMColParam3 = "1"
If ("從供貨客戶進貨" <> "") Then
Recordset1__MMColParam3 = "從供貨客戶進貨"
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_jxc_STRING
Recordset1.Source = "SELECT * FROM jin WHERE date >= #" + Replace(Recordset1__MMColParam, "'", "''") + "# and date <= #" + Replace(Recordset1__MMColParam0, "'", "''") + "# AND hidcode = '" + Replace(Recordset1__MMColParam1, "'", "''") + "' AND zhuangtai = '" + Replace(Recordset1__MMColParam2, "'", "''") + "' AND xingzhi = '" + Replace(Recordset1__MMColParam3, "'", "''") + "' and ku = '" + Replace(Recordset1__MMColParam4, "'", "''") + "' ORDER BY jidcode DESC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
dim jinshu,jinzongjia,pjinjia
jinshu = 0
jinzongjia = 0
dim cshu,cdanjia,cjin
cshu = 0
cjin = 0
do while not recordset1.eof
jinshu = jinshu + recordset1("shu")
jinzongjia =jinzongjia + recordset1("shu") * recordset1("jiage")
recordset1.movenext
loop
if jinshu <> 0 then
pjinjia = jinzongjia \ jinshu
end if
Recordset1_numRows = 0
%>
<%
Dim Recordset2
Dim Recordset2_numRows
Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_jxc_STRING
Recordset2.Source = "SELECT * FROM xiao WHERE hidcode = '" + Replace(Recordset2__MMColParam, "'", "''") + "'and date >= #" + Replace(Recordset2__MMColParam1, "'", "''") + "# and date <= #" + Replace(Recordset2__MMColParam0, "'", "''") + "# and zhuangtai = '" + Replace(Recordset2__MMColParam2, "'", "''") + "' AND xingzhi = '" + Replace(Recordset2__MMColParam3, "'", "''") + "' and ku = '" + Replace(Recordset2__MMColParam4, "'", "''") + "' ORDER BY xidcode DESC"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()
dim xiaoshu,xiaozongjia
xiaoshu = 0
xiaozongjia = 0
do while not recordset2.eof
xiaoshu = xiaoshu + recordset2("shu")
xiaozongjia =xiaozongjia + recordset2("shu") * recordset2("jiage")
recordset2.movenext
loop
dim pxiaojia
if xiaoshu <> 0 then
pxiaojia = xiaozongjia \ xiaoshu
end if
Recordset2_numRows = 0
%>
<%
Dim Recordset3__MMColParam1
Recordset3__MMColParam1 = "1"
If (rs("hidcode") <> "") Then
Recordset3__MMColParam1 = rs("hidcode")
End If
%>
<%
Dim Recordset3
Dim Recordset3_numRows
Set Recordset3 = Server.CreateObject("ADODB.Recordset")
Recordset3.ActiveConnection = MM_jxc_STRING
Recordset3.Source = "SELECT * FROM cun WHERE hidcode = '" + Replace(Recordset3__MMColParam1, "'", "''") + "' and ku = '" + Replace(Recordset3__MMColParam2, "'", "''") + "' ORDER BY id DESC"
Recordset3.CursorType = 0
Recordset3.CursorLocation = 2
Recordset3.LockType = 1
Recordset3.Open()
if not recordset3.eof then
cshu=recordset3("shu")
cdanjia = recordset3("jiage")
cjin = cshu*cdanjia
end if
Recordset3_numRows = 0
%>
<tr bgcolor="#FFFFFF">
<td><div align="center"><%= n %> </div></td>
<td><div align="center"><%=rs("hshangbiao")%><%=rs("hgoodsname")%></div></td>
<td><div align="center"><%=rs("hxinghao")%></div></td>
<td><div align="center"><%= jinshu %> <%=rs("hdanwei")%></div></td>
<td><div align="center"><%= pjinjia %> 元</div></td>
<td><div align="center"><%= jinzongjia %> </div></td>
<td><div align="center"><%= xiaoshu %> <%=rs("hdanwei")%></div></td>
<td><div align="center"><%= pxiaojia %> 元</div></td>
<td><div align="center"><%= xiaozongjia %> 元</div></td>
<td><div align="center"><%=cshu%><%=rs("hdanwei")%></div></td>
<td><div align="center"><%=cdanjia%>元</div></td>
<td><div align="center">
<%=cjin
%>
元 </div></td>
</tr>
</table></td>
</tr>
</table>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>
<%
Recordset3.Close()
Set Recordset3 = Nothing
%>
<%
rs.movenext
loop
rs.Close()
Set rs = Nothing
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -