⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chg_rec_del.asp

📁 一个比较完整的企业erp系统
💻 ASP
字号:
<!--#include file="../config2.asp"-->
<!--#include file="../inc/check_login.asp"-->
<!--#include file="../inc/functions.asp"-->
<%
Application_ID = 3001100	'本功能编号,含义请查看编码表
if not CheckAuth(Session("Employee_ID"),Application_ID)	then	'验证权限
	Server.Transfer "../err/un_authorized.htm"
	response.end
end if
%>
<!--**************身份验证部分****************-->
<%
Rec_ID = request("Rec_ID")
if not IsNot(Rec_ID,"n") then
	response.write "记录编号丢失或不正确"
	response.end
end if

Set conn = Server.CreateObject("ADODB.Connection")
conn.open connstr
'sql = "sp_Contract_Chg_Rec_Del " & Rec_ID
'response.write sql
sql = "select Contract_ID from Contracts_Chg_Rec where Rec_ID = " & Rec_ID
set rs = conn.execute(sql)
if rs.eof then
	Contract_ID = 0
else
	Contract_ID = rs("Contract_ID")
end if
sql = "delete from Contracts_Chg_Rec where Rec_ID = " & Rec_ID
conn.execute(sql)
'****
'收款记录*
sql = "select SUM(Account) as Account_Pay from Contracts_Pay_Rec where Contract_ID = " & Contract_ID
set rs=conn.execute(sql)
if rs.eof then
	Account_Pay = 0
else
	Account_Pay = rs("Account_Pay")
end if
'/* 外包费记录 */
sql = "select SUM(Account) as Account_Other from Contracts_Other_Rec where Contract_ID = " & Contract_ID
set rs=conn.execute(sql)
if rs.eof then
	Account_Other = 0
else
	Account_Other = rs("Account_Other")
end if
'/* 基础业务费记录 */
sql = "select SUM(Account) as Account_Base from Contracts_Base_Rec where Contract_ID = " & Contract_ID
set rs=conn.execute(sql)
if rs.eof then
	Account_Base = 0
else
	Account_Base = rs("Account_Base")
end if
'/* 合同变更记录 */
sql = "select SUM(Account) as Account_Chgfrom Contracts_Chg_Rec where Contract_ID = " & Contract_ID
set rs=conn.execute(sql)
if rs.eof then
	Account_Chgfrom = 0
else
	Account_Chgfrom = rs("Account_Chgfrom")
end if
'/* 更新合同记录 */
sql = "update Contracts set Other_Cost = " & Account_Other & ",Base_Cost = " & Account_Base & ",Chg_Account=" & Account_Chg & ", Received = " & Account_Pay & "		where Contract_ID = " & Contract_ID
conn.execute sql
set conn = nothing

'操作日志
Rec_Content = "删除合同变更记录"
Command_Line = sql
call Op_Rec(Rec_Content,Command_Line)
%>
成功删除合同变更记录!
<script language="JavaScript" type="text/javascript">
	parent.main.location.reload();
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -