?? financepostat.asp
字號(hào):
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<%Dim objcheck
Set objcheck=Server.CreateObject("SmartSales.CheckFunction")
objcheck.CheckUserFunction "report","read"
%>
<%
sysid=checkandgetsysaccountid()
set connarreport=server.createobject("adodb.connection")
connarreport.open connstring
if request("statSearch")<>"" then
strstatSearch=request.form("statSearch")
else
strstatSearch="username"
end if
if Request.Form("namesearch")<>"" then
strwhere =strwhere&" and userid='"&Request.Form("namesearch")&"'"
else
if objcheck.CheckUserFunction2("payment","edit") then
else
strwhere =strwhere &"and (creator='"&session("loginid")&"' or userid='"&session("loginid")&"' or userid in(select userid from v_userreportto_all where reportto='"&session("loginid")&"'))"
end if
end if
if Request.Form("FdateSearch")<>"" then
strFdate=Request.Form("FdateSearch")
strwhere=strwhere&" and CreateDate>='"&cdate(strFdate)&"'"
else
strFdate=date()-7
strwhere=strwhere&" and CreateDate>='"&cdate(strFdate)&"'"
end if
if Request.Form("EdateSearch")<>"" then
strEdate=Request.Form("EdateSearch")
strwhere=strwhere&" and CreateDate<'"&cdate(strEdate)+1&"'"
else
strEdate=date()
strwhere=strwhere&" and CreateDate<'"&cdate(strEdate)+1&"'"
end if
if Request.Form("PaymentStat")="Paymented" then
strwhere=strwhere&" and paymentstatus='已銷(xiāo)'"
elseif Request.Form("PaymentStat")="Paymenting" then
strwhere=strwhere&" and paymentstatus='未銷(xiāo)'"
end if
if Request.Form("InvoiceStat")="Invoiced" then
strwhere=strwhere&" and invoicestatus='已銷(xiāo)'"
elseif Request.Form("InvoiceStat")="Invoicing" then
strwhere=strwhere&" and invoicestatus='未銷(xiāo)'"
elseif Request.Form("InvoiceStat")="NoInvoice" then
strwhere=strwhere&" and invoice=0"
end if
Set rsarreport=Server.CreateObject("ADODB.Recordset")
if request("statSearch2")="" then
sql="SELECT "&strstatSearch&",COUNT(*) AS subnum,SUM(amount) AS subtamount FROM v_POPayMent where 1=1 "&strwhere&" and sysaccountid="&sysid
sql=sql & " GROUP BY "&strstatSearch&" ORDER BY subtamount DESC "
else
sql="SELECT "&strstatSearch&","&request("statSearch2")&",COUNT(*) AS subnum, SUM(amount) AS subtamount FROM v_POPayMent where 1=1 "&strwhere&" and sysaccountid="&sysid
sql=sql & " GROUP BY "&strstatSearch&","&request("statSearch2")&" ORDER BY "&strstatSearch&" DESC "
end if
'response.write sql
rsarreport.open sql,connarreport,1,1
alls=rsarreport.Recordcount
if request.form("statSearch")="username" or request.form("statSearch")="" then
dispname="采購(gòu)員"
elseif request.form("statSearch")="CreateDate" then
dispname="每日"
elseif request.form("statSearch")="CreateMonth" then
dispname="每月"
elseif request.form("statSearch")="account" then
dispname="供應(yīng)商"
elseif request.form("statSearch")="paymentno" then
dispname="應(yīng)付編號(hào)"
end if
if request.form("statSearch2")="username" then
dispname2="采購(gòu)員"
elseif request.form("statSearch2")="expensedate" then
dispname2="每日"
elseif request.form("statSearch2")="expensemonth" then
dispname2="每月"
elseif request.form("statSearch2")="account" then
dispname2="供應(yīng)商"
elseif request.form("statSearch2")="paymentno" then
dispname2="應(yīng)付編號(hào)"
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../global.css" rel=stylesheet type=text/css>
<style type="text/css"></style>
<title>應(yīng)付統(tǒng)計(jì)</title>
</head>
<SCRIPT language=JavaScript>
function opensubwin(attrstr,targ1)
{
var tempwin=window.open(targ1,null,attrstr);
tempwin.location.href=targ1;
tempwin.opener=this;
}
function submit1(){
window.form1.submit();
return true;
}
function submit3(){
if (form1.StatType.value=="ar"){
link="financeStat.asp";
document.location.href=link;
}
if (form1.StatType.value=="pay"){
link="financePOStat.asp";
document.location.href=link;
}
}
</SCRIPT>
<script language=javascript src="../tools/newcalendar.js"></script>
<body leftmargin="10" rightmargin="10" topmargin="10">
<table align="center" border="0" cellPadding="0" width="100%" style="font-size:10pt">
<form id=form1 name=form1 action="" method=post>
<tr>
<td><select name=statSearch size=1 id=select language=javascript onChange="submit1()">
<option value="username" <%if request("statSearch")="username" then Response.Write " selected"%>>按采購(gòu)員</option>
<option value="account" <%if request("statSearch")="account" then Response.Write " selected"%>>按供應(yīng)商</option>
<option value="paymentno" <%if request("statSearch")="paymentno" then Response.Write " selected"%>>按應(yīng)付編號(hào)</option>
<option value="CreateDate" <%if request("statSearch")="CreateDate" then Response.Write " selected"%>>按每日</option>
<option value="CreateMonth" <%if request("statSearch")="CreateMonth" then Response.Write " selected"%>>按每月</option>
</select>
<select name=statSearch2 size=1 ID=Select1 LANGUAGE=javascript onchange="submit1()">
<option value="" <%if request("statSearch2")="" then Response.Write " selected"%>>--第二條件--</option>
<option value="username" <%if request("statSearch2")="username" then Response.Write " selected"%>>按采購(gòu)員</option>
<option value="account" <%if request("statSearch2")="account" then Response.Write " selected"%>>按供應(yīng)商</option>
<option value="paymentno" <%if request("statSearch2")="paymentno" then Response.Write " selected"%>>按應(yīng)付編號(hào)</option>
<option value="CreateDate" <%if request("statSearch2")="CreateDate" then Response.Write " selected"%>>按每日</option>
<option value="CreateMonth" <%if request("statSearch2")="CreateMonth" then Response.Write " selected"%>>按每月</option>
</select>
從<input name=FdateSearch size=9 language=javascript id=dupdatetime value='<%=strFdate%>' readonly><% call AddImg("date")%>
<input type = hidden name=clicksource>
<input type = hidden name=clickresult >
到<input name=EdateSearch size=9 language=javascript id=dupdatetime2 value='<%=strEdate%>' readonly><% call AddImg("date2")%>
<select name=nameSearch size=1 ID=Select1 LANGUAGE=javascript onchange="submit1()">
<option value="">--選擇采購(gòu)員--</option>
<%getsubordinate Request.Form("namesearch")%>
</select>
<input type=submit name="Search" value="提交"></td></tr>
</form1>
</table>
<table cellspacing=0 cellpadding=0 width="100%" border=0>
<tbody>
<tr>
<td>
<table cellspacing=0 cellpadding=0 width="100%" border=0>
<tr>
<td height="25"><strong><font class=title><b>應(yīng)付統(tǒng)計(jì) </b></font></strong>
<select name=PaymentStat size=1 LANGUAGE=javascript onchange="submit1()">
<option value="" <%if request("PaymentStat")="" then Response.Write " selected"%>>--付款狀態(tài)--</option>
<option value="Paymented" <%if request("PaymentStat")="Paymented" then Response.Write " selected"%>>已付款</option>
<option value="Paymenting" <%if request("PaymentStat")="Paymenting" then Response.Write " selected"%>>未付款</option>
</select>
<select name=InvoiceStat size=1 LANGUAGE=javascript onchange="submit1()">
<option value="" <%if request("InvoiceStat")="" then Response.Write " selected"%>>--開(kāi)票狀態(tài)--</option>
<option value="Invoiced" <%if request("InvoiceStat")="Invoiced" then Response.Write " selected"%>>已開(kāi)票</option>
<option value="Invoicing" <%if request("InvoiceStat")="Invoicing" then Response.Write " selected"%>>未開(kāi)票</option>
<option value="NoInvoice" <%if request("InvoiceStat")="NoInvoice" then Response.Write " selected"%>>不開(kāi)票</option>
</select>
<select name=char size=1 ID=Select1 LANGUAGE=javascript onchange="submit1()">
<option value="" <%if request("char")="" then Response.Write " selected"%>>--查看圖例--</option>
<option value="pie" <%if request("char")="pie" then Response.Write " selected"%>>餅圖</option>
<option value="3dbar" <%if request("char")="3dbar" then Response.Write " selected"%>>3D柱形圖</option>
<option value="bar" <%if request("char")="bar" then Response.Write " selected"%>>柱形圖</option>
<option value="Line" <%if request("char")="Line" then Response.Write " selected"%>>線形圖</option>
<option value="filledline" <%if request("char")="filledline" then Response.Write " selected"%>>填充線形圖</option>
</select>
</td>
<td align="right">
<select name=StatType LANGUAGE=javascript onchange="submit3()">
<option value="pay" <%if request("StatType")="pay" then Response.Write " selected"%>>--應(yīng)付統(tǒng)計(jì)--</option>
<option value="ar" <%if request("StatType")="ar" then Response.Write " selected"%>>--應(yīng)收統(tǒng)計(jì)--</option>
</select>
</td>
</tr>
<tr >
<td height="16" colspan="2" background="../images/title.gif"> </td>
</tr>
</table>
</td>
</tr>
<tr class="linecolor"><td height="2"></td></tr>
<tr height="5px"><td></td></tr>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -