use of edu.cornell.kfs.concur.businessobjects.ConcurAccountInfo in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountingExtractValidationServiceImpl method validateAccountingLine.
private boolean validateAccountingLine(ConcurStandardAccountingExtractDetailLine line, ConcurStandardAccountingExtractBatchReportData reportData) {
if (!getConcurStandardAccountingExtractCashAdvanceService().isCashAdvanceLine(line)) {
ConcurAccountInfo accountingInformation = buildConcurAccountingInformation(line);
ValidationResult validationResults = buildValidationResult(accountingInformation, false);
if (validationResults.isNotValid()) {
reportData.addValidationErrorFileLine(new ConcurBatchReportLineValidationErrorItem(line, validationResults.getMessages()));
}
return validationResults.isValid();
} else {
LOG.debug("validateAccountingLine, found a cash advance line, no need to validate");
return true;
}
}
use of edu.cornell.kfs.concur.businessobjects.ConcurAccountInfo in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountingExtractValidationServiceImpl method logErrorsWithOriginalAccountingDetails.
private void logErrorsWithOriginalAccountingDetails(ConcurStandardAccountingExtractDetailLine line) {
ConcurAccountInfo accountingInformation = buildConcurAccountingInformation(line);
buildValidationResult(accountingInformation, false);
}
use of edu.cornell.kfs.concur.businessobjects.ConcurAccountInfo in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountingExtractValidationServiceImpl method buildConcurAccountingInformation.
private ConcurAccountInfo buildConcurAccountingInformation(ConcurStandardAccountingExtractDetailLine line) {
String objectCode = line.getJournalAccountCode();
String subObjectCode;
if (getConcurBatchUtilityService().lineRepresentsPersonalExpenseChargedToCorporateCard(line)) {
subObjectCode = StringUtils.EMPTY;
} else {
subObjectCode = line.getSubObjectCode();
}
ConcurAccountInfo accountingInformation = buildConcurAccountingInformation(line, objectCode, subObjectCode);
return accountingInformation;
}
use of edu.cornell.kfs.concur.businessobjects.ConcurAccountInfo in project cu-kfs by CU-CommunityApps.
the class ConcurEventNotificationProcessingServiceImpl method validateReportAccountInfo.
private ValidationResult validateReportAccountInfo(ConcurReport concurReport) {
ValidationResult reportValidationResult = new ValidationResult();
LOG.info("validateReportAccountInfo()");
if (concurReport.getAccountInfos() != null && concurReport.getAccountInfos().size() > 0) {
for (ConcurAccountInfo concurAccountInfo : concurReport.getAccountInfos()) {
LOG.info(concurAccountInfo.toString());
if (concurAccountInfo.isForPersonalCorporateCardExpense()) {
reportValidationResult.add(concurAccountValidationService.validateConcurAccountInfoObjectCodeNotRequired(concurAccountInfo));
} else {
reportValidationResult.add(concurAccountValidationService.validateConcurAccountInfo(concurAccountInfo));
}
}
}
LOG.info("Validation Result: " + reportValidationResult.isValid() + ", validation messages: " + reportValidationResult.getErrorMessagesAsOneFormattedString());
return reportValidationResult;
}
use of edu.cornell.kfs.concur.businessobjects.ConcurAccountInfo in project cu-kfs by CU-CommunityApps.
the class ConcurRequestExtractFileValidationServiceImpl method requestedCashAdvanceAccountingInformationIsValid.
private boolean requestedCashAdvanceAccountingInformationIsValid(ConcurRequestExtractRequestDetailFileLine detailFileLine) {
ConcurAccountInfo concurAccountInfo = new ConcurAccountInfo(detailFileLine.getChart(), detailFileLine.getAccountNumber(), detailFileLine.getSubAccountNumber(), getConcurBatchUtilityService().getConcurParameterValue(ConcurParameterConstants.DEFAULT_TRAVEL_REQUEST_OBJECT_CODE), detailFileLine.getSubObjectCode(), detailFileLine.getProjectCode());
ValidationResult validationResults = getConcurAccountValidationService().validateConcurAccountInfo(concurAccountInfo);
if (validationResults.isNotValid()) {
detailFileLine.getValidationResult().addMessages(validationResults.getMessages());
}
return validationResults.isValid();
}
Aggregations