コード例 #1
0
  protected BudgetLineItem getPersonnelLineItem(
      BudgetPeriod budgetPeriod, Date startDate, Date endDate) {
    BudgetLineItem lineItem = new BudgetLineItemMock();
    lineItem.setBudgetCategory(createBudgetCategory("26", "Test", "E"));
    lineItem.setBudgetCategoryCode("26");
    lineItem.setCostElement("400350");
    lineItem.setLineItemCost(new ScaleTwoDecimal(10000.00));
    lineItem.setEndDate(endDate);
    lineItem.setStartDate(startDate);
    lineItem.setCostElementBO(getCostElementTravel());
    lineItem.setApplyInRateFlag(Boolean.TRUE);
    lineItem.setOnOffCampusFlag(Boolean.TRUE);
    lineItem.setBudgetPeriodBO(budgetPeriod);
    lineItem.setBudgetPeriod(1);
    lineItem.setBudgetLineItemId(5L);
    lineItem.setLineItemNumber(3);
    lineItem.setBudgetCategoryCode(PERSONNEL_CATEGORY_CODE);
    final BudgetCategory budgetCategory = new BudgetCategory();
    budgetCategory.setBudgetCategoryTypeCode(PERSONNEL_CATEGORY_CODE);
    lineItem.setBudgetCategory(budgetCategory);

    BudgetPersonnelDetails budgetPersonnelDetails = new BudgetPersonnelDetails();
    budgetPersonnelDetails.setLineItemNumber(3);
    budgetPersonnelDetails.setPersonNumber(1);
    budgetPersonnelDetails.setOnOffCampusFlag(Boolean.TRUE);
    budgetPersonnelDetails.setEndDate(endDate);
    budgetPersonnelDetails.setStartDate(startDate);
    budgetPersonnelDetails.setApplyInRateFlag(Boolean.TRUE);
    budgetPersonnelDetails.setJobCode("AA000");
    budgetPersonnelDetails.setPercentCharged(ScaleTwoDecimal.ONE_HUNDRED);
    budgetPersonnelDetails.setPercentEffort(ScaleTwoDecimal.ONE_HUNDRED);
    budgetPersonnelDetails.setPersonId("10000000002");
    budgetPersonnelDetails.setSalaryRequested(new ScaleTwoDecimal(102000L));
    budgetPersonnelDetails.setCostElement("400350");
    budgetPersonnelDetails.setCostElementBO(getCostElementPersonnel());
    budgetPersonnelDetails.setBudgetLineItem(lineItem);
    budgetPersonnelDetails.setBudgetPeriod(1);
    budgetPersonnelDetails.setBudgetPeriodBO(budgetPeriod);
    lineItem.getBudgetPersonnelDetailsList().add(budgetPersonnelDetails);
    lineItem.setCostElementBO(getCostElementPersonnel());
    return lineItem;
  }
コード例 #2
0
 protected BudgetLineItem getTravelLineItem(
     BudgetPeriod budgetPeriod, Date startDate, Date endDate) {
   BudgetLineItem lineItem = new BudgetLineItemMock();
   lineItem.setBudgetCategory(createBudgetCategory("20", "Test", "E"));
   lineItem.setBudgetCategoryCode("20");
   lineItem.setCostElement("420050");
   lineItem.setLineItemCost(new ScaleTwoDecimal(10000.00));
   lineItem.setEndDate(endDate);
   lineItem.setStartDate(startDate);
   lineItem.setCostElementBO(getCostElementTravel());
   lineItem.setApplyInRateFlag(Boolean.TRUE);
   lineItem.setOnOffCampusFlag(Boolean.TRUE);
   lineItem.setBudgetPeriodBO(budgetPeriod);
   lineItem.setBudgetPeriod(1);
   lineItem.setLineItemNumber(2);
   lineItem.setBudgetLineItemId(6L);
   return lineItem;
 }