📄 setstatus.asp
字号:
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<%
Dim objcheck
Set objcheck=Server.CreateObject("SmartSales.CheckFunction")
objcheck.CheckUserFunction "payment","edit"
set objcheck=nothing
if Request("Mod") = "set" then
dim conn
dim rs
set conn=server.createobject("adodb.connection")
conn.open connstring
if request("status")="未销" then
if request("documenttype")="payment" then
sql="update orderpayment set collectionstatus='已销',verifcollectiondate='"&date()&"' where paymentid ="&request("id")
conn.execute("update materialtransaction set collectionstatus='已收',collectionverifydate='"&date&"' where collectionstatus='未收' and orderpaymentid="&request("id"))
conn.execute("update collection set collectionstatus='已销',verifcollectiondate='"&date()&"' where paymentid ="&request("id"))
elseif request("documenttype")="paymentinvoice" then
sql="update orderpayment set invoicestatus='已销',verifinvoicedate='"&date()&"' where paymentid ="&request("id")
conn.execute("update materialtransaction set invoicestatus='已开',invoiceverifydate='"&date&"' where invoicestatus='未开' and orderpaymentid="&request("id"))
conn.execute("update invoice set invoicestatus='已销',verifinvoicedate='"&date()&"' where paymentid ="&request("id"))
elseif request("documenttype")="collection" then
sql="update collection set collectionstatus='已销',verifcollectiondate='"&date()&"' where collectionid ="&request("id")
elseif request("documenttype")="invoice" then
sql="update invoice set invoicestatus='已销',verifinvoicedate='"&date()&"' where invoiceid ="&request("id")
elseif request("documenttype")="popay" then
sql="update pay set paymentstatus='已销',verifpaymentdate='"&date()&"' where payid ="&request("id")
elseif request("documenttype")="popayment" then
sql="update popayment set paymentstatus='已销',verifpaymentdate='"&date()&"' where paymentid ="&request("id")
conn.execute("update materialtransaction set collectionstatus='已付',collectionverifydate='"&date&"' where collectionstatus='未付' and popaymentid="&request("id"))
elseif request("documenttype")="poinvoice" then
sql="update poinvoice set invoicestatus='已销',verifinvoicedate='"&date()&"' where poinvoiceid ="&request("id")
elseif request("documenttype")="popaymentinvoice" then
sql="update popayment set invoicestatus='已销',verifinvoicedate='"&date()&"' where paymentid ="&request("id")
conn.execute("update materialtransaction set invoicestatus='已收',invoiceverifydate='"&date&"' where invoicestatus='未收' and popaymentid="&request("id"))
end if
else
if request("documenttype")="payment" then
sql="update orderpayment set Collectionstatus='未销',verifcollectiondate=null where paymentid ="&request("id")
conn.execute("update materialtransaction set collectionstatus='未收',collectionverifydate=null where collectionstatus='已收' and orderpaymentid="&request("id"))
conn.Execute("update collection set Collectionstatus='未销',verifcollectiondate=null where paymentid ="&request("id"))
elseif request("documenttype")="paymentinvoice" then
sql="update orderpayment set invoicestatus='未销',verifinvoicedate=null where paymentid ="&request("id")
conn.execute("update materialtransaction set invoicestatus='未收',invoiceverifydate=null where invoicestatus='已收' and orderpaymentid="&request("id"))
conn.Execute("update invoice set invoicestatus='未销',verifinvoicedate=null where paymentid ="&request("id"))
elseif request("documenttype")="collection" then
sql="update collection set Collectionstatus='未销',verifcollectiondate=null where collectionid ="&request("id")
elseif request("documenttype")="invoice" then
sql="update invoice set invoicestatus='未销',verifinvoicedate=null where invoiceid ="&request("id")
elseif request("documenttype")="popay" then
sql="update pay set paymentstatus='未销',verifpaymentdate=null where payid ="&request("id")
elseif request("documenttype")="popayment" then
sql="update popayment set paymentstatus='未销',verifpaymentdate=null where paymentid ="&request("id")
elseif request("documenttype")="poinvoice" then
sql="update poinvoice set invoicestatus='未销',verifinvoicedate=null where poinvoiceid ="&request("id")
elseif request("documenttype")="popaymentinvoice" then
sql="update popayment set invoicestatus='未销',verifinvoicedate=null where paymentid ="&request("id")
end if
end if
'response.write sql
'response.end
set rs=conn.execute(sql)
%>
<script language=javascript>
window.opener.location.reload();
window.close();
</script>
<%
end if
%>
<title>确信</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<Link href="../global.css" rel=stylesheet type=text/css>
<Script Language="javascript" >
function dosub()
{
form1.Mod.value = "set" ;
form1.submit();
}
</Script>
</head>
<body bgcolor="#FFFFFF" text="#000000" >
<div align="center">
<br> <form method="post" id=form1 name=form1>
<%
%>
<input type=hidden name="Mod">
<br>
<p>
<table>
<%if request("warn")<>"" then%>
<tr align=left height=50>
<td><font color=red>提醒:</font><br> <font color=blue><%=request("warn")%></font>
</td>
</tr>
<%end if%>
<tr align=center height=50>
<td class=title>确信? </td>
</tr>
<tr align=center>
<td style="cursor:hand"> <a onclick="return dosub()"><img src="../images/button_confirm.gif"></a>
<a onclick="window.close()"><img src="../images/button_cancel.gif" ></a>
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -