ModuleFieldRightMatrix.UPDATE_RIGHT, this.dataSource))
throw new AuthorizationFailedException("Opportunities - updateOpportunity");
CVDal cvdal = new CVDal(dataSource);
try {
ActivityVO aVO = oVO.getActivityVO();
float totalAmount = (float)0.0;
OpportunityVO oppDBVO = new OpportunityVO();
oppDBVO = getOpportunity(userId, oVO.getOpportunityID());
oVO = (OpportunityVO)CVUtility.replaceVO(oppDBVO, oVO, "Opportunities", userId,
this.dataSource);
// Update the Activity
cvdal.setSql("sale.opportunity.updateactivity");
cvdal.setInt(1, ActivityVO.AT_FORCASTED_SALES);
cvdal.setInt(2, oVO.getStatusID());
cvdal.setString(3, aVO.getTitle());
cvdal.setTimestamp(4, oVO.getEstimatedClose());
cvdal.setTimestamp(5, oVO.getActualclose());
cvdal.setString(6, aVO.getActivityDetails());
cvdal.setInt(7, aVO.getOwner());
cvdal.setInt(8, aVO.getActivityID());
cvdal.executeUpdate();
cvdal.setSqlQueryToNull();
// Update the Opportunity
cvdal.setSql("sale.opportunity.updateopportunity");