📄 mark.jsp
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ include file="/IncludeBegin.jsp" %>
<%@ page import="com.hexiesoft.are.sql.ASResultSet" %>
<%@ page import="com.hexiesoft.utils.Consts" %>
<%@ page import="org.apache.poi.hssf.usermodel.HSSFCell" %>
<%@ page import="org.apache.poi.hssf.usermodel.HSSFRow" %>
<%@ page import="org.apache.poi.hssf.usermodel.HSSFSheet" %>
<%@ page import="org.apache.poi.hssf.usermodel.HSSFWorkbook" %>
<%@ page import="com.hexiesoft.utils.StringUtils" %>
<%
String sBlno = DataConvert.toRealString(iPostChange, CurPage.getParameter("blno"));
String lable1 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_1");
String lable2 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_2");
String lable3 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_3");
String lable4 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_4");
String lable5 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_5");
String lable6 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_6");
String lable7 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_7");
String lable8 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_8");
String lable9 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_9");
String lable10 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_10");
String lable11 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_11");
String lable12 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_12");
String lable13 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_13");
String lable14 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_14");
String lable15 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_15");
String lable16 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_16");
String lable17 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_17");
String lable18 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_18");
String lable19 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_19");
String lable20 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_20");
String lable21 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_21");
String lable22 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_22");
String lable23 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_23");
String lable24 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_24");
String lable25 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_25");
String lable26 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_26");
String lable27 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_27");
String lable28 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_28");
String lable29 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_29");
String lable30 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_30");
String lable31 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("LABEL_31");
String title = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("TITLE");
String confirm1 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("CONFIRM_1");
String confirm2 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("CONFIRM_2");
String confirm3 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("CONFIRM_3");
String alert1 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("ALERT_1");
String alert2 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("ALERT_2");
String alert3 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("ALERT_3");
String alert4 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("ALERT_4");
String alert5 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("ALERT_5");
String alert6 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("ALERT_6");
String alert7 = (String) Configure.getConfigure(sIe_Language, "MarkAgencyInvoices").get("ALERT_7");
%>
<%
ASResultSet invRs;
ASResultSet shipRs;
ASResultSet cusRs;
ASResultSet agencyRs;
String sAccount = "";
String sSubacct = "";
String sql = "select * from invoice where blno = '" + sBlno + "'";
invRs = Sqlca.getASResultSet(sql);
invRs.first();
sql = "select * from shipment where blno = '" + sBlno + "'";
shipRs = Sqlca.getASResultSet(sql);
shipRs.first();
sAccount = invRs.getString("account");
sSubacct = invRs.getString("subacct");
sql = "select * from customer where account='" + sAccount + "' and subacct='" + sSubacct + "'";
cusRs = Sqlca.getASResultSet(sql);
cusRs.first();
if (cusRs.getString("agency") == null || Integer.parseInt(cusRs.getString("agency")) < 10) {
%>
<script type="text/javascript">
alert('<%=alert4%>' + '<%=cusRs.getString("name")%>' + '<%=alert5%>');
OpenPage('/Blank.jsp?TextToShow=blank', 'right', '');
self.close();
</script>
<%
}
sql = "select * from agency where salesman='" + cusRs.getString("agency") + "'";
agencyRs = Sqlca.getASResultSet(sql);
agencyRs.first();
System.out.println("hahaha1");
String other = "";
if (invRs.getFloat("otherfees") >= 0) {
other = Float.toString(invRs.getFloat("otherfees"));
} else {
other = Float.toString(invRs.getFloat("otherfees") * (-1)) + "CR";
}
System.out.println("hahaha2");
String payrecord = "";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
if (invRs.getString("paydate") == null || invRs.getString("paydate").length() < 10) {
payrecord = sdf.format(new java.util.Date());
System.out.println("hahaha3");
} else {
payrecord = invRs.getString("paydate").substring(0, 10);
}
%>
<script language="javascript" src="<%=sResourcesPath%>/keyevent.js"></script>
<script language="javascript">
function toDate(DateString)
{
var OneMonth = DateString.substring(5, DateString.lastIndexOf("-"));
var OneDay = DateString.substring(DateString.length, DateString.lastIndexOf("-") + 1);
var OneYear = DateString.substring(0, DateString.indexOf("-"));
return Date.parse(OneMonth + "/" + OneDay + "/" + OneYear);
}
function check()
{
var payrecord = document.all.payrecord.value;
var blno = '<%=sBlno%>';
var agentblno=null ;
var today = new Date();
var today2 = new Date();
var timelong = today2.getTime();
today2.setTime(timelong - 60 * 24 * 3600 * 60);
var agen = '<%=cusRs.getString("agency")%>';
if (agen == '50') {
agentblno = document.all.agentblno.value;
if (agentblno.length <= 0) {
alert('<%=alert7%>');
document.all.agentblno.focus();
return;
}
}
if (payrecord.length <= 0) {
if (!(confirm('<%=confirm2%>'))) {
document.all.payrecord.focus();
return;
}
}
if (toDate(payrecord) > today) {
alert('<%=alert6%>');
document.all.payrecord.focus();
return;
}
if (toDate(payrecord) < today2) {
if (!confirm('<%=confirm3%>')) {
document.all.payrecord.focus();
return;
}
}
OpenComp("MarkAgencyInvoices", "/Billing/MarkAgencyInvoices/DoMark.jsp", "payrecord=" + payrecord + "&agentblno=" + agentblno + "&blno=" + blno + "&rand=" + randomNumber(), "right", "");
}
</script>
<body bgcolor="#DCDCDC">
<table table border="1" width=100% align="center" bordercolor='#999999' bordercolordark='#FFFFFF'>
<tr>
<td width="20%"><%=lable5%>
</td>
<td width="14%"><%=sBlno%>
</td>
<td width="18%"> </td>
<td width="11%"> </td>
<td width="29%"> </td>
<td width="6%"> </td>
</tr>
<tr>
<td><%=lable6%>
</td>
<td><%=sAccount + "-" + sSubacct%>
</td>
<td> </td>
<td> </td>
<td><%=lable7%>
</td>
<td><%=invRs.getString("currency")%>
</td>
</tr>
<tr>
<td><%=lable8%>
</td>
<td><%=agencyRs.getString("name")%>
</td>
<td> </td>
<td> </td>
<td><%=lable9%>
</td>
<td><%=shipRs.getString("shipdt").substring(0, 10)%>
</td>
</tr>
<tr>
<td><%=lable10%>
</td>
<td><%=invRs.getString("broker")%>
</td>
<td> </td>
<td> </td>
<td><%=lable11%>
</td>
<td><%=cusRs.getString("country")%>
</td>
</tr>
<tr>
<td><%=lable12%>
</td>
<td><%=invRs.getString("carrier")%>
</td>
<td> </td>
<td> </td>
<td><%=lable13%>
</td>
<td><%=cusRs.getString("pricelist")%>
</td>
</tr>
<tr>
<td><%=lable14%>
</td>
<td><%=invRs.getString("name")%>
</td>
<td> </td>
<td> </td>
<td><%=lable15%>
</td>
<td><%=invRs.getString("invdate")%>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td><%=lable16%>
</td>
<td><%=invRs.getFloat("gross")%><%=(shipRs.getString("islbs").equals("1")) ? "lbs" : "kgs"%>
</td>
<td><%=lable17%>
</td>
<td><%=invRs.getFloat("net")%><%=(shipRs.getString("islbs").equals("1")) ? "lbs" : "kgs"%>
</td>
<td><%=lable18%>
</td>
<td><%=invRs.getFloat("invextend")%>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td><%=lable19%>
</td>
<td><%=invRs.getFloat("prepaid")%>
</td>
</tr>
<tr>
<td><%=lable20%>
</td>
<td><%=invRs.getFloat("frins")%>
</td>
<td> </td>
<td> </td>
<td><%=lable21%>
</td>
<td><%=invRs.getFloat("collect")%>
</td>
</tr>
<tr>
<td><%=lable22%>
</td>
<td><%=invRs.getFloat("insurance")%>
</td>
<td><%=lable23%>
</td>
<td><%=invRs.getFloat("declarins")%>
</td>
<td><%=lable24%>
</td>
<td><%=other%>
</td>
</tr>
<tr>
<td><%=lable25%>
</td>
<td><%=invRs.getFloat("brokerage")%>
</td>
<td> </td>
<td> </td>
<td><%=lable26%>
</td>
<td><%=invRs.getFloat("freight")%>
</td>
</tr>
<tr>
<td><%=lable27%>
</td>
<td><%=invRs.getFloat("duty")%>
</td>
<td> </td>
<td> </td>
<td><%=lable28%>
</td>
<td><%=invRs.getFloat("subtot")%>
</td>
</tr>
<tr>
<td> </td>
<td><%=invRs.getFloat("frins") + invRs.getFloat("insurance") + invRs.getFloat("brokerage") + invRs.getFloat("duty")%>
</td>
<td> </td>
<td> </td>
<td><%=lable29%>
</td>
<td><%=invRs.getFloat("invgst")%>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td><%=lable30%>
</td>
<td><%=invRs.getFloat("invamt")%>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td><%=lable31%>
</td>
<td><%=invRs.getFloat("declared")%>
</td>
</tr>
<tr>
<td><%=lable3%>
</td>
<TD bgcolor="#F0F1DE"><INPUT TYPE="text" NAME="payrecord" size="10" maxlength="10" value='<%=payrecord%>'
onKeydown="DateInput()"></TD>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<%
if (cusRs.getString("agency").equals("50")) {
%>
<tr>
<td><%=lable4%>
</td>
<TD bgcolor="#F0F1DE"><INPUT TYPE="text" NAME="agentblno" size="8" maxlength="8" onKeydown="NumberInput()"></TD>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<%
}
%>
</table>
<input type="button" name="next"
value="<%=(String)Configure.getConfigure(sIe_Language,"Common").get("SUBMIT")%>"
onClick="javascript:check()"
style="font-size:9pt;padding-top:3;padding-left:5;padding-right:5;background-image:url(../../Resources/functionbg.gif); border: #DCDCDC; border-style: outset; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px"
border='1'>
<input type="button" name="Cancel"
value="<%=(String)Configure.getConfigure(sIe_Language,"Common").get("CANCEL")%>"
onClick="javascript:OpenPage('/Blank.jsp?TextToShow=', 'right','');"
style="font-size:9pt;padding-top:3;padding-left:5;padding-right:5;background-image:url(../../Resources/functionbg.gif); border: #DCDCDC; border-style: outset; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px"
border='1'>
</body>
<%@ include file="/IncludeEnd.jsp" %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -