📄 payment.asp
字号:
<option value=account <%if request("strfield")="account" then Response.Write "selected"%>>客户</option>
<option value=paymentno <%if request("strfield")="paymentno" then Response.Write "selected"%>>应收账编号</option>
<option value=ordernum <%if request("strfield")="ordernum" then Response.Write "selected"%>>合同号</option>
<option value=amount <%if request("strfield")="amount" then Response.Write "selected"%>>应收金额</option>
<option value=paymentdate <%if request("strfield")="paymentdate" then Response.Write "selected"%>>应收日期</option>
<option value=username <%if request("strfield")="username" then Response.Write "selected"%>>销售员</option>
</select></td>
<td width="15%"> <div id=strvalue1 <%if request("strfield")<>"username" or request("strfield")="" then response.write "style=display:block" else response.write "style=display:none" end if%>>
<input type="text" name="strvalue1" value="<%=request("strvalue")%>" size=16>
</div>
<div id=strvalue2 <%if request("strfield")="username" then response.write "style=display:block" else response.write "style=display:none" end if%>>
<select name="strvalue2" class="stedit">
<option value="">--请选择销售员--</option>
<%getgrouptype selecttablename,"username",request("strvalue")%>
</select>
</div></td>
<td width="56%"> <select name="complete" id="complete">
<option value="1">未结应收</option>
<option value="2" <%if request("complete")=2 then response.Write("selected")%>>过期未结</option>
<option value="3" <%if request("complete")=3 then response.Write("selected")%>>全部应收</option>
</select>
<input type=hidden name="strvalue" value="<%=request("strvalue")%>" >
<input name="image" type=image style="cursor:hand" src="../images/button_submit.gif" border=0>
<%
if CurPage<=1 then
Response.Write "<a href='payment.asp?EdateSearch="&request("EdateSearch")&"&FdateSearch="&request("FdateSearch")&"&turnpage=yes&orderby="&session("orderby")&"&complete="&request("complete")&"&orderbyfield="&request("orderbyfield")&"&strvalue="&request("strvalue")&"&strfield="&request("strfield")&"&CurPage=1'><img src='../images/button_start.gif' border=0></a> "
else
Response.Write "<a href='payment.asp?EdateSearch="&request("EdateSearch")&"&FdateSearch="&request("FdateSearch")&"&turnpage=yes&orderby="&session("orderby")&"&complete="&request("complete")&"&orderbyfield="&request("orderbyfield")&"&strvalue="&request("strvalue")&"&strfield="&request("strfield")&"&CurPage=1'><img src='../images/button_start.gif' border=0></a> "
Response.Write "<a href='payment.asp?EdateSearch="&request("EdateSearch")&"&FdateSearch="&request("FdateSearch")&"&turnpage=yes&orderby="&session("orderby")&"&complete="&request("complete")&"&orderbyfield="&request("orderbyfield")&"&strvalue="&request("strvalue")&"&strfield="&request("strfield")&"&CurPage="&CurPage-1&"'><img src='../images/button_backward.gif' border=0></a> "
end if
if CurPage>=RS.PageCount then
Response.Write "<a href='payment.asp?EdateSearch="&request("EdateSearch")&"&FdateSearch="&request("FdateSearch")&"&turnpage=yes&orderby="&session("orderby")&"&complete="&request("complete")&"&orderbyfield="&request("orderbyfield")&"&strvalue="&request("strvalue")&"&strfield="&request("strfield")&"&CurPage="&RS.PageCount&"'><img src='../images/button_end.gif' border=0></a>"
else
Response.Write "<a href='payment.asp?EdateSearch="&request("EdateSearch")&"&FdateSearch="&request("FdateSearch")&"&turnpage=yes&orderby="&session("orderby")&"&complete="&request("complete")&"&orderbyfield="&request("orderbyfield")&"&strvalue="&request("strvalue")&"&strfield="&request("strfield")&"&CurPage="&CurPage+1&"'><img src='../images/button_forward.gif' border=0></a> "
Response.Write "<a href='payment.asp?EdateSearch="&request("EdateSearch")&"&FdateSearch="&request("FdateSearch")&"&turnpage=yes&orderby="&session("orderby")&"&complete="&request("complete")&"&orderbyfield="&request("orderbyfield")&"&strvalue="&request("strvalue")&"&strfield="&request("strfield")&"&CurPage="&RS.PageCount&"'><img src='../images/button_end.gif' border=0></a>"
end if
%>
从
<input name=FdateSearch size=10 language=javascript id=dupdatetime value='<%=strFdate%>' readonly>
<% call AddImg("date")%>
<input type = hidden name=clicksource> <input type = hidden name=clickresult >
到
<input name=EdateSearch size=10 language=javascript id=dupdatetime2 value='<%=strEdate%>' readonly>
<% call AddImg("date2")%>
</td>
<td width=19%><div id=dateformat <%if request("strfield")="paymentdate" then response.write "style=display:block" else response.write "style=display:none" end if%>>日期格式提示:YYYY-MM-DD</div></td>
</tr>
<tr>
<td height="25" colspan=4><strong><font class=title>应收帐与应开票列表</font></strong>
<a href="javascript:opensubwin('resizable=no, scrollbars=no, left= 200, top=150, menubar=no, location=no, toolbar=no ,width=450, height=300','newpayment.asp');"><img src="../images/button_new.gif" border=0></a></td>
</tr>
<tr >
<td height="16" colspan="4" background="../images/title.gif"> </td>
</tr>
<tr>
<td height=4 colspan=4></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="DECFAD">
<tr bgcolor="efefef">
<td width="6%" height="22" align=center>操作</td>
<td width="10%" align=center><a href="payment.asp?CurPage=<%=CurPage%>&complete=<%=request("complete")%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=ordernum&orderby=<%=session("orderby")%>">合同号</a></td>
<td height=22 align=center><a href="payment.asp?CurPage=<%=CurPage%>&complete=<%=request("complete")%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=account&orderby=<%=session("orderby")%>">客户</a></td>
<td width="8%" height="22" align=center><a href="payment.asp?CurPage=<%=CurPage%>&complete=<%=request("complete")%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=deliveryno&orderby=<%=session("orderby")%>">发货单号</a></td>
<td width="8%" height="22" align=center><a href="payment.asp?CurPage=<%=CurPage%>&complete=<%=request("complete")%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=amount&orderby=<%=session("orderby")%>">应收金额</a></td>
<td width="8%" align=center><a href="payment.asp?CurPage=<%=CurPage%>&complete=<%=request("complete")%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=totalreceive&orderby=<%=session("orderby")%>">已收金额</a></td>
<td width="8%" align=center><a href="payment.asp?CurPage=<%=CurPage%>&complete=<%=request("complete")%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=invoiceamount&orderby=<%=session("orderby")%>">开票金额</a></td>
<td width="8%" align=center><a href="payment.asp?CurPage=<%=CurPage%>&complete=<%=request("complete")%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=totalinvoice&orderby=<%=session("orderby")%>">已开金额</a></td>
<td width="8%" height="22" align=center><a href="payment.asp?CurPage=<%=CurPage%>&complete=<%=request("complete")%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=paymentdate&orderby=<%=session("orderby")%>">应收日期</a></td>
<td width="8%" align=center><a href="payment.asp?CurPage=<%=CurPage%>&complete=<%=request("complete")%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=expiredate&orderby=<%=session("orderby")%>">过期日期</a></td>
<td width="6%" height="22" align=center><a href="payment.asp?CurPage=<%=CurPage%>&complete=<%=request("complete")%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=username&orderby=<%=session("orderby")%>">销售员</a></td>
</tr>
<%i=1:i=1:do while not rs.EOF and i<=session("pagesize")%>
<tr bgcolor="#FFFFFF">
<td height="22" align=center width="7%" nowrap><table>
<tr>
<td>
<%
' Add Payment Menu
'//////////////// Add Menu List Start /////////////////////////
AddPopupMenu1 true,true,false,false,false,false,false,false, _
"newpayment.asp?id=", _
"../delete.asp?amount="&rs("amount")&"&ordernum="&rs("ordernum")&"&account="&rs("account")&"&paymentid=",_
"",_
"",_
"",_
"",_
"",_
"menuPayment"&rs("paymentid")
'/////////////// Menu List End
%>
<img src="../images/edit.gif" border="0" id="Payment<%=rs("paymentid")%>" align=absMiddle height=16 width=16 onMouseOver="ShowMenu('Payment<%=rs("paymentid")%>','menuPayment<%=rs("paymentid")%>','<%=rs("paymentid")%>')" onMouseOut="HideMenu('menuPayment<%=rs("paymentid")%>')"></td>
<td align=left id="IMGtr1<%=i%>" style="display:block"><a href="javascript:showit('tr1<%=i%>',1)" title="查看发货明细"><img src="../images/button1.gif" border=0></a>
<td>
<td align=left id="IMG1tr1<%=i%>" style="display:none"><a href="javascript:showit('tr1<%=i%>',1)" title="隐藏发货明细"><img src="../images/button2.gif" border=0></a></td>
</tr>
</table></td>
<td align=center><a href="javascript:opensubwin3('../order/orderdetail.asp?orderid=<%=rs("orderid")%>','合同<%=rs("orderid")%>','toolbar=no,scrollbars=yes,location=no,status=no,menubar=no,width=600,height=400,top=150,left=160');"><%=rs("ordernum")%></a></td>
<td align=center><a href="javascript:opensubwin3('../account/accountdetail.asp?accountid=<%=rs("accountid")%>','客户<%=rs("accountid")%>','toolbar=no,scrollbars=yes,location=no,status=no,menubar=no,width=600,height=400,top=150,left=160');"><%=rs("account")%></a></td>
<td align=center><a href="javascript:opensubwin3('../order/deliverydetail.asp?deliveryid=<%=rs("deliveryid")%>','delivery<%=rs("deliveryid")%>','toolbar=no,scrollbars=yes,location=no,status=no,menubar=no,width=600,height=400,top=150,left=160');"><%=rs("deliveryno")%></a>
</td>
<td align=center>
<%if rs("paymenttype")="应收帐款" and csng(rs("amount"))<>csng(rs("deliveryamount")) then
response.write "<font color=red>"&formatnumber(rs("amount"),2)&"</font>"
else
response.write formatnumber(rs("amount"),2)
end if
%>
</td>
<td align=center>
<%if rs("totalreceive")<>"" then response.write formatnumber(rs("totalreceive"),2) else response.Write(0)%>
</td>
<td align=center>
<%if rs("paymenttype")="应收帐款" and csng(rs("invoiceamount"))<>csng(rs("deliveryamount")) then
response.write "<font color=red>"&formatnumber(rs("invoiceamount"),2)&"</font>"
else
response.write formatnumber(rs("invoiceamount"),2)
end if
%>
</td>
<td align=center>
<%if rs("totalinvoice")<>"" then response.write formatnumber(rs("totalinvoice"),2) else response.Write(0)%>
</td>
<td align=center><%=rs("paymentdate")%></td>
<td align=center>
<%
if date()>rs("expiredate") and ccur(rs("totalreceive"))<>ccur(rs("amount")) and rs("Collectionstatus")="未销" then
response.Write("<font color=red>"&rs("expiredate")&"</font>")
else
response.Write rs("expiredate")
end if
%>
</td>
<td align=center><%=rs("username")%></td>
</tr>
<tr bgcolor="#FFFFFF" border=0 id='tr1<%=i%>' style=display:none>
<td colspan=12>
<%
set rsdeliverline=conn.execute("select * from v_MaterialTransaction where (orderpaymentid="&rs("paymentid")&")")
%>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="ffffff">
<tr>
<td width="5%" height="22" align=center bgcolor="DEDFDE">序号</td>
<td width="15%" height="22" align=center bgcolor="DEDFDE">货号</td>
<td height="22" align=center bgcolor="DEDFDE">型号</td>
<td width="5%" height="22" align=center bgcolor="DEDFDE">数量</td>
<td width="8%" height="22" align=center bgcolor="DEDFDE">价格</td>
<td width="8%" height="22" align=center bgcolor="DEDFDE">平均成本</td>
<td width="8%" height="22" align=center bgcolor="DEDFDE">调准成本</td>
<td width="10%" height="22" align=center bgcolor="DEDFDE">发货金额</td>
<td width="10%" align=center bgcolor="DEDFDE">应收金额</td>
<td width="10%" height="22" align=center bgcolor="DEDFDE">开票金额</td>
<td width="8%" height="22" align=center bgcolor="DEDFDE">备注</td>
</tr>
<%j=1
do while not rsdeliverline.EOF
%>
<tr>
<td align=center bgcolor="efefef"><%=j%></td>
<td height=18 align=center bgcolor="efefef"><%=rsdeliverline("productcode")%></td>
<td align=center bgcolor="efefef"><%=rsdeliverline("model")%></td>
<td align=center bgcolor="efefef"><%=rsdeliverline("qty")%></td>
<td align=center bgcolor="efefef"><%=formatnumber(rsdeliverline("price"),2)%></td>
<td align=center bgcolor="efefef">
<%if objcheck.CheckUserFunction2("viewcost","read" ) then Response.Write formatnumber(rsdeliverline("cost"),2)%>
</td>
<td align=center bgcolor="efefef"><a href="javascript:opensubwin('resizable=no, scrollbars=no, left= 300, top=220, menubar=no, location=no, toolbar=no ,width=300, height=200','../tools/SetMaterialTransaction.asp?transactid=<%=rsdeliverline("transactid")%>&fieldname=adjustcost');" title="调准发货成本">
<%if objcheck.CheckUserFunction2("viewcost","read" ) then Response.Write formatnumber(rsdeliverline("adjustcost"),2)%>
</a></td>
<td align=center bgcolor="efefef"><%=formatnumber(csng(rsdeliverline("qty"))*csng(rsdeliverline("price")),2)%></td>
<td align=center bgcolor="efefef"><a href="javascript:opensubwin('resizable=no, scrollbars=no, left= 300, top=220, menubar=no, location=no, toolbar=no ,width=300, height=200','../tools/SetMaterialTransaction.asp?transactid=<%=rsdeliverline("transactid")%>&orderpaymentid=<%=rsdeliverline("orderpaymentid")%>&fieldname=receiveamount');" title="调准应收金额"><%=formatnumber(rsdeliverline("receiveamount"),2)%></a></td>
<td align=center bgcolor="efefef"><a href="javascript:opensubwin('resizable=no, scrollbars=no, left= 300, top=220, menubar=no, location=no, toolbar=no ,width=300, height=200','../tools/SetMaterialTransaction.asp?transactid=<%=rsdeliverline("transactid")%>&orderpaymentid=<%=rsdeliverline("orderpaymentid")%>&fieldname=invoiceamount');" title="调准开票金额"><%=formatnumber(rsdeliverline("invoiceamount"),2)%></a></td>
<td align=center bgcolor="efefef"><a href="javascript:opensubwin('resizable=no, scrollbars=no, left= 300, top=220, menubar=no, location=no, toolbar=no ,width=300, height=200','../tools/SetMaterialTransaction.asp?transactid=<%=rsdeliverline("transactid")%>&fieldname=description');" title="查看/修改备注"><%if rsdeliverline("description")<>"" then%><font color=red>备注</font><%else%>备注<%end if%></a></td>
</tr>
<%
j=j+1
rsdeliverline.MoveNext
loop
rsdeliverline.Close
set rsdeliverline=nothing
%>
</table>
<br></td>
</tr>
<%
i=i+1
rs.MoveNext
loop
totalamount=0
totalreceive=0
totalinvoice=0
totalinvoiced=0
expireamount=0
if i>1 then
rs.movefirst
do while not rs.eof
totalamount=ccur(totalamount)+ccur(rs("amount"))
totalreceive=ccur(totalreceive)+ccur(rs("totalreceive"))
totalinvoice=ccur(totalinvoice)+ccur(rs("invoiceamount"))
totalinvoiced=ccur(totalinvoiced)+ccur(rs("totalinvoice"))
if date()>rs("expiredate") and ccur(rs("totalreceive"))<ccur(rs("amount")) then
if ccur(rs("amount"))-ccur(rs("totalreceive"))>0 then
tempamount=ccur(rs("amount"))-ccur(rs("totalreceive"))
else
tempamount=0
end if
expireamount=ccur(expireamount)+ccur(tempamount)
end if
rs.movenext
loop
end if
%>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr height="50">
<td>第<%=CurPage%>页 / 共<%=RS.PageCount%>页 / 记录数:<%=Rs.RecordCount%>条
<br>
<br>
<font color="#CA7900">应收金额:
<%if totalamount<>"" then response.Write(formatnumber(totalamount,2)) else response.Write(0)%>
</font> <font color="#FF0000">过期金额:
<%if totalreceive<>"" then response.Write(formatnumber(expireamount,2)) else response.Write(0)%>
</font> <font color="#0000FF">已收金额:
<%if totalreceive<>"" then response.Write(formatnumber(totalreceive,2)) else response.Write(0)%>
</font> 开票金额:
<%if totalinvoice<>"" then response.Write(formatnumber(totalinvoice,2)) else response.Write(0)%>
已开金额:
<%if totalinvoiced<>"" then response.Write(formatnumber(totalinvoiced,2)) else response.Write(0)%>
</td>
</tr></table>
<%
rs.Close
set rs=nothing
conn.Close
set conn=nothing
set objcheck=nothing
%>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -