📄 initialdata.asp
字号:
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<%
dim conn
set conn=server.CreateObject("adodb.connection")
conn.Open connstring
%>
<html>
<head>
<LINK href="../global.css" rel=STYLESHEET type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>帐套期初数据</title>
</head>
<body vlink="#48576C" link="#48576C" alink="#000000" bgcolor="#FFFFFF" topmargin="3">
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="35%" height="25"><strong><font class=title>帐套期初数据</font></strong> </td>
<td width="65%"><div align="right"><a href="sysaccount.asp"><img src="../images/button_back.gif" border=0></a></div></td>
</tr>
<tr >
<td height="16" colspan="3" background="../images/title.gif"> </td>
</tr>
<tr>
<td height=4 colspan="2"></td>
</tr>
</table>
<%
dim rssysaccount
set rssysaccount=server.CreateObject("adodb.recordset")
rssysaccount.Open "select * from sysaccount where sysaccountid='"&request("sysaccountid")&"'",conn,1,1
%>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DECFAD">
<tr>
<td width="10%" align=center bgcolor="DEDFDE">帐套名称</td>
<td width="20%" align=center bgcolor="EFEFEF"><%=rssysaccount("sysaccount")%></td>
<td width="10%" align=center bgcolor="DEDFDE">开帐日期</td>
<td width="15%" align=center bgcolor="EFEFEF"><%=rssysaccount("createdate")%></td>
<td width="10%" align=center bgcolor="DEDFDE">生效</td>
<td width="10%" align=center bgcolor="EFEFEF">
<%if rssysaccount("used") then%>
<font color=red><%Response.Write "是"%></font></td>
<%else%>
<%Response.Write "否"%><%end if%></td>
<td width="10%" align=center bgcolor="DEDFDE">帐套状态</td>
<td width="15%" align=center bgcolor="EFEFEF">
<%if rssysaccount("complete") then%>
<font color=red><%Response.Write "期初设置完成"%></font></td>
<%else%>
<%Response.Write "期初设置未完成"%><%end if%></td>
</tr>
</table>
<br>
<table cellspacing=1 bgcolor='#ffffff'>
<tr>
<td height=18 align=center valign=center <% if Request.QueryString("type")="initialwhse" or Request.QueryString("type")="" then Response.Write "bgcolor=red" else Response.Write "bgcolor=4A699C"%>><a href=initialdata.asp?type=initialwhse&sysaccountid=<%=Request.QueryString("sysaccountid")%>><font color='#FFFFFF'>期初库存</font></a></td>
<td height=18 align=center valign=center <% if Request.QueryString("type")="initialcollect" then Response.Write "bgcolor=red" else Response.Write "bgcolor=4A699C"%>><a href=initialdata.asp?type=initialcollect&sysaccountid=<%=Request.QueryString("sysaccountid")%>><font color='#FFFFFF'>期初应收款</font></a></td>
<td height=18 align=center valign=center <% if Request.QueryString("type")="initialpay" then Response.Write "bgcolor=red" else Response.Write "bgcolor=4A699C"%>><a href=initialdata.asp?type=initialpay&sysaccountid=<%=Request.QueryString("sysaccountid")%>><font color="#FFFFFF">期初应付款</font></td>
<td height=18 align=center valign=center <% if Request.QueryString("type")="initailinvoice" then Response.Write "bgcolor=red" else Response.Write "bgcolor=4A699C"%>><a href=initialdata.asp?type=initailinvoice&sysaccountid=<%=Request.QueryString("sysaccountid")%>><font color='#FFFFFF'>期初应开发票</font></a></td>
<td height=18 align=center valign=center <% if Request.QueryString("type")="initailpoinvoice" then Response.Write "bgcolor=red" else Response.Write "bgcolor=4A699C"%>><a href=initialdata.asp?type=initailpoinvoice&sysaccountid=<%=Request.QueryString("sysaccountid")%>><font color='#FFFFFF'>期初应收发票</font></a></td>
<td height=18 align=center valign=center bgcolor="#FFFF33">
<%if not rssysaccount("complete") then%>
<a href="javascript:opensubwin('resizable=no, scrollbars=no, left= 300, top=220, menubar=no, location=no, toolbar=no ,width=300, height=200','sysaccountsubmit.asp?sysaccountid=<%=request("sysaccountid")%>&mod=帐套设置完成');"><font color='#000066'>帐套设置完成</font></a></td>
<%end if%>
</tr>
</table>
<br>
<%if Request.QueryString("type")="initialwhse" or Request.QueryString("type")="" then%>
<%
sql="select * from V_InitialInventory where sysaccountid='"&request("sysaccountid")&"' order by lastmoddate desc"
set rs1=conn.Execute(sql)
%>
<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width=12% height="25"><strong><font size="2">期初库存</font></b></strong></td>
<td width=88% height="25">
<%if not rssysaccount("Complete") then%>
<a href="javascript:opensubwin('resizable=yes, scrollbars=yes, left= 100, top=100, menubar=no, location=no, toolbar=no width=500, height=250','newinitial_whse.asp?sysaccountid=<%=request("sysaccountid")%>');"><img src="../images/button_new.gif" border=0></a>
<%end if%></td>
</tr>
<tr>
<td height=2 colspan="3" bgcolor="#4A699C"></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="DECFAD">
<tr bgcolor="efefef">
<td width="10%" height=15 align=center>货号</td>
<td width="20%" height="15" align=center>型号</td>
<td width="10%" height="15" align=center>仓库</td>
<td width="10%" height="15" align=center>货位</td>
<td width="8%" height="15" align=center>期初数量</td>
<td width="8%" height="15" align=center>单价</td>
<td width="8%" height="15" align=center>金额</td>
<td width="10%" height="15" align=center>最近时间</td>
<td width="16%" height="15" align=center>操作</td>
</tr>
<%if rs1.eof then%>
<tr bgcolor="ffffff">
<td colspan=9 width="100%" height=15 align=left>无记录</td>
</tr>
<%else%>
<%
dim allqty
dim allamount
allqty=0
allamount=0
do while not rs1.EOF
%>
<%if rs1("nonnet") then%>
<tr bgcolor="#FAFAAB">
<%else%>
<tr bgcolor="#FFFFFF">
<%end if%>
<td width="10%" height=18 align=center><a href="javascript:opensubwin('resizable=yes, scrollbars=no, left= 200, top=100, menubar=no, location=no, toolbar=no ,width=500, height=250','../product/productdetail.asp?productid=<%=rs1("productid")%>');"><%=rs1("productcode")%></a></td>
<td width="20%" align=center><%=rs1("product")%></td>
<td width="10%" align=center><%=rs1("whsename")%></td>
<td width="10%" align=center><%=rs1("location")%></td>
<td width="8%" align=center><%=rs1("initialqty")%></td>
<td width="8%" align=center><%=formatnumber(rs1("CurrentCost"),2)%></td>
<td width="8%" align=center><%=formatnumber(rs1("TotalAmount"),2)%></td>
<td width="10%" align=center><%=year(rs1("lastmoddate"))%>-<%=month(rs1("lastmoddate"))%>-<%=day(rs1("lastmoddate"))%></td>
<td width="16%" align=center>
<%if not rssysaccount("Complete") then%>
<a href="javascript:opensubwin('resizable=yes, scrollbars=no, left= 100, top=100, menubar=no, location=no, toolbar=no ,width=500, height=250','newinitial_whse.asp?id=<%=rs1("id")%>&sysaccountid=<%=rs1("sysaccountid")%>');">编辑</a>
<a href="javascript:opensubwin('resizable=yes, scrollbars=no, left= 300, top=220, menubar=no, location=no, toolbar=no ,width=300, height=200','../delete.asp?initialwhseid=<%=rs1("id")%>');">删除</a>
<%end if%>
</td>
</tr>
<%
allqty=allqty+Cint(rs1("initialqty"))
allamount=allamount+Ccur(rs1("TotalAmount"))
rs1.MoveNext
loop
%>
<%end if%>
<tr bgcolor="efefef">
<td colspan=4 width="50%" height="15" align=center></td>
<td width="8%" height="15" align=center><%=allqty%></td>
<td width="8%" height="15" align=center></td>
<td width="8%" height="15" align=center><%=formatnumber(allamount,2)%></td>
<td colspan=2 width="20%" height="15" align=center></td>
</tr>
</table>
<%end if%>
<%if Request.QueryString("type")="initialcollect" then%>
<%
sql="select * from V_InitialFinance where sysaccountid='"&request("sysaccountid")&"' and financetype='"&Request.QueryString("type")&"' order by lastmoddate desc"
set rs1=conn.Execute(sql)
%>
<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width=12% height="25"><strong><font size="2">期初应收款</font></b></strong></td>
<td width=88% height="25">
<%if not rssysaccount("Complete") then%>
<a href="javascript:opensubwin('resizable=yes, scrollbars=yes, left= 100, top=100, menubar=no, location=no, toolbar=no width=500, height=250','newinitial_F.asp?sysaccountid=<%=request("sysaccountid")%>&type=initialcollect');"><img src="../images/button_new.gif" border=0></a>
<%end if%></td>
</tr>
<tr>
<td height=2 colspan="3" bgcolor="#4A699C"></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="DECFAD">
<tr bgcolor="efefef">
<td width="30%" height=15 align=center>客户</td>
<td width="10%" height="15" align=center>期初应收款</td>
<td height="15" align=center>描述</td>
<td width="10%" height="15" align=center>最近时间</td>
<td width="16%" height="15" align=center>操作</td>
</tr>
<%if rs1.eof then%>
<tr bgcolor="ffffff">
<td colspan=5 width="100%" height=15 align=left>无记录</td>
</tr>
<%else%>
<%
dim allinitialcollect
allinitialcollect=0
do while not rs1.EOF
%>
<tr bgcolor="#FFFFFF">
<td height=18 align=center><a href="javascript:opensubwin('resizable=yes, scrollbars=no, left= 200, top=100, menubar=no, location=no, toolbar=no ,width=500, height=250','../account/accountdetail.asp?accountid=<%=rs1("accountid")%>');"><%=rs1("account")%></a></td>
<td align=center><%=rs1("initialcollect")%></td>
<td align=center><%=rs1("description")%></td>
<td align=center><%=year(rs1("lastmoddate"))%>-<%=month(rs1("lastmoddate"))%>-<%=day(rs1("lastmoddate"))%></td>
<td align=center>
<%if not rssysaccount("Complete") then%>
<a href="javascript:opensubwin('resizable=yes, scrollbars=no, left= 100, top=100, menubar=no, location=no, toolbar=no ,width=500, height=250','newinitial_F.asp?id=<%=rs1("id")%>&sysaccountid=<%=rs1("sysaccountid")%>&type=initialcollect');">编辑</a>
<a href="javascript:opensubwin('resizable=yes, scrollbars=no, left= 300, top=220, menubar=no, location=no, toolbar=no ,width=300, height=200','../delete.asp?initialfinanceid=<%=rs1("id")%>');">删除</a>
<%end if%>
</td>
</tr>
<%
allinitialcollect=allinitialcollect+Ccur(rs1("initialcollect"))
rs1.MoveNext
loop
%>
<%end if%>
<tr bgcolor="efefef">
<td width="30%" height=15 align=center></td>
<td width="10%" height="15" align=center><%=allinitialcollect%></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -