📄 paymentout.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
Set c01 = new CL01
thisDate__ = SELVAR("thisDate","")
uid = GetText("uid","G","number",1,10,0)
paymenttoid = GetText("paymenttoid","G","number",1,10,0)
SQL = "select * from stockm where stockmid = " & paymenttoid & ""
Rs.open(SQL),Conn,1,1
if not Rs.eof then
stockmid_ = Rs("stockmid")
stockNum_ = Rs("stockNum")
plNum_ = Rs("plNum")
supplierid_ = Rs("supplierid")
totalmoney_ = isNumber(Rs("totalmoney"),"dec",0)
inpayment_ = isNumber(Rs("inpayment"),"dec",0)
nopayment_ = Rs("nopayment")
intotime_ = Rs("intotime")
updatetime_ = Rs("updatetime")
thisDate_ = Rs("thisDate")
intoaid_ = Rs("intoaid")
uaid_ = Rs("uaid")
selectaid_ = Rs("selectaid")
Remark_ = Rs("Remark")
inpaymented_ = isNumber(SelectZD("select Sum(paymoney) from payment where paymenttoid = " & stockmid_ & " and supplierid = " & supplierid_ & "",0),"dec",0)'进货后支付
else
Response.end
end if
Rs.Close
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("paymenttoid") = stockmid_
paymentM = GetText("payment","P","number",1,10,0)
Rs("paymoney") = paymentM '支付
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,"none"),"Y")'其他说明
Rs("inorout") = 0
Rs.update
paymentid_ = SelectZD("select paymentid from payment Order by paymentid Desc",0)
Conn.Execute"insert into incfinance (ftypeid,fName,fMoney,fRemark,intotime,thisDate,aid,inorout,supplierid,paymentid) values (0,'编号为:" & stockNum_ & "的支付'," & paymentM & ",'支付编号为(" & stockNum_ & ")时同时记录','" & now & "','" & thisDate & "'," & Seuid_inc & ",0," & supplierid_ & "," & paymentid_ & ")"'同时间记录到财务表
viewinfo_ = viewinfo("divLoca","正在执行操作.请稍候…","")
Response.Write viewinfo("CloseTime","2000","window.returnValue = 'parent.right';")
Rs.Close
end if
SQL = "select * from supplier where uid = " & uid & ""
c01.Supplierinfo
SQL_ = "select Sum(inprice*inHow) , Sum(inpayment) from stock where supplierid = " & uid & ""
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
inpaymentCountALLed = isNumber(SelectZD("select Sum(inpayment) from stockm where supplierid = " & uid & "",0),"int",0)'进货时支付
incfinancePayment = isNumber(SelectZD("select Sum(fMoney) from incfinance where 1 = 1 and supplierid = " & uid & " and inorout = 0 and not ftypeid = 0 ",0),"int",0)'财务表相关支付
elsePaymentCount = SelectZD("select Sum(paymoney) from payment where supplierid = " & uid & "",0)
inpaymentCount__ = inpaymentCountALLed+elsePaymentCount+incfinancePayment'全部已支付(包括后来支付)
noPaymentCount__ = inpriceCount-inpaymentCount__'全部未支付
menoyCountinfo = "·全部进货总额:¥" & formatNumber(isNumber(inpriceCount,"dec",0),2) & "<br/>·财务表支付总额:¥ " & formatNumber(isNumber(incfinancePayment,"dec",0),2) & "<br/>·全部已付总额:¥" & formatNumber(isNumber(inpaymentCount__,"dec",0),2) & "<br/>·全部欠款总额:¥" & formatNumber(isNumber(noPaymentCount__,"dec",0),2)
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.TrueName.value = admin_[1];
document.form.TrueName_Phone.value = admin_[2];
}
}
//-->
</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>支付编号为:(<%=stockNum_%>)的进货单
</legend>
·该单总金额:¥<%=formatNumber(totalmoney_,2) & "<br/>·进货时支付:¥" & formatNumber(inpayment_,2) & "<br>·进货后支付:¥" & formatNumber(inpaymented_,2) & "<br/>·该单现欠款:¥" & formatNumber(totalmoney_-(inpayment_+inpaymented_),2) %><input type = 'hidden' name = 'nownopayment' value = '<%=totalmoney_-(inpayment_+inpaymented_)%>'/> 该单尚欠:<input type = 'text' name = 'nopaymenttemp' style = 'border-style:none;color:red;width:80px;' value = '<%=totalmoney_-(inpayment_+inpaymented_)%>' readOnly = 'true'/></fieldset>
<input type= 'hidden' value = '<%=uid%>' name= 'uid'/>
<input type= 'hidden' value = 'payment' name= 'Options'/>
<input type = 'hidden' name = 'paymenttoid' value = '<%=stockmid_%>'/>
<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;'>支付金额</td>
<td style = 'width:75px;'>支付日期</td>
<td>所选支付人</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;form.nopaymenttemp.value=form.nownopayment.value-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 = 'TrueName' value = '<%=SeTrueName_inc%>' readonly/><input type = 'button' style = 'border-left-style:none;' value = '…' onclick = "javascript:adminList();"/><input type = 'hidden' name = 'aid' value = '<%=Seuid_inc%>'/></td>
<td style = 'width:auto;'><input type='hidden' name = 'TrueName_Phone'/><%=SeTrueName_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 colspan = '4' style = 'text-align:center;padding:3px;'><input type="button" value = '提交' onclick = "javascript:var pv = replace_(form.payment.value,' ','') ; if(pv==''){alert('请填写付款金额! ');form.payment.focus();return false;}else if(Number(form.payment.value)>Number(form.nownopayment.value)) { alert('错误:您输入的支付金额大于该单的欠款金额! ');return false ;}else{form.submit();}"><input type="reset" value = '重置'><input type = 'button' onclick = "javascript:window.close();" value = '关闭'/></td>
</tr>
</table>
<fieldset style = 'width:100%;line-height:16px;text-align:left;'><legend><span style = 'color:blue;'><%=USLinkman & "-" & USFullName & TitleA%></span></legend>
<%=menoyCountinfo%> <input type = 'text' style = 'border-style:none;' value = '<%=noPaymentCount__%>' name = 'noPaymentCount' readOnly = 'true'/><input type = 'hidden' value = '<%=noPaymentCount__%>' name = 'noPaymentCount__'/>
</fieldset>
</form>
</div>
</body>
</html>
<%
Set c01 = Nothing
ConnClose()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -