/**
   * @param displayList
   * @param sortPropertyName
   * @return
   */
  private Map<String, KualiDecimal> buildSubTotalMap(
      List<ContractsGrantsAwardBalancesReport> displayList, String sortPropertyName) {
    Map<String, KualiDecimal> returnSubTotalMap = new HashMap<String, KualiDecimal>();
    // get list of sort fields
    List<String> valuesOfsortProperty =
        getListOfValuesSortedProperties(displayList, sortPropertyName);

    // calculate sub_total and build subTotalMap
    for (String value : valuesOfsortProperty) {
      KualiDecimal subTotal = KualiDecimal.ZERO;
      for (ContractsGrantsAwardBalancesReport awardBalancesReportEntry : displayList) {
        // set fieldValue as "" when it is null
        if (value.equals(getPropertyValue(awardBalancesReportEntry, sortPropertyName))) {
          subTotal = subTotal.add(awardBalancesReportEntry.getAwardTotalAmount());
        }
      }
      returnSubTotalMap.put(value, subTotal);
    }
    return returnSubTotalMap;
  }
  /**
   * @param awardBalancesReportEntry
   * @param reportDetail
   */
  private void setReportDate(
      ContractsGrantsAwardBalancesReport awardBalancesReportEntry,
      ContractsGrantsAwardBalancesReportDetailDataHolder reportDetail) {
    reportDetail.setProposalNumber(awardBalancesReportEntry.getProposalNumber());

    String agencyName =
        (ObjectUtils.isNull(awardBalancesReportEntry.getAgency()))
            ? null
            : awardBalancesReportEntry.getAgency().getReportingName();
    reportDetail.setAgencyName(agencyName);

    reportDetail.setAwardProjectTitle(awardBalancesReportEntry.getAwardProjectTitle());
    reportDetail.setAwardStatusCode(awardBalancesReportEntry.getAwardStatusCode());

    reportDetail.setAwardBeginningDate(awardBalancesReportEntry.getAwardBeginningDate());
    reportDetail.setAwardEndingDate(awardBalancesReportEntry.getAwardEndingDate());

    reportDetail.setPrimaryProjectDirector(
        awardBalancesReportEntry.getAwardPrimaryProjectDirectorName());
    reportDetail.setPrimaryFundManager(awardBalancesReportEntry.getAwardPrimaryFundManagerName());

    BigDecimal awardTotalAmount =
        (ObjectUtils.isNull(awardBalancesReportEntry.getAwardTotalAmountForReport()))
            ? BigDecimal.ZERO
            : awardBalancesReportEntry.getAwardTotalAmountForReport().bigDecimalValue();
    reportDetail.setAwardTotalAmount(awardTotalAmount);

    BigDecimal totalBilledToDate =
        (ObjectUtils.isNull(awardBalancesReportEntry.getTotalBilledToDate()))
            ? BigDecimal.ZERO
            : awardBalancesReportEntry.getTotalBilledToDate().bigDecimalValue();
    reportDetail.setTotalBilledToDate(totalBilledToDate);

    BigDecimal totalPaymentsToDate =
        (ObjectUtils.isNull(awardBalancesReportEntry.getTotalPaymentsToDate()))
            ? BigDecimal.ZERO
            : awardBalancesReportEntry.getTotalPaymentsToDate().bigDecimalValue();
    reportDetail.setTotalPaymentsToDate(totalPaymentsToDate);

    reportDetail.setAmountCurrentlyDue(totalBilledToDate.subtract(totalPaymentsToDate));
  }