📄 payment.asp
字号:
<%@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
thisDate__ = SELVAR("thisDate","")
uid = GetText("uid","G","number",1,10,0)
SQL = "select * from supplier where uid = " & uid & ""
set c01 = new CL01
c01.Supplierinfo
SQLPay = "select * from payment where (paymentid is null)"
Options = trim(Request.Form("Options"))
if Options = "payment" and not uid = 0 then
Rs.Open(SQLPay),Conn,1,3
thisDate = GetText("thisDate","P","Str",4,10,0)
if not isdate(thisDate) then thisDate = thisDate__
Rs.Addnew
Rs("supplierid") = uid
Rs("paymoney") = GetText("payment","P","number",1,10,0) '支付
Rs("thisDate") = thisDate
Rs("intotime") = now()
Rs("intoaid") = Seuid_inc'操作人id
Rs("selectaid") = GetText("aid","P","number",1,10,0)'收款人id
Rs("Remark") = htmlencode(GetText("Remark","P","Str",1,250,""),"Y")'其他说明
Rs.update
viewinfo_ = viewinfo("divLoca","正在执行操作.请稍候…","")
viewinfo__ = viewinfo_ & viewinfo("CloseTime","2000","")
Rs.Close
end if
SQL = "select identifyCode from usertype where uTypeid = (select uTypeSelect from usertype where uTypeid = " & USutypeid & ")"
identifyCode = isNumber(SelectZD(SQL,3),"int",0)
if identifyCode = 0 then
identifyCodeName = "客户"
LengedTitle = "收款"
TitleA = "(相关订购金额总计)"
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
elsePaymentCount = SelectZD("select Sum(paymoney) from payment where supplierid = " & uid & "",0)
nowPaymentCount__ = nowPaymenCount+elsePaymentCount'全部已支付(包括后来支付)
noPaymentCount__ = noPaymentCount-elsePaymentCount
menoyCountinfo = "·全部订购总额(包含税率):¥" & formatNumber(isNumber(outAmountshuilvCount,"dec",0),2) & "<br/>·全部已付总额(包含折减):¥" & formatNumber(isNumber(nowPaymentCount__,"dec",0),2) & "<br/>·全部欠款总额:¥" & formatNumber(isNumber(noPaymentCount__,"dec",0),2)
OPENURL = "saleout('" & HOME_PATH & "sale/paymentsaleList.asp?supplierid=" & uid
FORMString = " form.saleNum.value = pay[0] ; " & chr(13) & " form.saleid.value = pay[1] ; " & chr(13) & " form.TrueName_Phone_s.value = pay[2] ; "
else
identifyCodeName = "商家"
LengedTitle = "付款"
TitleA = "(相关进货金额总计)"
SQL_ = "select Sum(inprice*inHow) , Sum(inpayment) from stock where supplierid = " & uid & " " & DateSQL & ""
Set outSelect = Server.CreateObject("Adodb.RecordSet")
outSelect.Open(SQL_),Conn,1,1
if not outSelect.eof then
inpriceCount = outSelect(0)
inpaymentCount = outSelect(1)
else
inpriceCount = 0
inpaymentCount = 0
end if
outSelect.Close
Set outSelect = Nothing
elsePaymentCount = SelectZD("select Sum(paymoney) from payment where supplierid = " & uid & "",0)
inpaymentCount__ = inpaymentCount+elsePaymentCount'全部已支付(包括后来支付)
noPaymentCount__ = inpriceCount-inpaymentCount__'全部未支付
menoyCountinfo = "·全部进货总额:¥" & formatNumber(isNumber(inpriceCount,"dec",0),2) & "<br/>·全部已付总额:¥" & formatNumber(isNumber(inpaymentCount__,"dec",0),2) & "<br/>·全部欠款总额:¥" & formatNumber(isNumber(noPaymentCount__,"dec",0),2)
OPENURL = "paymentout('" & HOME_PATH & "merchandise/paymentmlist.asp?supplierid=" & uid
FORMString = " form.stockNum.value = pay[0] ; " & chr(13) & " form.stockmid.value = pay[1] ; " & chr(13) & " form.TrueName_Phone_s.value = pay[2] ; "
end if
Public title:title = "向(" & USLinkman & "-" & USFullName & ")" & identifyCodeName & "-" & 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>
<script language="JavaScript" type = 'text/javascript'>
<!--
var admin_ = null ;
function adminList() {
admin_ = window.showModalDialog('<%=HOME_PATH%>admin/selectadminlist.asp','','dialogWidth:750px;dialogHeight:400px;scroll:yes;help:no;status:no;center:yes;edge:raised;');
if (admin_!=null) {
document.form.aid.value = admin_[0];
document.form.Loginid.value = admin_[1];
document.form.TrueName_Phone.value = admin_[2];
}
}
var scroll_ = '';
function paymentout(Url,wName,W,H,scroll_){
if (scroll_!='') {scroll_ = 'scroll:yes';}else{scroll_ = 'scroll:no'}
pay = window.showModalDialog(Url,wName,'dialogWidth:'+W+'px;dialogHeight:'+H+'px;'+scroll_+';help:no;status:no;center:yes;edge:raised;');
if(pay!=null) {
<%=FORMString%>
}
}
//-->
</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;}
form { padding:0px;}
</style>
<base target = '_self'>
</head>
<body style = 'border-style:none;margin:10px;background-color:buttonface;' onkeydown = "javascript:if(event.keyCode==116){window.location.reload();}">
<%if Options = "payment" then Response.Write viewinfo__%>
<div style = 'text-align:center;'>
<form method='post' action="<%=SELVAR("FN","?")%>" name = 'form'>
<fieldset style = 'width:100%;line-height:16px;text-align:left;'><legend><%=USLinkman & "-" & USFullName & TitleA%></legend>
<%=menoyCountinfo%> <input type = 'text' style = 'border-style:none;' value = '<%=noPaymentCount__%>' name = 'noPaymentCount'/><input type = 'hidden' value = '<%=noPaymentCount__%>' name = 'noPaymentCount__'/>
</fieldset>
<input type= 'hidden' value = '<%=uid%>' name= 'uid'/>
<input type= 'hidden' value = 'payment' name= 'Options'/>
<table style = 'height:auto;width:100%;' cellspacing = '0' cellpadding = '1' borderColorLight='buttonshadow' borderColorDark='#eeeeee' border = '1'>
<tr style = 'text-align:center;'>
<td style = 'width:80px;height:25px;'><%=LengedTitle%>金额</td>
<td style = 'width:75px;'><%=LengedTitle%>日期</td>
<td><%=LengedTitle%>人</td>
<td>操作员</td>
</tr>
<tr style = 'text-align:center;'>
<td style = 'width:80px;'><input type = 'text' name = 'payment' style = 'width:100%;' onkeyup = "javascript:if(isNaN(this.value)){this.value=0;};var noPay__ = form.noPaymentCount__.value;form.noPaymentCount.value = noPay__-this.value;"/></td>
<td><input type = 'text' name = 'thisDate' onfocus="setday(this)" size="10" maxlength="10" readonly style = 'text-align:center;' value = '<%=thisDate__%>'/></td>
<td style = 'width:88px;'><input type = 'text' style = 'width:80%;border-right-style:none;' name = 'Loginid' value = '<%=Seloginid_inc%>' readonly/><input type = 'button' style = 'border-left-style:none;' value = '…' onclick = "javascript:adminList();"/><input type = 'hidden' name = 'aid' value = '<%=Seuid_inc%>'/><input type = 'hidden' name = 'TrueName_Phone'/></td>
<td style = 'width:auto;'><%=Seloginid_inc%><input type = 'hidden' name = 'Exeaid' value = '<%=Seuid_inc%>'/></td>
</tr>
<tr>
<td style = 'text-align:center;'>其他说明</td>
<td colspan = '3'><input type = 'text' name = 'Remark' style = 'width:100%;border:1px #848284 solid ;background-color:transparent;'/></td>
</tr>
<tr>
<td style = 'text-align:center;'><%=LengedTitle%>到:</td>
<td colspan = '3'><input type ='text' style = 'width:100px;border-right:solid 0px #fff;' name = 'stockNum'/><input type = 'hidden' name = 'stockmid'/><input type = 'button' value = '…' style = 'border-left:solid 0px #fff;color:blue;' onclick = "javascript:<%=OPENURL%>','OPENURL',800,500,'Y');"><input type = 'text' style = 'border-style:none; border-bottom:1px solid #000;width:140px;background-color:transparent;' name = 'TrueName_Phone_s'/></td>
</tr>
<tr>
<td colspan = '4' style = 'text-align:center;padding:3px;'><input type="button" value = '提交' onclick = "javascript:form.submit();"><input type="reset" value = '重置'><input type = 'button' onclick = "javascript:window.close();" value = '关闭'/></td>
</tr>
</table>
</form>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -