📄 existfinishedgoods.jsp
字号:
<%--
Created by IntelliJ IDEA.
User: lijun
Date: 2006-5-20
edit ruilei 2006-06-04
--%>
<%@ page contentType="text/html;charset=GBK" %>
<%@ include file="/IncludeBegin.jsp" %>
<%@ page import="com.hexiesoft.are.sql.ASResultSet" %>
<%@ page import="com.hexiesoft.are.util.DataConvert" %>
<%
float mtot = 0, mcant = 0, musat = 0, mseast = 0, mtotb = 0, mtotc = 0, mtotp = 0, mtotn = 0, mcanc = 0, mcanb = 0, mcanp = 0, mcann = 0, musac = 0, musan = 0, musab = 0, musap = 0, mseasb = 0, mseasc = 0, mseasp = 0, mseasn = 0;
double nKgs = 2.2046;
float f_net = 0;
String wname = "";
String invbin = DataConvert.toRealString(iPostChange, (String) CurPage.getParameter("Code")).toUpperCase();//DataConvert.toRealString(iPostChange,(String)request.getParameter("Code")).toUpperCase();
String sSelect = "select count(*) as findcount from whouse where wcode='" + invbin + "'";
ASResultSet rs;
String msg2 = "";
if (invbin.equals("HILL") || invbin.equals("FERG")) {
sSelect = "SELECT packnote.account, packnote.subacct, [DESC], net, islbs,country FROM packnote, customer where packnote.account=customer.account and packnote.subacct=customer.subacct and blno is null and plant = '" + invbin + "'";
} else {
sSelect = "select wname from whouse where wcode='" + invbin + "'";
rs = Sqlca.getASResultSet(sSelect);
if (rs.next()) {
wname = rs.getString("wname");
}
if (wname.equals("")) {
msg2 = (String) Configure.getConfigure(sIe_Language, "FinishedGoods").get("msg2");
}
sSelect = "SELECT packnote.account, packnote.subacct, [DESC], net, islbs,country FROM packnote, customer where packnote.account=customer.account and packnote.subacct=customer.subacct and finblno is null and packnote.ordertype = '" + invbin + "'";
}
rs = Sqlca.getASResultSet(sSelect);
while (rs.next()) {
//test+= rs.getString("country")+","+rs.getString("Net");
f_net = rs.getFloat("Net");
if (rs.getString("islbs").equals("0")) {
f_net = Math.round(f_net * nKgs);
}
if (rs.getString("country").equals("C")) {
if (rs.getString("DESC").substring(0, 1).equals("2")) {
mcanb += f_net;
mtotb += f_net;
} else if (rs.getString("DESC").substring(0, 1).equals("7")) {
mcann += f_net;
mtotn += f_net;
} else
if (rs.getString("DESC").substring(0, 1).equals("4") || rs.getString("DESC").substring(0, 1).equals("5")) {
mcanp += f_net;
mtotp += f_net;
} else
if (rs.getString("DESC").substring(0, 1).equals("1") || rs.getString("DESC").substring(0, 1).equals("C")) {
mcanc += f_net;
mtotc += f_net;
}
} else if (rs.getString("country").equals("U")) {
if (rs.getString("DESC").substring(0, 1).equals("2")) {
musab += f_net;
mtotb += f_net;
} else if (rs.getString("DESC").substring(0, 1).equals("7")) {
musan += f_net;
mtotn += f_net;
} else
if (rs.getString("DESC").substring(0, 1).equals("4") || rs.getString("DESC").substring(0, 1).equals("5")) {
musap += f_net;
mtotp += f_net;
} else
if (rs.getString("DESC").substring(0, 1).equals("1") || rs.getString("DESC").substring(0, 1).equals("C")) {
musac += f_net;
mtotc += f_net;
}
} else if (rs.getString("country").equals("O")) {
if (rs.getString("DESC").substring(0, 1).equals("2")) {
mseasb += f_net;
mtotb += f_net;
} else if (rs.getString("DESC").substring(0, 1).equals("7")) {
mseasn += f_net;
mtotn += f_net;
} else
if (rs.getString("DESC").substring(0, 1).equals("4") || rs.getString("DESC").substring(0, 1).equals("5")) {
mseasp += f_net;
mtotp += f_net;
} else
if (rs.getString("DESC").substring(0, 1).equals("1") || rs.getString("DESC").substring(0, 1).equals("C")) {
mseasc += f_net;
mtotc += f_net;
}
}
}
//&&累计
mtot = mtotc + mtotb + mtotp + mtotn; //&&s所有金属的重量累计
mcant = mcanc + mcanb + mcanp + mcann; //&& 加拿大客户各种金属的总重
musat = musac + musab + musap + musan; //&&美国客户各种金属的总重
mseast = mseasc + mseasb + mseasp + mseasn; //&&其他国家客户各种金属的总重
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript">
if ('<%=msg2%>'.length > 0) {
alert('<%=msg2%>');
}
</script>
</head>
<body bgcolor="#DCDCDC" >
<table width=100% align="center" >
<tr>
<td colspan="3" align="center"><%=(String) Configure.getConfigure(sIe_Language, "FinishedGoods").get("title")%></td>
</tr>
<tr>
<td align='right'><%=(String) Configure.getConfigure(sIe_Language, "FinishedGoods").get("subtitle")%></td>
<td align='right'> <%=invbin%></td>
<td align='right'><%=wname%></td>
</tr>
</table>
<table width=100% align="center">
<tr>
<td align="right">
</td>
<td align="right"><%=(String) Configure.getConfigure(sIe_Language, "FinishedGoods").get("Canada")%>
</td>
<td align="right"><%=(String) Configure.getConfigure(sIe_Language, "FinishedGoods").get("USA")%>
</td>
<td align="right"><%=(String) Configure.getConfigure(sIe_Language, "FinishedGoods").get("Overseas")%>
</td>
<td align="right"><%=(String) Configure.getConfigure(sIe_Language, "FinishedGoods").get("Total")%>
</td>
</tr>
<tr>
<td align="right"><%=(String) Configure.getConfigure(sIe_Language, "FinishedGoods").get("Phos")%>
</td>
<td >
<div align="right"><%=mcanp%></div>
</td>
<td >
<div align="right"><%=musap%></div>
</td>
<td >
<div align="right"><%=mseasp%></div>
</td>
<td >
<div align="right"><%=mtotp%></div>
</td>
</tr>
<tr>
<td >
<div align="right"><%=(String) Configure.getConfigure(sIe_Language, "FinishedGoods").get("Nickel")%></div>
</td>
<td >
<div align="right"><%=mcann%></div>
</td>
<td >
<div align="right"><%=musan%></div>
</td>
<td >
<div align="right"><%=mseasn%></div>
</td>
<td >
<div align="right"><%=mtotn%></div>
</td>
</tr>
<tr>
<td >
<div align="right"><%=(String) Configure.getConfigure(sIe_Language, "FinishedGoods").get("Brass")%></div>
</td>
<td >
<div align="right"><%=mcanb%></div>
</td>
<td >
<div align="right"><%=musab%></div>
</td>
<td >
<div align="right"><%=mseasb%></div>
</td>
<td >
<div align="right"><%=mtotb%></div>
</td>
</tr>
<tr>
<td >
<div align="right"><%=(String) Configure.getConfigure(sIe_Language, "FinishedGoods").get("Copper")%></div>
</td>
<td >
<div align="right"><%=mcanc%></div>
</td>
<td >
<div align="right"><%=musac%></div>
</td>
<td >
<div align="right"><%=mseasc%></div>
</td>
<td >
<div align="right"><%=mtotc%></div>
</td>
</tr>
<tr>
<td >
<div align="right"><%=(String) Configure.getConfigure(sIe_Language, "FinishedGoods").get("Total")%></div>
</td>
<td >
<div align="right"><%=mcant%></div>
</td>
<td >
<div align="right"><%=musat%></div>
</td>
<td >
<div align="right"><%=mseast%></div>
</td>
<td >
<div align="right"><%=mtot%></div>
</td>
</tr>
</table>
</body>
<%@ include file="/IncludeEnd.jsp" %>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -