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

📄 sslist.asp

📁 一个比较完整的企业erp系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%@language="vbscript" codepage="936"%>
<%response.buffer = true%>
<%Public HOME_PATH:HOME_PATH = "../"%>
<!--#include file="../db.asp"-->
<!--#include file="../inc/function.asp"-->
<%
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"
if isLogin = false then
   Response.Write viewinfo("LoginC","","")
   Response.end
end if

 uid = GetText("uid","G","number",1,10,0)
 SQL = "select * from supplier where uid = " & uid & ""
 set c01 = new CL01
     c01.Supplierinfo

	 SQL = "select identifyCode from usertype where uTypeid = (select uTypeSelect from usertype where uTypeid = " & USutypeid & ")"
	 identifyCode = isNumber(SelectZD(SQL,3),"int",0)
	 identifyCodeName = v1v2(identifyCode,0,"客户","商家")
     LengedTitle = v1v2(identifyCode,0,"相关订购记录","相关进货记录")
     Public title:title = "查看" & identifyCodeName & "(" & USLinkman & ")" & LengedTitle
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title><%=title%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<link href="<%=HOME_PATH%>css/style01.css" rel="stylesheet" type="text/css">
<script type = 'text/javascript' src = '<%=HOME_PATH%>js/layer00.js'></script>
<script type = 'text/javascript' src = '<%=HOME_PATH%>js/dateselect.js'></script>
<style>
html{min-width: 776px;}
fieldset {padding:3px;}
.tempF {border-top:solid 0px #fff;border-left:solid 0px #fff;border-right:solid 1px #d6d3ce;border-bottom:solid 1px #d6d3ce;}
.tempG td {text-align:left;}
#tempH input { border-style:none; height:15px; width:100%;}
</style>
<base target = '_self'>
</head>
<body style = 'border-style:none;margin:0px;background-color:buttonface;' onkeydown = "javascript:if(event.keyCode==116){window.location.reload();}">
<div style = 'text-align:center;'>
<fieldset><legend><%=identifyCodeName%>(<%=USLinkman%>)的 <%=LengedTitle%></legend>
<div style = 'text-align:left;padding-left:3px;'>简称:<%=USForShort%> 全称:<input type = 'text' style = 'width:80%;border-style:none;background-color:transparent;' value = '<%=USFullName%>' readonly='true'/></div>
<%Call DateSearch(DateStar,DateEnd,DateSQL,"ALL",Dateinfo)%>
<div style = 'text-align:center;padding:0px;'>
 <table border = '0' cellspacing = '0' cellpadding = '2' style ='width:100%;'>
   <tr>
   	 <form method='post' action="<%=SELVAR("FN","ssList.asp")%>" name = 'formSearch'>
	 <input type = 'hidden' name = 'uid' value = '<%=uid%>'/>
     <td style = 'width:80px;'><%=LengedTitle%></td>
	 <td style = 'width:80px;'>日期选择:从</td>
	 <td style = 'width:70px;'><input type = 'text' name="DateStar" onfocus="setday(this)" size="10" maxlength="10" readonly style = 'text-align:center;' value = '<%=DateStar%>'/></td>
	 <td style = 'width:30px;text-align:center;'>到</td>
     <td style = 'width:150px;'><input type = 'text' name="DateEnd" onfocus="setday(this)" size="10" maxlength="10" readonly style = 'text-align:center;'  value = '<%=DateEnd%>'/>
		 <input type="button" value = '搜索' style = 'border-style:none;' onclick="javascript:formSearch.submit();"/>
	 </td>
	 <td style = 'width:auto;'><span style = 'color:bule;'><%=Dateinfo%> 记录</span></td>
   </tr>
 </table>

</div>
</fieldset>



<table style = 'height:auto;width:100%;' cellspacing = '1' cellpadding = '0' border = '0'>
  <tr>
    <td style = 'border-top:#848284 solid 1px;border-left:#848284 solid 1px; border-bottom:#ffffff solid 1px;border-right:#ffffff solid 1px;'>
      <div style = 'width:100%;height:320px; left:0px; top:0px;z-index:1; overflow-y: auto;overflow-x:hidden;text-align:left;background-color:#ffffff; border-left: 1px solid #000000; border-right: 1px solid buttonface;border-top: 1px solid #000000; border-bottom: 1px solid buttonface;padding: 0px;'>

 <table cellpadding='0' cellspacing='0' style = 'width:100%;background-color:buttonface;border-style:none;' borderColorLight='#848284' borderColorDark='#ffffff' border = '1' class = 'LinkA' id = 'tempH'>

<%
	 thisPageSize = 20
	 PCount = 5 '当前页的前面和后面显示页数

     LinkFile = SELVAR("FN","supplierview.asp")
	 LUrl = "uid=" & uid & "&DateStar=" & DateStar & "&DateEnd=" & DateEnd

  Select Case identifyCode
     Case 0
%>
       <tr style = 'padding-left:3px;'>
         <td style = 'width:12px;text-align:center;height:20px;padding:0px;'><span style='font-family:webdings;'>8</span></td>
         <td style = 'width:35px;text-align:center;padding:0px;'>序号</td>
		 <td>日期</td>
		 <td>总价格</td>
		 <td>税率</td>
		 <td>含税价</td>
		 <td>折减</td>
		 <td>已支付</td>
		 <td>欠款</td>
		 <td>录入者</td>
		 <td style = 'border-right:0px solid;'>所选择的操作员</td>
      </tr>
<%

SQLm = "select * from sale where supplierid in(" & uid & ") " & DateSQL & " Order By thisDate Desc, saleid Desc"
      Set oRs = Server.CreateObject("Adodb.RecordSet")
	  oRs.Open(SQLm),Conn,1,1
	  if not oRs.eof then


SQL_ = "select Sum(Amount) , Sum(AmountshuilvALL) , Sum(nowpayment) , Sum(nopayment) , Sum(ZJ) from sale where supplierid = " & uid & " " & DateSQL & ""
Set outSelect = Server.CreateObject("Adodb.RecordSet")
outSelect.Open(SQL_),Conn,1,1
if not outSelect.eof then
  outAmountCount = outSelect(0)'所有总额(未含税)
  outAmountshuilvCount = outSelect(1)'所有总额(含税)
  elsePayment_ = SelectZD("select Sum(paymoney) from payment where supplierid = " & uid & " " & DateSQL & " ",0)'所有别支付
  outZJ = outSelect(4)'折减
  outnowPayment = outSelect(2) '购买时支付

  nowPaymenCount = outnowPayment + elsePayment_ + outZJ '所有支付总额
  noPaymentCount = outAmountshuilvCount - nowPaymenCount '所有未支付

  'noPaymentCount = outSelect(3)-elsePayment_-outZJ'所有欠款总额
  'Response.Write "outZJ = " & outZJ & "<br/>"
  'Response.Write "elsePayment_ = " & elsePayment_ & "<br/>"
  'Response.Write "outSelect(2) = " & outSelect(2) & "<br/>"
  'Response.Write "nowPaymenCount = " & nowPaymenCount & "<br/>"
  'Response.Write "outAmountshuilvCount = " & outAmountshuilvCount & " - " & outSelect(2) & " - " & elsePayment_ & " - " & outZJ & " = " & noPaymentCount & "<br/>"
else
  outAmountCount = 0'总额(未含税)
  outAmountshuilvCount = 0'总额(含税)
  noPaymentCount = 0'欠款总额
  nowPaymenCount = 0'支付总额
  outZJ = 0
end if
outSelect.Close
Set outSelect = Nothing
		 PageWrite = PaginatinoGoogle(oRs,noteTotal,thisPageSize,LinkFile,LUrl,LArr)
	     for i_oRs = 1 to thisPageSize
		     if oRs.eof then exit for
			    saleid = oRs("saleid")'
                saleNum = oRs("saleNum")'销售编号
				saleAmount = oRs("Amount")'总额
				saleAmountshuilvALL = isNumber(oRs("AmountshuilvALL"),"dec",0)'总额(含税)
				salenowpayment = isNumber(oRs("nowpayment"),"dec",0)'已支付
				ZJ = isNumber(oRs("ZJ"),"dec",0) '折减
				thisDate = oRs("thisDate")
				selectaid = isNumber(oRs("selectaid"),"int",0)
				intoaid = isNumber(oRs("intoaid"),"int",0)
				shuilvALL = isNumber(oRs("shuilvALL"),"int",0)

elsePayment_ = SelectZD("select Sum(paymoney) from payment where paymenttoid = " & 	saleid & " and supplierid = " & uid & " ",0)'别的支付
nowinPayment_ = (salenowpayment + elsePayment_+ZJ)'总的支付
nownoPayment_ = (saleAmountshuilvALL-nowinPayment_) '现在欠款 

outAmountshuilvALL = outAmountshuilvALL+saleAmountshuilvALL '总额(加税率)
outAmountALL = outAmountALL + saleAmount '当页总额(未加税率)
nowPaymentALL = nowPaymentALL + nowinPayment_ '当页已支付总额(包含折折减)
noPaymentALL = noPaymentALL + nownoPayment_ '当页未付总额
%>
				<tr>
				  <td><span style='font-family:webdings;'>8</span></td>
				  <td style = 'text-align:center;'><div style = 'background-color:#08246B;color:#ffffff;'><%=saleid%></div></td>
				  <td colspan = '12' style = 'border-right:0px solid;'>
				  销售编号:<a href="javascript:WindowOpen('<%=HOME_PATH%>sale/outview.asp?saleid=<%=saleid%>&aid=<%=Seuid_inc%>','outview',screen.availWidth-50,screen.availHeight-100,'');"><span style = 'color:blue;'><%=saleNum %></span></a>
				   总额:¥<%=FormatNumber(saleAmountshuilvALL,2)%>
				   折减:¥<%=FormatNumber(ZJ,2)%>
				  <br/>
				  购时支付:¥<%=FormatNumber(salenowpayment,2)%>
				   购后支付:<a href="javascript:SDD('<%=HOME_PATH%>sale/paymentinedList.asp?paymenttoid=<%=saleid%>','paymentedto',600,350,'');">¥<%=FormatNumber(elsePayment_,2)%></a>
				   总支付:¥<%=FormatNumber(nowinPayment_,2)%>
				   现在欠款:¥<%=FormatNumber(nownoPayment_,2)%>
				  </td>
				</tr>
<%

						'SQL = "select * from sale where supplierid = " & uid & " " & DateSQL & " and saleid = " & saleid & ""
						SQL = "select * from salelist where saleid = " & saleid & "" & DateSQL & " "
						'Response.Write SQL
						Rs.Open(SQL),Conn,1,1
						   if not Rs.eof then


'SQL_ = "select Sum(Amount) , Sum(nopayment) , Sum(nowpayment+ZJ) , Sum(Amount+(Amount*shuilvALL/100)) from sale where supplierid = " & uid & " " & DateSQL & ""
'Set outSelect = Server.CreateObject("Adodb.RecordSet")
'outSelect.Open(SQL_),Conn,1,1
'if not outSelect.eof then
'  outAmountCount = outSelect(0)
'  noPaymentCount = outSelect(1)
'  nowPaymenCount = outSelect(2)
'  outAmountshuilvCount = outSelect(3)
'else
'  outAmountCount = 0
'  noPaymentCount = 0
'  nowPaymenCount = 0
'  outAmountshuilvCount = 0
'end if
'outSelect.Close
'Set outSelect = Nothing
				
                           thisCount = Rs.RecordCount
						   for i_i = 1 to thisCount
							   if Rs.eof then exit for
								  'saleid = Rs("saleid")
								  'supplierid  = isNumber(Rs("supplierid"),"int",0)
								  'plNum  = Rs("plNum")
								  'saleNum  = Rs("saleNum")
								  'thisDate  = Rs("thisDate")
								  'ZJ = isNumber(Rs("ZJ"),"dec",0)
								  'outtime  = Rs("outtime")
								  'Amount  = isNumber(Rs("Amount"),"dec",0)
								  'shuilvALL = isNumber(Rs("shuilvALL"),"dec",0)
								  'AmountshuilvALL = isNumber(Rs("AmountshuilvALL"),"dec",0)'含税价
								  'nowpayment  = isNumber(Rs("nowpayment"),"dec",0)
								  'nopayment  = isNumber(Rs("nopayment"),"dec",0)
								  'intoaid  = isNumber(Rs("intoaid"),"int",0)
								  'selectaid  = isNumber(Rs("selectaid"),"int",0)
                                  salelistid = Rs("salelistid")
								  saleid = Rs("saleid")
								  saleNum = Rs("saleNum")
								  supplierid = Rs("supplierid")
								  stockid = Rs("stockid")
								  outHow = Rs("outHow")
								  outPrice = Rs("outPrice")
								  shuilv = Rs("shuilv")
								  saleListAmount = Rs("Amount")
								  'thisDate = Rs("thisDate")
						          if not i_i = thisCount then Pic = "├" else Pic = "└"

				%>
					  <tr style = 'padding-left:3px;background-color:#ffffff;cursor: default;'>
						<td style = 'text-align:center;padding:0px;background-color:buttonface;height:18px;'>×</td>
						<td style = 'text-align:center;padding:0px;background-color:buttonface;text-align:left;'><%=Pic & " " & salelistid%></td>
						<td class = 'tempF'><%=thisDate%></td>
						<td class = 'tempF'>¥<%=formatNumber(saleListAmount,2)%></td>
						<td class = 'tempF'><%=formatNumber(shuilvALL/thisCount,2)%>%</td>
						<td class = 'tempF'>¥<%=formatNumber(AmountshuilvALL,2)%></td>
						<td class = 'tempF'>¥<%=formatNumber(ZJ/thisCount,2)%></td>
						<td class = 'tempF'>¥<%=formatNumber(nowpayment,2)%></td>
						<td class = 'tempF'>¥<%=formatNumber(nopayment,2)%></td>
						<td class = 'tempF'><%=SelectZD("select TrueName from admins where aid = " & intoaid & "","未知")%></td>
						<td style = 'border-top:solid 0px #fff;border-left:solid 0px #fff;border-right:solid 0px #848284;border-bottom:solid 1px #d6d3ce;'><%=SelectZD("select TrueName from admins where aid = " & selectaid & "","未知")%></td>
						</td>


					  </tr>
				<%
						   'outAmountALL = outAmountALL + Amount '总额(未加税率)
						   'noPaymentALL = noPaymentALL + nopayment '未付总额
						   'nowPaymentALL = nowPaymentALL + (nowpayment+ZJ) '已支付总额(包含折折减)

						   'outAmountshuilvALL = outAmountshuilvALL+AmountshuilvALL '总额(加税率)
						   Rs.movenext
						 next



'//////////////////////////////////////////////////////////////////////////////////////////////
incfinancePayment = SelectZD("select Sum(fMoney) from incfinance where supplierid = " & uid & " " & DateSQL & " and inorout = 1 and not ftypeid = 0 ",0)'财务表相关收款

incfinancePaymentALL = SelectZD("select Sum(fMoney) from incfinance where supplierid = " & uid & " and inorout = 1 and not ftypeid = 0 ",0)'财务表相关收款(全部)
'//////////////////////////////////////////////////////////////////////////////////////////////




				   Bottom_info ="<div style = 'text-align:center;padding:3px;' class='LinkA'>" & PageWrite & "</div>" & _
								"<fieldset style = 'width:99%;text-align:left;'><legend>相关信息 - 日期:" & Dateinfo & "</legend><table style = 'width:100%;' cellspacing = '0' cellpadding = '2' class = 'tempG'>" & _
								 "<tr>" & _
								 "<td style = 'width:28%;'>当页销售总额(含税价):¥" & formatNumber(outAmountshuilvALL,2) & "</td>" & _
								 "<td style = 'width:22%;'>财务相关收款:¥" & formatNumber(incfinancePayment,2) & "</td>" & _
								 "<td style = 'width:28%;'>当页收款总额(含折减):¥" & formatNumber(nowPaymentALL+incfinancePayment,2) & "</td>" & _
								 "<td style = 'width:22%;'>当页欠款总额:¥" & formatNumber(noPaymentALL-incfinancePayment,2) & "</td>" & _
								 "</tr></table>" & _
								 "<table style = 'width:100%;' cellspacing = '0' cellpadding = '2' class = 'tempG'>" & _

⌨️ 快捷键说明

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