📄 outhistory.asp
字号:
keyColor = v1v2(key_,"",""," style = 'color:red;' ")
if not key_ = "" then keySQL = " and supplierid in(select uid from supplier where FullName like '%" & key__ & "%') or supplierName like '%" & key__ & "%' "
if not Rselsupplierid = 0 then
selsupplieridSQL = " and supplierid = " & Rselsupplierid & ""
supplierName = SelectZD("select FullName from supplier where uid = " & Rselsupplierid & "","")
else
selsupplieridSQL = ""
supplierName = ""
end if
%>
<div style = 'width:100%;text-align:left; border-left: 1px solid buttonhighlight; border-right: 1px solid buttonshadow;border-top: 1px solid buttonhighlight; border-bottom: 1px solid buttonshadow;padding:1px;padding-left:3px;'>
<form method='post' action="<%=SELVAR("FN","?")%>" name = 'formSearch'>
<input type = 'hidden' name = 'Searched' value = 'Y'/>
日期选择:
从
<input type = 'text' name="DateStar" onfocus="setday(this)" size="10" maxlength="10" readonly value = '<%=DateStar%>' style = 'border:1px solid #000;line-height:17px;height:20px;text-align:center;' <%=keyColor%>/>
到
<input type = 'text' name="DateEnd" onfocus="setday(this)" size="10" maxlength="10" readonly value = '<%=DateEnd%>' style = 'border:1px solid #000;line-height:17px;height:20px;text-align:center;' <%=keyColor%>/>
<%SQL = "select * from supplier where utypeid in(select utypeid from usertype where uTypeSelect in(select utypeid from usertype where identifyCode = 0 )) Order by uid desc"%>
客户名:<%=SearchSupplier(Rs,SQL,Rselsupplierid,"selsupplierid","width:auto;")%>
客户名关键字 <input <%=keyColor%> type="text" name="key" style = 'width:100px;' value = '<%=key_%>' style = 'border-left:1px solid #000;border-top:1px solid #000;border-bottom:1px solid #000;border-right:0px solid #000;line-height:17px;height:20px;'/><input type="button" value = '搜索' style = 'border:1px solid #000;line-height:17px;height:20px;' onclick="javascript:formSearch.submit();"/>
<span style = 'color:bule;'><%=Dateinfo%> 记录</span> <span class = 'onout' onclick = "javascript:this.blur();WindowOpen('<%=HOME_PATH%>thisDaySale.asp','thisDaysale',800,600,'Y');" onmouseover = "javascript:this.className='onover';" onmouseout = "javascript:this.className = 'onout';" style = 'cursor:default;width:100px;'/>查看当天记录</span>
</form>
</div>
<form method='post' action="" name = 'form' id = 'form'>
<input type = 'hidden' name = 'Options'/>
<input type = 'hidden' name = 'Execute'/>
<table style = 'height:auto;width:100%; border-left: 1px solid buttonhighlight; border-right: 1px solid buttonshadow;border-top: 1px solid buttonhighlight; border-bottom: 0px solid buttonshadow;' cellspacing = '2' cellpadding = '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:430px; left:0px; top:0px;z-index:1; overflow-y: auto;overflow-x:hidden;text-align:left; 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:95%;border-top-style:none;border-left-style:none;' borderColorLight='#424142' borderColorDark='#ffffff' border = '1' class = 'LinkA'>
<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>购后支付</td>
<td>总支付</td>
<td>欠款</td>
<td>录入者</td>
<td style = 'text-align:center;'>收款</td>
<td>所选择的操作员</td>
<td style = 'text-align:center;padding:0px;' id ='selbutton'></td>
</tr>
<%
LinkFile = SELVAR("FN","outhistory.asp")
LUrl = "DateStar=" & DateStar & "&DateEnd=" & DateEnd & "&key=" & key_ & "&selsupplierid=" & Rselsupplierid
SQL = "select * from sale where 1=1 " & DateSQL & keySQL & selsupplieridSQL & " Order by saleid Desc"
'Response.Write SQL
Rs.Open(SQL),Conn,1,1
if not Rs.eof then
thisPageSize = 10
PageWrite = PaginatinoGoogle(Rs,noteTotal,thisPageSize,LinkFile,LUrl,LArr)
for i_his = 1 to thisPageSize
if Rs.eof then exit for
saleid = Rs("saleid")
supplierid = isNumber(Rs("supplierid"),"int",0)
plNum = Rs("plNum")
saleNum = Rs("saleNum")
sale_supplierName = Rs("supplierName")
sale_Linkman = Rs("Linkman")
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)
elsePayment_ = SelectZD("select Sum(paymoney) from payment where paymenttoid = " & saleid & " and supplierid = " & supplierid & "",0)'别的支付
nownoPayment_ = (AmountshuilvALL-elsePayment_-ZJ-nowpayment) '现在欠款
nowinPayment_ = (nowpayment + ZJ + elsePayment_)'总的支付
outAmountALL = outAmountALL + Amount '总额(未含税)
outAmountshuilvALL = outAmountshuilvALL+AmountshuilvALL '总额(含税)
nowPaymentALL = nowPaymentALL + nowinPayment_ '总的支付
noPaymentALL = noPaymentALL + nownoPayment_ '最后欠款
%>
<tr style = 'padding-left:3px;background-color:#ffffff;cursor: default;' onclick = "javascript:clicked_(<%=i_his-1%>);" id = 'tr'>
<td style = 'text-align:center;padding:0px;height:18px;'>×</td>
<td style = 'text-align:center;padding:0px;'><%=saleid%></td>
<td class = 'tempF' id = 'td_'><%=saleNum%></td>
<td class = 'tempF'><%=thisDate%></td>
<td class = 'tempF'><%=Replace(SelectZD("select FullName from supplier where uid = " & supplierid & "",sale_supplierName),key_,"<span style = 'color:red;'>" & key_ & "</span>")%></td>
<td class = 'tempF'>¥<%=formatNumber(Amount,2)%></td>
<td class = 'tempF'><%=shuilvALL%>%</td>
<td class = 'tempF'>¥<%=AmountshuilvALL%></td>
<td class = 'tempF'>¥<%=formatNumber(ZJ,2)%></td>
<td class = 'tempF'>¥<%=formatNumber(nowpayment,2)%></td>
<td class = 'tempF'>¥<%=formatNumber(elsePayment_,2)%></td>
<td class = 'tempF'><a href = "javascript:SDD('<%=HOME_PATH%>sale/paymentinedList.asp?paymenttoid=<%=saleid
%>','paymentedto',600,350,'');">¥<%=formatNumber(nowinPayment_,2)%></a></td>
<td class = 'tempF' <%=v1v2(nownoPayment_,0,""," style = 'background-color:red;color:#ffffff;' ")%>>¥<%=formatNumber(nownoPayment_,2)%></td>
<td class = 'tempF'><%=SelectZD("select TrueName from admins where aid = " & intoaid & "","未知")%></td>
<td class = 'tempF' style = 'text-align:center;'><a href="javascript:SDD('paymentin.asp?paymenttoid=<%=saleid%>&uid=<%=supplierid%>','paymentin',380,380,'');">点击收款</a></td>
<td class = 'tempF'><%=SelectZD("select TrueName from admins where aid = " & selectaid & "","未知")%><input type = 'checkbox' name = 'box_' style = 'visibility:hidden;height:10px;' value = '<%=saleid%>'/></td>
<td class = 'tempF' id = 'selid_' style = 'text-align:center;'>
<input type = 'checkbox' style = 'border-style:none;widht:15px;height:15px;' name = 'selAnnounce' onClick = "javascript:checked_(<%=i_his-1%>);" onfocus="this.blur();" value = '<%=saleid%>'/>
</td>
</tr>
<%
Rs.movenext
next
%>
<script type = 'text/javascript'>
<!--
selbutton.innerHTML = "<input name = '' type = 'button' style = 'border-style:none;' onClick=\"this.value=sel(this.form.selAnnounce,'反选','全选',selid_,'clicked');\" value = '全选' onfocus=\"this.blur();\"/>"
//-->
</script>
<%else%>
<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;'>0</td>
<td class = 'tempF'></td>
<td class = 'tempF'> </td>
<td class = 'tempF'> </td>
<td class = 'tempF'> </td>
<td class = 'tempF'> </td>
<td class = 'tempF'> </td>
<td class = 'tempF'> </td>
<td class = 'tempF'> </td>
<td class = 'tempF'> </td>
<td class = 'tempF'> </td>
<td class = 'tempF'> </td>
<td class = 'tempF'> </td>
<td class = 'tempF'> </td>
<td class = 'tempF'> <input type = 'checkbox' name = 'box_' style = 'visibility:hidden;height:10px;' value = ''/><input type = 'checkbox' name = 'selAnnounce' style = 'visibility:hidden;height:10px;' value = ''/></td>
<td class = 'tempF'> </td>
</tr>
<script type = 'text/javascript'>
<!--
selbutton.innerHTML = "<input name = '' type = 'button' style = 'border-style:none;' value = '全选' onfocus=\"this.blur();\"/>"
//-->
</script>
<%
end if
Rs.Close
if trim(Request.Form("Searched")) = "Y" then Response.Redirect(LinkFile & "?" & LUrl)
%>
</table>
</div></td>
</tr>
</table>
<div style = 'text-align:center;padding:5px;' class ='LinkA'><%=PageWrite%></div>
</form>
<%
Options = trim(Request.Form("Options"))
if Options = "delTrue" then
Set c01 = new CL01
selAnnounceList_ = c01.splitList(trim(Request.Form("Execute")),",",0)
SQLA = "delete from salelist where saleid in(" & selAnnounceList_ & ")"
Rs.Open("select * from salelist where saleid in(" & selAnnounceList_ & ")"),Conn,1,1
if not Rs.eof then
for iu = 1 to Rs.RecordCount
deloutHow = Rs("outHow") '该记录原来销售的个数
stockid = Rs("stockid")
oldoutHowed = SelectZD("select Sum(outhowed) from stock where stockid = " & stockid & "",0)
Conn.Execute("update stock set outhowed = (" & oldoutHowed - deloutHow & ") where stockid = " & stockid & "")
oldoutHowed = 0
Rs.movenext
Next
else
end if
Rs.Close
SQLB = "delete from sale where saleid in(" & selAnnounceList_ & ")"
SQLC = "delete from payment where paymenttoid in(" & selAnnounceList_ & ") and inorout = 1"
SQLD = "delete from incfinance where paymentid in(select paymentid from payment where paymenttoid in(" & selAnnounceList_ & "))"
Conn.Execute(SQLD)'删除财务相关记录
Conn.Execute(SQLC)'删除后来支付表相关
Conn.Execute(SQLA)
Conn.Execute(SQLB)
Response.Write viewinfo("divLoca","正在执行删除操作.请稍候…","")
Response.Write viewinfo("LocaTimeself","",SELVAR("FN","outhistory.asp"))
Set c01 = Nothing
end if
%>
<fieldset style = 'width:99%;padding:8px;'>
<legend>相关信息 - 日期:<%=Dateinfo%> - 客户名关键字:<span style = 'color:blue;'>[<%=v1v2(key_ & supplierName,"","全部",key_ & supplierName)%>]</span> <input type = 'button' onclick = "javascript:WindowOpen('print.asp?<%=LUrl%>','print','500','500','Y');" value = '打印以上记录'/></legend>
<table style = 'width:100%;'>
<tr style = 'text-align:center;'>
<td style = 'width:33%;'>销售总额(含税价):¥<%=formatNumber(outAmountshuilvALL,2)%></td>
<td style = 'width:34%;'>已付总额(包含折减):¥<%=formatNumber(nowPaymentALL,2)%></td>
<td style = 'width:33%;'>欠款总额:¥<%=formatNumber(noPaymentALL,2)%></td>
</tr>
</table>
</fieldset>
</div>
<%
ConnClose()
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -