use of edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedGroupEntry in project cu-kfs by CU-CommunityApps.
the class ConcurCashAdvancePdpFeedFileServiceImpl method buildPdpFeedGroupEntry.
private PdpFeedGroupEntry buildPdpFeedGroupEntry(ConcurRequestExtractRequestDetailFileLine detailFileLine, PdpFeedPayeeIdEntry pdpPayeeIdEntry, List<PdpFeedDetailEntry> pdpDetailEntries) {
PdpFeedGroupEntry pdpGroupEntry = new PdpFeedGroupEntry();
pdpGroupEntry.setPayeeName(getConcurBatchUtilityService().formatPdpPayeeName(detailFileLine.getLastName(), detailFileLine.getFirstName(), detailFileLine.getMiddleInitial()));
pdpGroupEntry.setPayeeId(pdpPayeeIdEntry);
pdpGroupEntry.setCustomerInstitutionIdentifier(StringUtils.EMPTY);
pdpGroupEntry.setPaymentDate(getConcurBatchUtilityService().formatDate_MMddyyyy(detailFileLine.getBatchDate()));
pdpGroupEntry.setCombineGroupInd(ConcurConstants.COMBINED_GROUP_INDICATOR);
pdpGroupEntry.setBankCode(ConcurConstants.BANK_CODE);
pdpGroupEntry.setDetail(pdpDetailEntries);
return pdpGroupEntry;
}
use of edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedGroupEntry in project cu-kfs by CU-CommunityApps.
the class ConcurCashAdvancePdpFeedFileServiceImpl method buildPdpFeedBaseEntry.
private PdpFeedFileBaseEntry buildPdpFeedBaseEntry(ConcurRequestExtractFile requestExtractFile, ConcurRequestExtractBatchReportData reportData) {
int totalPdpDetailRecordsCount = 0;
KualiDecimal totalPdpDetailRecordsAmount = KualiDecimal.ZERO;
PdpFeedFileBaseEntry pdpBaseEntry = new PdpFeedFileBaseEntry();
pdpBaseEntry.setHeader(buildPdpFeedHeaderEntry(requestExtractFile.getBatchDate()));
List<PdpFeedGroupEntry> groupEntries = new ArrayList<PdpFeedGroupEntry>();
for (ConcurRequestExtractRequestDetailFileLine detailFileLine : requestExtractFile.getRequestDetails()) {
if (isDetailFileLineValidCashAdvanceRequest(detailFileLine)) {
PdpFeedDetailEntry pdpDetailEntry = buildPdpFeedDetailEntry(detailFileLine, buildPdpFeedAccountingEntry(detailFileLine));
List<PdpFeedDetailEntry> pdpDetailEntries = new ArrayList<PdpFeedDetailEntry>();
pdpDetailEntries.add(pdpDetailEntry);
groupEntries.add(buildPdpFeedGroupEntry(detailFileLine, buildPdpFeedPayeeIdEntry(detailFileLine), pdpDetailEntries));
recordCashAdvanceGenerationInDuplicateTrackingTable(detailFileLine, pdpDetailEntry.getSourceDocNbr(), requestExtractFile.getFileName());
totalPdpDetailRecordsCount++;
totalPdpDetailRecordsAmount = totalPdpDetailRecordsAmount.add(detailFileLine.getRequestAmount());
}
updateReportDataForDetailFileLineBeingProcessed(reportData, detailFileLine, totalPdpDetailRecordsCount, totalPdpDetailRecordsAmount);
}
pdpBaseEntry.setGroup(groupEntries);
pdpBaseEntry.setTrailer(buildPdpFeedTrailerEntry(totalPdpDetailRecordsCount, totalPdpDetailRecordsAmount));
pdpBaseEntry.setVersion(ConcurConstants.FEED_FILE_ENTRY_HEADER_VERSION);
return pdpBaseEntry;
}
use of edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedGroupEntry in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountingExtractServiceImpl method buildAndUpdateAccountingEntryFromLine.
private void buildAndUpdateAccountingEntryFromLine(PdpFeedFileBaseEntry pdpFeedFileBaseEntry, ConcurStandardAccountingExtractDetailLine line, ConcurStandardAccountingExtractFile concurStandardAccountingExtractFile) {
PdpFeedGroupEntry currentGroup = getGroupEntryForLine(pdpFeedFileBaseEntry, line);
PdpFeedDetailEntry currentDetail = getDetailEntryForLine(currentGroup, line);
PdpFeedAccountingEntry currentAccounting = getAccountingEntryForLine(currentDetail, line, concurStandardAccountingExtractFile);
KualiDecimal newAmount = line.getJournalAmount().add(currentAccounting.getAmount());
currentAccounting.setAmount(newAmount);
}
use of edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedGroupEntry in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountExtractPdpEntryServiceImpl method buildPdpFeedTrailerEntry.
@Override
public PdpFeedTrailerEntry buildPdpFeedTrailerEntry(PdpFeedFileBaseEntry pdpFeedFileBaseEntry, ConcurStandardAccountingExtractBatchReportData reportData) {
PdpFeedTrailerEntry trailerEntry = new PdpFeedTrailerEntry();
KualiDecimal pdpTotal = KualiDecimal.ZERO;
int numberOfDetails = 0;
for (PdpFeedGroupEntry group : pdpFeedFileBaseEntry.getGroup()) {
numberOfDetails += group.getDetail().size();
for (PdpFeedDetailEntry detailEntry : group.getDetail()) {
for (PdpFeedAccountingEntry accountingEntry : detailEntry.getAccounting()) {
pdpTotal = pdpTotal.add(accountingEntry.getAmount());
}
}
}
trailerEntry.setDetailCount(numberOfDetails);
trailerEntry.setDetailTotAmt(pdpTotal);
reportData.getPdpRecordsProcessed().setRecordCount(numberOfDetails);
reportData.getPdpRecordsProcessed().setDollarAmount(pdpTotal);
return trailerEntry;
}
use of edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedGroupEntry in project cu-kfs by CU-CommunityApps.
the class ConcurCreateCashAdvancePdpFeedFileServiceImpl method buildPdpFeedGroupEntry.
private PdpFeedGroupEntry buildPdpFeedGroupEntry(ConcurStandardAccountingExtractDetailLine detailFileLine, PdpFeedPayeeIdEntry pdpPayeeIdEntry, List<PdpFeedDetailEntry> pdpDetailEntries) {
PdpFeedGroupEntry pdpGroupEntry = new PdpFeedGroupEntry();
pdpGroupEntry.setPayeeName(getConcurBatchUtilityService().formatPdpPayeeName(detailFileLine.getEmployeeLastName(), detailFileLine.getEmployeeFirstName(), detailFileLine.getEmployeeMiddleInitial()));
pdpGroupEntry.setPayeeId(pdpPayeeIdEntry);
pdpGroupEntry.setCustomerInstitutionIdentifier(StringUtils.EMPTY);
pdpGroupEntry.setPaymentDate(getConcurBatchUtilityService().formatDate_MMddyyyy(detailFileLine.getBatchDate()));
pdpGroupEntry.setCombineGroupInd(ConcurConstants.COMBINED_GROUP_INDICATOR);
pdpGroupEntry.setBankCode(ConcurConstants.BANK_CODE);
pdpGroupEntry.setDetail(pdpDetailEntries);
return pdpGroupEntry;
}
Aggregations