Untitled
unknown
plain_text
a year ago
13 kB
6
Indexable
<%@ page import="java.sql.*,javax.sql.*,java.text.*,com.dcx.dealerconnect.log.*,com.dcx.dealerconnect.config.*,com.dcx.service.writeup.markettransfer.servlet.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<%@ page
language="java"
contentType="text/html; charset=ISO-8859-1"
%>
<%
String appName = "dealerconnect.service.markettransfer";
LogManager appLogger = LogManager.getInstance(appName);
appLogger.debug("Starting the JSP--");
VehicleDTO VDTO = (VehicleDTO) request.getAttribute("VDTO");
VehicleDTO NEWVDTO = (VehicleDTO) request.getAttribute("NEWVDTO");
String vin = (String) request.getAttribute("vin");
if(vin == null){vin = "";}
String odom = (String) request.getAttribute("odom");
if(odom == null){odom = "";}
String odomtype = (String) request.getAttribute("odomtype");
if(odomtype == null){odomtype = "";}
String transfer = (String) request.getAttribute("transfer");
if(transfer == null){transfer = "";}
String printPDF = (String) request.getAttribute("printPDF");
if(printPDF == null){printPDF = "";}
String data = "";
if(VDTO != null){
data = "vin="+VDTO.getI_VIN()+"&odom="+odom+"&year="+VDTO.getI_VIN_MOD_YR()+"&desc="+VDTO.getX_VHCL_MAKE().trim()+" " +VDTO.getX_VHCL_TYP()
+"&mktOld="+VDTO.getC_MKT_VHCL_RGSTR()
+"&WCCOld="+VDTO.getC_CURR_WCC()
+"&odomOld="+VDTO.getQ_MILG_REPTD_LAST()
+"&odomtypeOld="+VDTO.getC_ODOM_TYP()
+"&mktNew="+NEWVDTO.getC_MKT_VHCL_RGSTR()
+"&WCCNew="+NEWVDTO.getC_CURR_WCC()
+"&odomNew="+NEWVDTO.getQ_MILG_REPTD_LAST()
+"&odomtypeNew="+NEWVDTO.getC_ODOM_TYP();
}
appLogger.debug(" data=" + data +" vin="+vin +" odom="+odom +" odomtype="+odomtype +" transfer="+transfer +" printPDF="+printPDF);
%>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="IBM WebSphere Studio">
<META http-equiv="Content-Style-Type" content="text/css">
<!--
<LINK rel="stylesheet" href="DealerConnectStyle.css" type="text/css">
-->
<LINK REL="stylesheet" HREF="/portal/resources/DealerConnectStyle.css" TYPE="text/css">
<SCRIPT LANGUAGE="JavaScript" SRC="/portal/resources/ComponentFunctions.js"></SCRIPT>
<TITLE>MarketTransfer.jsp</TITLE>
<script language="Javascript">
function searchVIN() {
if(document.vinFrm.vin.value.length != 8 && document.vinFrm.vin.value.length != 17)
{
alert("Please enter the last 8 or the whole 17 VIN number");
document.vinFrm.vin.focus();
return false;
}
var odom = document.vinFrm.odom.value;
if( parseInt(odom) <0 )
{
alert("Please enter the current odometer reading");
document.vinFrm.odom.focus();
return false;
}
if( document.vinFrm.odom.value=="" )
{
alert("Current Odometer Reading is required");
document.vinFrm.odom.focus();
return false;
}
if( isNaN(parseInt(odom)) || parseInt(odom) != odom)
{
alert("Odometer must be an integer number");
document.vinFrm.odom.focus();
return false;
}
document.vinFrm.odom.value = parseInt(odom);
document.vinFrm.submit();
}
function printpreview(){
var uri = "/service/writeup/markettransfer/MarketTransfer?printPDF=Y&<%=data%>";
// uri = escape(uri);
// window.open(uri,"PrintPreview","location=yes,toolbar=yes,menubar=yes,status=no,scrollbars=yes,resizable=yes,top=35,left=35,width=900,height=675").focus();
printPreviewWaiting(uri);
}
</script>
</script>
</HEAD>
<BODY><BR>
<CENTER><B><FONT class=mainHeadline>Market Coverage Change</FONT></B></CENTER>
<%
String errorMessage = (String) request.getAttribute("errorMessage");
String warningMessage = (String) request.getAttribute("warningMessage");
appLogger.debug("errorMessage=" + errorMessage +" warningMessage=" + warningMessage);
if(errorMessage != null)
{
out.println("<center><font class='errorMsgText'>We are unable to process your request at this time. An unexpected error has occurred. Please try again!</font></center>");
appLogger.error("Print errorMessage in the jsp = "+errorMessage);
}
else
{
out.println("<center><font class='errorMsgText'> </font></center>");
}
%>
<div align="center">
<%
if(!"Y".equals(printPDF))
{
%>
<form action='MarketTransfer' method="GET" name = "vinFrm" >
<font class=bodyText>Enter full VIN or last eight of VIN and current odometer reading</font>
<table cellpadding=1 cellspacing=0 border=0>
<tr>
<td height=5></td>
<td></td>
</tr>
<tr>
<td nowrap class="formLabel" align="RIGHT">VIN:<font color=red>*</font> <TD>
<TD><input type=text name=vin size=20 maxlength=17 value=''> </td>
<TD>
</TD>
</tr>
<tr>
<td nowrap class="formLabel" align="RIGHT">Current Odometer Reading:<font color=red>*</font> <TD>
<TD><input type=text name=odom size=7 maxlength=7 value=''>
<input type=radio name=odomtype checked value="M">Miles
<input type=radio name=odomtype value="K">Kilometers
</TD>
<TD> </TD>
</tr>
<tr>
<td height=5></td>
<td></td>
</tr>
<tr>
<td colspan="4" align="CENTER">
<script language="JavaScript">
document.write(getReqFieldLegend());
</script>
</td>
</tr>
<tr>
<td height=5></td>
<td></td>
</tr>
<tr>
<td colspan="4" align="CENTER">
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td class=buttonSpace> </td>
<td class=buttonRegHead> </td>
<td class=buttonRegBody align="center"><a class=buttonLabel
href="javascript:void(0);" onClick="searchVIN(); return false;">Search</a></td>
<td class=buttonRegTail> </td>
<td class=buttonSpace> </td>
<td class=buttonRegHead> </td>
<td class=buttonRegBody align="center"><a class=buttonLabel
href="javascript:document.vinFrm.reset();">Clear</a></td>
<td class=buttonRegTail> </td>
</tr>
</table>
</td>
</TR>
</table>
</form>
<%
}
if(!"".equals(warningMessage) && warningMessage != null)
{
out.println("<HR><table border='0' width='100%'><tr><td class='errorMsgText' align = 'center'>Vehicle Coverage Change Denied"+warningMessage+".</td></tr></table>");
appLogger.debug("servlet OK, print warningMessage in the jsp = "+warningMessage);
}
else if(errorMessage == null && ("".equals(warningMessage) || warningMessage == null) && VDTO != null){
// transfer page
if(!"Y".equals(transfer))
{
%>
<HR><BR><BR><BR>
<table class=table cellspacing="0" cellpadding="3" border="1">
<TR>
<TD align="right"><font class="formLabel">VIN </TD>
<TD colspan = 2 width="300" align="center" class="bodyText"><%=VDTO.getI_VIN()%></TD>
</TR>
<TR>
<TD align="right"><font class="formLabel">Year/Model </TD>
<TD colspan = 2 width="300" align="center" class="bodyText"><%=VDTO.getI_VIN_MOD_YR()%> <%=VDTO.getX_VHCL_MAKE()%> <%=VDTO.getX_VHCL_TYP()%></TD>
</TR>
<TR>
<TD width="150" align="center" class="tableColumnHeader"> </TD>
<TD width="150" align="center" class="tableColumnHeader">Original</TD>
<TD width="150" align="center" class="tableColumnHeader">New</TD>
</TR>
<TR>
<TD align="right"><font class="formLabel"> Market Registered </TD>
<TD align="center"><font class="bodyText">
<%
if("C".equals(VDTO.getC_MKT_VHCL_RGSTR().toUpperCase()) ) out.println("C - Canada");
if("I".equals(VDTO.getC_MKT_VHCL_RGSTR().toUpperCase()) ) out.println("I - International");
if("M".equals(VDTO.getC_MKT_VHCL_RGSTR().toUpperCase()) ) out.println("M - Mexico");
if("U".equals(VDTO.getC_MKT_VHCL_RGSTR().toUpperCase()) ) out.println("U - US");
%>
</TD>
<TD align="center"><font class="bodyText"> </TD>
</TR>
<TR>
<TD align="right"><font class="formLabel"> Warranty
Coverage Code </TD>
<TD align="center"><font class="bodyText"><%=VDTO.getC_CURR_WCC()%></TD>
<TD align="center"><font class="bodyText"> </TD>
</TR>
<TR>
<TD align="right"><font class="formLabel">Odometer Reading </TD>
<TD align="center"><font class="bodyText"><%=VDTO.getQ_MILG_REPTD_LAST()%></TD>
<TD align="center"><font class="bodyText"> </TD>
</TR>
<TR>
<TD align="right"><font class="formLabel">Odometer Type </TD>
<TD align="center"><font class="bodyText">
<%
if("K".equals(VDTO.getC_ODOM_TYP().toUpperCase()) ) out.println("K - Kilometers");
if("M".equals(VDTO.getC_ODOM_TYP().toUpperCase()) ) out.println("M - Miles");
%>
</TD>
<TD align="center"><font class="bodyText"> </TD>
</TR>
</TABLE>
<BR>
<font class="formLabel">This vehicle is eligible for market coverage change.
<BR>Do you want to change the market coverage?</font><BR><BR>
<TABLE cellpadding=0 cellspacing=0>
<TR>
<td class=buttonSpace> </td>
<td class=buttonRegHead> </td>
<td class=buttonRegBody align="center"><a class=buttonLabel
href="javascript:void(0);" onClick="document.tranYESFrm.submit(); return false;">Yes</a></td>
<td class=buttonRegTail> </td>
<td class=buttonSpace> </td>
<td class=buttonRegHead> </td>
<td class=buttonRegBody align="center"><a class=buttonLabel
href="javascript:void(0);" onClick="document.tranNOFrm.submit(); return false;">No</a></td>
<td class=buttonRegTail> </td>
</TR>
</TABLE>
<form action='MarketTransfer' method="GET" name = "tranYESFrm" >
<input type=hidden name=vin value='<%=vin%>'>
<input type=hidden name=odom value='<%=odom%>'>
<input type=hidden name=odomtype value="<%=odomtype%>">
<input type=hidden name=transfer value="Y">
</form>
<form action='MarketTransfer' method="GET" name = "tranNOFrm" >
</form>
<%
}
// print preview page
if("Y".equals(transfer))
{
%>
<HR>
<BR>
<font class="okStatusText">The market coverage for this vehicle has been changed.
<BR><BR>
<table class=table cellspacing="0" cellpadding="3" border="1">
<TR>
<TD align="right"><font class="formLabel">VIN </TD>
<TD colspan = 2 width="300" align="center" class="bodyText"><%=VDTO.getI_VIN()%></TD>
</TR>
<TR>
<TD align="right"><font class="formLabel">Year/Model </TD>
<TD colspan = 2 width="300" align="center" class="bodyText"><%=VDTO.getI_VIN_MOD_YR()%> <%=VDTO.getX_VHCL_MAKE()%> <%=VDTO.getX_VHCL_TYP()%></TD>
</TR>
<TR>
<TD width="150" align="center" class="tableColumnHeader"> </TD>
<TD width="150" align="center" class="tableColumnHeader">Original</TD>
<TD width="150" align="center" class="tableColumnHeader">New</TD>
</TR>
<TR>
<TD align="right"><font class="formLabel">Market Registered </TD>
<TD align="center"><font class="bodyText">
<%
if("C".equals(VDTO.getC_MKT_VHCL_RGSTR().toUpperCase()) ) out.println("C - Canada");
if("I".equals(VDTO.getC_MKT_VHCL_RGSTR().toUpperCase()) ) out.println("I - International");
if("M".equals(VDTO.getC_MKT_VHCL_RGSTR().toUpperCase()) ) out.println("M - Mexico");
if("U".equals(VDTO.getC_MKT_VHCL_RGSTR().toUpperCase()) ) out.println("U - US");
%>
</TD>
<TD align="center"><font class="bodyText">
<%
if("C".equals(NEWVDTO.getC_MKT_VHCL_RGSTR().toUpperCase()) ) out.println("C - Canada");
if("I".equals(NEWVDTO.getC_MKT_VHCL_RGSTR().toUpperCase()) ) out.println("I - International");
if("M".equals(NEWVDTO.getC_MKT_VHCL_RGSTR().toUpperCase()) ) out.println("M - Mexico");
if("U".equals(NEWVDTO.getC_MKT_VHCL_RGSTR().toUpperCase()) ) out.println("U - US");
%>
</TD>
</TR>
<TR>
<TD align="right"><font class="formLabel"> Warranty
Coverage Code </TD>
<TD align="center"><font class="bodyText"><%=VDTO.getC_CURR_WCC()%></TD>
<TD align="center"><font class="bodyText"><%=NEWVDTO.getC_CURR_WCC()%></TD>
</TR>
<TR>
<TD align="right"><font class="formLabel">Odometer Reading </TD>
<TD align="center"><font class="bodyText"><%=VDTO.getQ_MILG_REPTD_LAST()%></TD>
<TD align="center"><font class="bodyText"><%=NEWVDTO.getQ_MILG_REPTD_LAST()%></TD>
</TR>
<TR>
<TD align="right"><font class="formLabel">Odometer Type </TD>
<TD align="center"><font class="bodyText">
<%
if("K".equals(VDTO.getC_ODOM_TYP().toUpperCase()) ) out.println("K - Kilometers");
if("M".equals(VDTO.getC_ODOM_TYP().toUpperCase()) ) out.println("M - Miles");
%>
</TD>
<TD align="center"><font class="bodyText">
<%
if("K".equals(NEWVDTO.getC_ODOM_TYP().toUpperCase()) ) out.println("K - Kilometers");
if("M".equals(NEWVDTO.getC_ODOM_TYP().toUpperCase()) ) out.println("M - Miles");
%>
</TD>
</TR>
</TABLE>
<BR>
<TABLE cellpadding=0 cellspacing=0>
<TR>
<td class=buttonSpace> </td>
<td class=buttonRegHead> </td>
<td class=buttonRegBody align="center"><a class=buttonLabel
href="javascript:void(0);" onClick="printpreview(); return false;">Print Preview Acknowledgement</a></td>
<td class=buttonRegTail> </td>
</TR>
</TABLE>
<form action='MarketTransfer' method="GET" name = "ackFrm" >
<input type=hidden name=vin value='<%=vin%>'>
<input type=hidden name=odom value='<%=odom%>'>
<input type=hidden name=odomtype value="<%=odomtype%>">
<input type=hidden name=transfer value="">
</form>
<form action='MarketTransfer' method="GET" name = "tranNOFrm" >
</form>
<%
}
}
//appLogger.debug("End of JSP");
%>
</DIV>
</BODY>
</HTML>Editor is loading...
Leave a Comment