Search in sources :

Example 11 with ConcurAccountInfo

use of edu.cornell.kfs.concur.businessobjects.ConcurAccountInfo in project cu-kfs by CU-CommunityApps.

the class ConcurReportsServiceImpl method extractConcurAccountInfoFromAllocation.

protected ConcurAccountInfo extractConcurAccountInfoFromAllocation(AllocationsDTO allocation) {
    String chart = ConcurUtils.extractCodeFromCodeAndDescriptionValue(allocation.getCustom1());
    String accountNumber = ConcurUtils.extractCodeFromCodeAndDescriptionValue(allocation.getCustom2());
    String subAccountNumber = ConcurUtils.extractCodeFromCodeAndDescriptionValue(allocation.getCustom3());
    String objectCode = allocation.getAccountCode1();
    String subObjectCode = allocation.getCustom4();
    String projectCode = ConcurUtils.extractCodeFromCodeAndDescriptionValue(allocation.getCustom5());
    ConcurAccountInfo concurAccountInfo = new ConcurAccountInfo(chart, accountNumber, subAccountNumber, objectCode, subObjectCode, projectCode);
    return concurAccountInfo;
}
Also used : ConcurAccountInfo(edu.cornell.kfs.concur.businessobjects.ConcurAccountInfo)

Example 12 with ConcurAccountInfo

use of edu.cornell.kfs.concur.businessobjects.ConcurAccountInfo in project cu-kfs by CU-CommunityApps.

the class ConcurReportsServiceImpl method extractAccountInfoFromTravelRequestDetails.

private List<ConcurAccountInfo> extractAccountInfoFromTravelRequestDetails(TravelRequestDetailsDTO travelRequestDetails) {
    List<ConcurAccountInfo> accountInfoList = new ArrayList<ConcurAccountInfo>();
    String chart = ConcurUtils.extractCodeFromCodeAndDescriptionValue(travelRequestDetails.getCustom1());
    String accountNumber = ConcurUtils.extractCodeFromCodeAndDescriptionValue(travelRequestDetails.getCustom2());
    String subAccountNumber = ConcurUtils.extractCodeFromCodeAndDescriptionValue(travelRequestDetails.getCustom3());
    String objectCode = parameterService.getParameterValueAsString(CUKFSConstants.ParameterNamespaces.CONCUR, CUKFSParameterKeyConstants.ALL_COMPONENTS, ConcurParameterConstants.DEFAULT_TRAVEL_REQUEST_OBJECT_CODE);
    String subObjectCode = travelRequestDetails.getCustom4();
    String projectCode = ConcurUtils.extractCodeFromCodeAndDescriptionValue(travelRequestDetails.getCustom5());
    ConcurAccountInfo concurAccountInfo = new ConcurAccountInfo(chart, accountNumber, subAccountNumber, objectCode, subObjectCode, projectCode);
    accountInfoList.add(concurAccountInfo);
    return accountInfoList;
}
Also used : ArrayList(java.util.ArrayList) ConcurAccountInfo(edu.cornell.kfs.concur.businessobjects.ConcurAccountInfo)

Example 13 with ConcurAccountInfo

use of edu.cornell.kfs.concur.businessobjects.ConcurAccountInfo in project cu-kfs by CU-CommunityApps.

the class ConcurReportsServiceImpl method extractConcurReportFromExpenseDetails.

protected ConcurReport extractConcurReportFromExpenseDetails(String reportURI) {
    ExpenseReportDetailsDTO expenseReportDetailsDTO = retrieveExpenseReportDetails(reportURI);
    List<ConcurAccountInfo> concurAccountInfos = extractAccountInfoFromExpenseReportDetails(expenseReportDetailsDTO);
    return new ConcurReport(expenseReportDetailsDTO.getReportId(), expenseReportDetailsDTO.getConcurStatusCode(), expenseReportDetailsDTO.getWorkflowActionURL(), concurAccountInfos);
}
Also used : ExpenseReportDetailsDTO(edu.cornell.kfs.concur.rest.xmlObjects.ExpenseReportDetailsDTO) ConcurReport(edu.cornell.kfs.concur.businessobjects.ConcurReport) ConcurAccountInfo(edu.cornell.kfs.concur.businessobjects.ConcurAccountInfo)

Aggregations

ConcurAccountInfo (edu.cornell.kfs.concur.businessobjects.ConcurAccountInfo)13 ValidationResult (edu.cornell.kfs.concur.businessobjects.ValidationResult)3 ConcurStandardAccountingExtractDetailLine (edu.cornell.kfs.concur.batch.businessobject.ConcurStandardAccountingExtractDetailLine)2 ConcurReport (edu.cornell.kfs.concur.businessobjects.ConcurReport)2 ConcurBatchReportLineValidationErrorItem (edu.cornell.kfs.concur.batch.report.ConcurBatchReportLineValidationErrorItem)1 PdpFeedAccountingEntry (edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedAccountingEntry)1 ExpenseReportDetailsDTO (edu.cornell.kfs.concur.rest.xmlObjects.ExpenseReportDetailsDTO)1 TravelRequestDetailsDTO (edu.cornell.kfs.concur.rest.xmlObjects.TravelRequestDetailsDTO)1 ArrayList (java.util.ArrayList)1 Test (org.junit.Test)1