/**
  * Associates the given payment group id with every historical travel expense that represents a
  * corporate card charge on the given document
  *
  * @param document the document to update
  * @param paymentGroupNumber the payment group id to update the historical expenses with
  */
 protected void associatePaymentGroupWithCreditCardData(
     TEMReimbursementDocument document, KualiInteger paymentGroupNumber) {
   for (HistoricalTravelExpense expense : document.getHistoricalTravelExpenses()) {
     if (expense.getCreditCardStagingData() != null) {
       if (StringUtils.equals(
           expense.getCreditCardStagingData().getCreditCardAgency().getTravelCardTypeCode(),
           TemConstants.TRAVEL_TYPE_CORP)) {
         expense.getCreditCardStagingData().setPaymentGroupId(paymentGroupNumber);
         getBusinessObjectService().save(expense.getCreditCardStagingData());
       }
     }
   }
 }