/** * Only build account details for corporate card accounting lines * * @see * org.kuali.kfs.module.tem.document.service.TravelPaymentsHelperService#buildGenericPaymentAccountDetails(java.util.List) */ protected List<PaymentAccountDetail> buildPaymentAccountDetails( List<? extends AccountingLine> accountingLines) { List<PaymentAccountDetail> details = new ArrayList<PaymentAccountDetail>(); for (AccountingLine al : accountingLines) { final TemSourceAccountingLine accountingLine = (TemSourceAccountingLine) al; if (StringUtils.equals(accountingLine.getCardType(), TemConstants.TRAVEL_TYPE_CORP)) { PaymentAccountDetail pad = new PaymentAccountDetail(); pad.setFinChartCode(accountingLine.getChartOfAccountsCode()); pad.setAccountNbr(accountingLine.getAccountNumber()); if (!StringUtils.isBlank(accountingLine.getSubAccountNumber())) { pad.setSubAccountNbr(accountingLine.getSubAccountNumber()); } else { pad.setSubAccountNbr(KFSConstants.getDashSubAccountNumber()); } pad.setFinObjectCode(accountingLine.getFinancialObjectCode()); if (!StringUtils.isBlank(accountingLine.getFinancialSubObjectCode())) { pad.setFinSubObjectCode(accountingLine.getFinancialSubObjectCode()); } else { pad.setFinSubObjectCode(KFSConstants.getDashFinancialSubObjectCode()); } if (!StringUtils.isBlank(accountingLine.getOrganizationReferenceId())) { pad.setOrgReferenceId(accountingLine.getOrganizationReferenceId()); } if (!StringUtils.isBlank(accountingLine.getProjectCode())) { pad.setProjectCode(accountingLine.getProjectCode()); } else { pad.setProjectCode(KFSConstants.getDashProjectCode()); } pad.setAccountNetAmount(accountingLine.getAmount()); details.add(pad); } } return details; }