📄 invoicecheck.asp
字号:
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<%
sysid=1
Dim objcheck
Set objcheck=Server.CreateObject("SmartSales.CheckFunction")
objcheck.CheckUserFunction "payment","read"
set objcheck=nothing
if request.Form("fromdate")<>"" then fromdate=request.Form("fromdate")
if request.Form("todate")<>"" then todate=request.Form("todate")
dim conn
dim rs
set conn=server.CreateObject("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
conn.Open connstring
if request("statusindex")<>"" then
transactid=split(request("invoicestatus"&request("statusindex")),",")
sql="select * from materialtransaction where orderpaymentid="&request("statusindex")
set rsq=conn.execute(sql)
do while not rsq.eof
bexisted=false
for k=0 to ubound(transactid)
temptransactid=cint(transactid(k))
if cint(rsq("transactid"))=temptransactid then bexisted=true
next
if bexisted and rsq("invoicestatus")="未开" then
sql="update materialtransaction set invoicestatus='已开',invoiceverifydate='"&date()&"' where transactid="&rsq("transactid")
conn.execute(sql)
end if
if bexisted=false and rsq("invoicestatus")="已开" then
sql="update materialtransaction set invoicestatus='未开',invoiceverifydate=null where transactid="&rsq("transactid")
conn.execute(sql)
end if
rsq.movenext
loop
sql="select invoicestatus from materialtransaction where invoicestatus='未开' and orderpaymentid="&request("statusindex")
set rsq=conn.execute(sql)
if rsq.eof then
conn.execute("update orderpayment set invoicestatus='已销',verifinvoicedate='"&date()&"' where paymentid="&request("statusindex"))
else
conn.execute("update orderpayment set invoicestatus='未销',verifinvoicedate=null where paymentid="&request("statusindex"))
end if
end if
if request.querystring("accountid")<>"" then
strwhere =" and accountid="&request.querystring("accountid")
straccount=request.querystring("accountid")
straccountname=getfieldvalue("account","accountid",request.querystring("accountid"),"account")
end if
if request.Form("account")<>"" then
strwhere =" and accountid="&request.Form("account")
straccount=request.Form("account")
straccountname=getfieldvalue("account","accountid",request.Form("account"),"account")
end if
if request.form("status")="" or request.form("status")="未销" then
strwhere=strwhere&" and status='未销'"
elseif request.form("status")="已销" then
strwhere=strwhere&" and status='已销'"
elseif request.form("status")="全部" then
strwhere=strwhere&" and status like '%%'"
end if
if fromdate<>"" then
strwhere=strwhere&" and createdate>='"&fromdate&"' "
end if
if todate<>"" then
strwhere=strwhere&" and createdate<='"&todate&"' "
end if
sql="select * from v_invoicecheck_all where sysaccountid="&sysid&" "&strwhere&" order by createdate"
'response.Write(sql)
rs.Open sql,conn,1,1
%>
<html>
<head>
<LINK href="../global.css" rel=STYLESHEET type=text/css>
<LINK href="../tools/menu.css" rel=STYLESHEET type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<Script LANGUAGE="javascript" src="../tools/menuView.js"></script>
<title>开票对帐</title>
</head>
<script language=javascript>
var g_UrlParams ;
function JustShowMenu(src)
{
document.all(src).style.visibility = "visible";
}
function HideMenu(src)
{
document.all(src).style.visibility = "hidden";
}
function MenuItem_onclick(url,attrstr)
{
var tempwin=window.open(url,null,attrstr);
tempwin.location.href=url + g_UrlParams;
//window.location.href = url + g_UrlParams;
}
function LocateMenu(src,MenuName)
{
var left;
var top ;
var parent ;
parent = document.all(src).offsetParent;
left = parent.offsetLeft + document.all(src).offsetLeft + document.all(src).offsetWidth/2;
top = parent.offsetTop + document.all(src).offsetTop +document.all(src).offsetHeight/2;
while(true)
{
parent = parent.offsetParent ;
if ( "BODY"==parent.tagName) break;
left += parent.offsetLeft ;
top += parent.offsetTop;
}
document.all(MenuName).style.left = left ;
document.all(MenuName).style.top = top ;
}
function ShowMenu(src,MenuName,iUrlParams)
{
var i ;
var parent = new Array(20) ;
var left ;
var top ;
g_UrlParams = iUrlParams ;
LocateMenu(src,MenuName);
document.all(MenuName).style.visibility = "visible";
}
</script>
<script language=javascript>
function showit(objname,imgn){
if (eval(objname+'.style.display=="block"') == true)
{
eval(objname+'.style.display="none";');
eval('IMG'+objname+'.style.display="block";');
eval('IMG1'+objname+'.style.display="none";');
//alert('IMG'+objname+'.src = "../images/button2.gif";');
//eval('IMG'+objname+'.src = "../images/button2.gif";');
}
else
{
eval(objname+'.style.display="block";');
eval('IMG'+objname+'.style.display="none";');
eval('IMG1'+objname+'.style.display="block";');
//alert('IMG'+objname+'.src = "../images/button1.gif";');
//eval('IMG'+objname+'.src = "../images/button1.gif";');
}
}
function ChgStatus(){
if (form1.SelStatus.value==0){
form1.status.value='未销';
}
if (form1.SelStatus.value==1){
form1.status.value='已销';
}
if (form1.SelStatus.value==-1){
form1.status.value='全部';
}
form1.account.value=form1.account.value;
form1.submit();
}
</script>
<script language=javascript src="../tools/newcalendar.js"></script>
<body leftmargin="10" rightmargin="0" topmargin="10">
<form name="form1" method="post" action="">
<input type=hidden name=status>
<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="150" >从
<input type="text" name="fromdate" size="9" language=javascript id="dupdatetimefrom" value="<%=fromdate%>" readonly>
<% call AddImg("datefrom")%>
- </td>
<td width="400" nowrap>
<div id=strvalue1 <%if request("strfield")<>"username" or request("strfield")="" then response.write "style=display:block" else response.write "style=display:none" end if%>>
<input type="text" name="todate" size="9" language=javascript id="dupdatetimeto" value="<%=todate%>" readonly>
<% call AddImg("dateto")%>
<input type = hidden name=clicksource>
<input type = hidden name=clickresult >
客户
<input name="account" type="hidden" size="8" value="<%=straccount%>">
<input name="accountname" type="text" size="25" value="<%=straccountname%>" readonly>
<input type="button" name="bnaccount" onClick="JavaScript:opensubwin2('form1','account')" value=... class=black>
</div></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -