code: private KeyPersonCompensationDataType getCompensation(
  			KeyPersonDto keyPerson, int budgetPeriod) {
  
  		KeyPersonCompensationDataType compensation = KeyPersonCompensationDataType.Factory
  				.newInstance();
          ScaleTwoDecimal baseSalaryByPeriod;
  		if (keyPerson != null) {
  			compensation.setAcademicMonths(keyPerson.getAcademicMonths()
  					.bigDecimalValue());
  			compensation.setCalendarMonths(keyPerson.getCalendarMonths()
  					.bigDecimalValue());
  			compensation.setSummerMonths(keyPerson.getSummerMonths()
  					.bigDecimalValue());
  			compensation.setFringeBenefits(keyPerson.getFringe()
  					.bigDecimalValue());
  			compensation.setRequestedSalary(keyPerson.getRequestedSalary()
  					.bigDecimalValue());
  			compensation.setFundsRequested(keyPerson.getFundsRequested()
  					.bigDecimalValue());
  			if (pdDoc.getDevelopmentProposal().getBudgets() != null) {
                  baseSalaryByPeriod = s2sBudgetCalculatorService.getBaseSalaryByPeriod(pdDoc.getDevelopmentProposal().getBudgets().get(0)
                          .getBudgetId(), budgetPeriod, keyPerson);
                  if (baseSalaryByPeriod != null && baseSalaryByPeriod.isGreaterThan(ScaleTwoDecimal.ZERO)) {
                      compensation.setBaseSalary(baseSalaryByPeriod.bigDecimalValue());
                  }
                  else {
                      if (keyPerson.getBaseSalary() != null) {
                          compensation.setBaseSalary(keyPerson.getBaseSalary().bigDecimalValue());
                      }
                  }
              }
              else {
                  compensation.setBaseSalary(keyPerson.getBaseSalary().bigDecimalValue());
              }			
  		}
  		return compensation;
  	}
docs: This method gets KeyPersonCompensationDataType informations such as
  AcademicMonths,CalendarMonths,FringeBenefits
  SummerMonths,RequestedSalary,FundsRequested and BaseSalary based on
  KeyPersonInfo for the keyPerson.
  
  @param keyPerson
  (KeyPersonInfo) key person entry.
  @return KeyPersonCompensationDataType details corresponding to the
  KeyPersonInfo object.