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

📄 default.asp

📁 进销存软件源代码
💻 ASP
字号:
<!-- #include virtual="/eB3KTransaction.asp" -->
<!-- #include virtual="/Server/Common.asp" -->
<%
dim x
function SaleRateCheck()
	dim rsCheck,rs,szSQL
	dim stock,productid,OneDay,TwoDay,ThreeDay,OneSaleRate,TwoSaleRate,ThreeSaleRate,OneTimeLimit,TwoTimeLimit,ThreeTimeLimit
	dim y,z,w
	szSQL="SELECT * FROM [biAlertSet] WHERE [isdeleted]=0 AND [AccountID]<>1 AND [InfoType]=1011"
	Set rs = Server.CreateObject("ADODB.RecordSet")
	rs.open szSQL,Conn,1,1
	do while not rs.EOF
		stock=rs("Int1")
		productid=rs("Int2")
		OneDay=rs("Int3")
		TwoDay=rs("Int4")
		ThreeDay=rs("Int5")
		OneSaleRate=rs("Currency1")
		TwoSaleRate=rs("Currency2")
		ThreeSaleRate=rs("Currency3")
		
	   y=GetSaleRate(Stock,Productid,OneDay)
	   z=GetSaleRate(Stock,Productid,TwoDay)
	   w=GetSaleRate(Stock,Productid,TwoDay)
	   if y<OneSaleRate or z<TwoSaleRate or w<ThreeSaleRate then
           SaleRateCheck=1
           exit function
	   end if
	loop
	SaleRateCheck=0
end function

function GetSaleRate(Stock,ProductID,datelong)
	dim szSQL,rsCheck,SaleNum,FirstNum
	szSQL="Select sum(quantity) as quantity From ("& _
		" Select Quantity= case IsNull(sum(vl.quantity),0) when 0 then 0.001 else sum(vl.quantity) end From bdOutStock as vt,bdOutStockList as vl Where vt.ID=vl.ID and vt.BillType=1 and vt.AuditID<>0 and vt.Isdeleted=0 and AccountID<>1 and vt.UpdateDate>DateAdd(d,-"& datelong &",GetDate()) and vt.Stock="&Stock&" and vl.ProductID="&ProductID & _
		" ) as nv"
	rsCheck=Conn.Execute(szSQL)
	SaleNum=rsCheck("quantity").value
	set rsCheck=nothing
	
	szSQL="Select Quantity= case IsNull(sum(Quantity),0) when 0 then 0.0001 else sum(quantity) end  From resProductStock Where AccountID<>1 and Stock="& Stock &" and ProductID="& ProductID &" and CreateDate<DateAdd(d,-"& datelong &",GetDate()) and (updateDate>DateAdd(d,-"& datelong &",GetDate()) OR Isdeleted=0)"
	rsCheck=Conn.Execute(szSQL)
	FirstNum=rsCheck("quantity").value
         GetSaleRate=CDbl(SaleNum)*100/CDbl(FirstNum)
end function
x=SaleRateCheck()
%>
<HTML>
<HEAD><meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE>INPUT {border:1 solid #000000}</STYLE>
</HEAD><script src="/client/Request.js"></script><script src="/client/IClient.js"></script><BODY></BODY>
<script>
IClient('end',<%=x%>);
</script>
</HTML>

⌨️ 快捷键说明

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