use of edu.cornell.kfs.concur.businessobjects.ConcurAccountInfo in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountingExtractCashAdvanceServiceImpl method findAccountingInfoForCashAdvanceLine.
@Override
public ConcurAccountInfo findAccountingInfoForCashAdvanceLine(ConcurStandardAccountingExtractDetailLine cashAdvanceLine, List<ConcurStandardAccountingExtractDetailLine> saeLines) {
LOG.debug("findAccountingInfoForCashAdvanceLine, entering");
ConcurAccountInfo info = new ConcurAccountInfo();
String cashAdvanceReportEntryId = cashAdvanceLine.getReportEntryId();
if (LOG.isDebugEnabled()) {
LOG.debug("findAccountingInfoForCashAdvanceLine, cashAdvanceReportEntryId: " + cashAdvanceReportEntryId);
}
for (ConcurStandardAccountingExtractDetailLine line : saeLines) {
if (StringUtils.equalsIgnoreCase(line.getReportEntryId(), cashAdvanceReportEntryId) && !isCashAdvanceLine(line)) {
info.setChart(line.getChartOfAccountsCode());
info.setAccountNumber(line.getAccountNumber());
info.setSubAccountNumber(line.getSubAccountNumber());
info.setObjectCode(line.getJournalAccountCode());
info.setSubObjectCode(line.getSubObjectCode());
info.setProjectCode(line.getProjectCode());
info.setOrgRefId(line.getOrgRefId());
if (LOG.isDebugEnabled()) {
LOG.debug("findAccountingInfoForCashAdvanceLine, returning Concur account info: " + info.toString());
}
break;
}
}
return info;
}
use of edu.cornell.kfs.concur.businessobjects.ConcurAccountInfo in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountingExtractServiceImpl method getAccountingEntryForLine.
private PdpFeedAccountingEntry getAccountingEntryForLine(PdpFeedDetailEntry detailEntry, ConcurStandardAccountingExtractDetailLine line, ConcurStandardAccountingExtractFile concurStandardAccountingExtractFile) {
ConcurAccountInfo concurAccountInfo = buildConcurAccountInfoFromExtractDetailLine(line, concurStandardAccountingExtractFile);
for (PdpFeedAccountingEntry accountingEntry : detailEntry.getAccounting()) {
if (isCurrentAccountingEntrySameAsLineDetail(accountingEntry, concurAccountInfo)) {
return accountingEntry;
}
}
PdpFeedAccountingEntry accountingEntry = getConcurStandardAccountExtractPdpEntryService().buildPdpFeedAccountingEntry(concurAccountInfo);
detailEntry.getAccounting().add(accountingEntry);
return accountingEntry;
}
use of edu.cornell.kfs.concur.businessobjects.ConcurAccountInfo in project cu-kfs by CU-CommunityApps.
the class ConcurReportsServiceImpl method extractAccountingInfoFromReportHeader.
protected ConcurAccountInfo extractAccountingInfoFromReportHeader(ExpenseReportDetailsDTO reportDetails) {
String chart = ConcurUtils.extractCodeFromCodeAndDescriptionValue(reportDetails.getOrgUnit1());
String accountNumber = ConcurUtils.extractCodeFromCodeAndDescriptionValue(reportDetails.getOrgUnit2());
String subAccountNumber = ConcurUtils.extractCodeFromCodeAndDescriptionValue(reportDetails.getOrgUnit3());
String subObjectCode = ConcurUtils.extractCodeFromCodeAndDescriptionValue(reportDetails.getOrgUnit4());
String projectCode = ConcurUtils.extractCodeFromCodeAndDescriptionValue(reportDetails.getOrgUnit5());
ConcurAccountInfo concurAccountInfo = new ConcurAccountInfo(chart, accountNumber, subAccountNumber, null, subObjectCode, projectCode);
concurAccountInfo.setForPersonalCorporateCardExpense(true);
return concurAccountInfo;
}
use of edu.cornell.kfs.concur.businessobjects.ConcurAccountInfo in project cu-kfs by CU-CommunityApps.
the class ConcurReportsServiceImpl method extractConcurReportFromTravelRequestDetails.
protected ConcurReport extractConcurReportFromTravelRequestDetails(String reportURI) {
TravelRequestDetailsDTO travelRequestDetailsDTO = retrieveTravelRequestDetails(reportURI);
List<ConcurAccountInfo> concurAccountInfos = extractAccountInfoFromTravelRequestDetails(travelRequestDetailsDTO);
return new ConcurReport(travelRequestDetailsDTO.getRequestID(), travelRequestDetailsDTO.getConcurStatucCode(), travelRequestDetailsDTO.getWorkflowActionURL(), concurAccountInfos);
}
use of edu.cornell.kfs.concur.businessobjects.ConcurAccountInfo in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountingExtractCashAdvanceServiceImplTest method validateFindAccountingInfoForCashAdvanceLine.
@Test
public void validateFindAccountingInfoForCashAdvanceLine() {
List<ConcurStandardAccountingExtractDetailLine> saeLines = buildSAELines();
ConcurStandardAccountingExtractDetailLine line = ConcurSAEDetailLineFixture.PDP_TEST_CASH_ADVANCE_500.toDetailLine();
ConcurAccountInfo info = concurStandardAccountingExtractCashAdvanceService.findAccountingInfoForCashAdvanceLine(line, saeLines);
assertEquals("Charts should match", ParameterTestValues.COLLECTOR_CHART_CODE, info.getChart());
assertEquals("Accounts should match", ConcurTestConstants.ACCT_1234321, info.getAccountNumber());
}
Aggregations