}
session.setAttribute("rowID", opportunityID);
OpportunityVO oVO = remote.getOpportunity(individualID, Integer.parseInt(opportunityID));
oForm.setOpportunityid(new Integer(oVO.getOpportunityID()).toString());
request.setAttribute("recordID", new Integer(oVO.getOpportunityID()).toString());
request.setAttribute("recordId", String.valueOf(opportunityID));
request.setAttribute("recordName", java.net.URLEncoder.encode(oVO.getTitle(), "ISO-8859-1"));
oForm.setTitle(oVO.getTitle());
String description = oVO.getDescription();
oForm.setDescription(description);
oForm.setEntityid(new Integer(oVO.getEntityID()).toString());
oForm.setEntityname(oVO.getEntityname());
request.setAttribute("parentId", String.valueOf(oVO.getEntityID()));
request.setAttribute("parentName", java.net.URLEncoder.encode(oVO.getEntityname(), "ISO-8859-1"));
oForm.setIndividualid(new Integer(oVO.getIndividualID()).toString());
oForm.setIndividualname(oVO.getIndividualname());
oForm.setAcctmgrid(new Integer(oVO.getAcctMgr()).toString());
oForm.setAcctmgrname(oVO.getManagerName());
oForm.setAcctteamid(new Integer(oVO.getAcctTeam()).toString());
oForm.setAcctteamname(oVO.getTeamName());
oForm.setSourceid(new Integer(oVO.getSourceID()).toString());
oForm.setStageid(new Integer(oVO.getStageID()).toString());
oForm.setStatusid(new Integer(oVO.getStatusID()).toString());
oForm.setSourcename(oVO.getSource());
if (oVO.getEstimatedClose() != null) {
Timestamp date = (Timestamp)oVO.getEstimatedClose();
String strMonth = String.valueOf(date.getMonth() + 1);
String strDay = String.valueOf(date.getDate());
String strYear = String.valueOf(date.getYear() + 1900);
oForm.setEstimatedcloseday(strDay);
oForm.setEstimatedclosemonth(strMonth);
oForm.setEstimatedcloseyear(strYear);
}
if (oVO.getActualclose() != null) {
Timestamp date = (Timestamp)oVO.getActualclose();
String strMonth = String.valueOf(date.getMonth() + 1);
String strDay = String.valueOf(date.getDate());
String strYear = String.valueOf(date.getYear() + 1900);
oForm.setActualcloseday(strDay);
oForm.setActualclosemonth(strMonth);
oForm.setActualcloseyear(strYear);
}
oForm.setOpportunitytypeid((new Integer(oVO.getOpportunityTypeID())).toString());
oForm.setProbabilityid((new Integer(oVO.getProbability())).toString());
DecimalFormat currencyFormat = new DecimalFormat("###,###,##0.00");
String actualAmount = currencyFormat.format(oVO.getActualAmount());
oForm.setTotalamount(actualAmount);
String forecast = currencyFormat.format(oVO.getForecastedAmount());
oForm.setForecastedamount(forecast);
if (oVO.getCreateddate() != null) {
Timestamp date = (Timestamp)oVO.getCreateddate();
String strMonth = String.valueOf(date.getMonth() + 1);
String strDay = String.valueOf(date.getDate());
String strYear = String.valueOf(date.getYear() + 1900);
String strHours = String.valueOf(date.getHours());
String strMins = String.valueOf(date.getMinutes());
int hhmm[] = new int[2];
hhmm[0] = Integer.parseInt(strHours.trim());
hhmm[1] = Integer.parseInt(strMins.trim());
String strTime = CVUtility.convertTime24HrsFormatToStr(hhmm);
oForm.setCreateddate(strMonth + "/" + strDay + "/" + strYear + " - " + strTime + " ");
}
if (oVO.getModifieddate() != null) {
Timestamp date = (Timestamp)oVO.getModifieddate();
String strMonth = String.valueOf(date.getMonth() + 1);
String strDay = String.valueOf(date.getDate());
String strYear = String.valueOf(date.getYear() + 1900);
String strHours = String.valueOf(date.getHours());
String strMins = String.valueOf(date.getMinutes());
int hhmm[] = new int[2];
hhmm[0] = Integer.parseInt(strHours.trim());
hhmm[1] = Integer.parseInt(strMins.trim());
String strTime = CVUtility.convertTime24HrsFormatToStr(hhmm);
oForm.setModifieddate(strMonth + "/" + strDay + "/" + strYear + " - " + strTime + " ");
}
oForm.setCreatedbyname(oVO.getCreatedbyname());
oForm.setModifiedbyname(oVO.getModifiedbyname());
oForm.setActivityid(String.valueOf(oVO.getActivityID()));
ActivityVO activityVO = oVO.getActivityVO();
form = (ActionForm) oForm;
request.setAttribute(SaleConstantKeys.CURRENTTAB, SaleConstantKeys.DETAIL);
request.setAttribute(SaleConstantKeys.TYPEOFOPERATION, SaleConstantKeys.EDIT);
request.setAttribute(SaleConstantKeys.WINDOWID, newWindowId);
request.setAttribute("opportunityform", form);
request.setAttribute("hasproposal",new Boolean(oVO.getHasProposal()));
request.setAttribute("hasProposalInForcast",new Boolean(oVO.getHasProposalInForcast()));
if (request.getParameter("Duplicate") != null) {
if (request.getParameter("Duplicate").equals("true")) {
FORWARD_final = FORWARD_newOpportunity;
}else{