use of edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedDetailEntry in project cu-kfs by CU-CommunityApps.
the class ConcurCashAdvancePdpFeedFileServiceImpl method buildPdpFeedDetailEntry.
private PdpFeedDetailEntry buildPdpFeedDetailEntry(ConcurRequestExtractRequestDetailFileLine detailFileLine, PdpFeedAccountingEntry pdpAccountingEntry) {
PdpFeedDetailEntry pdpDetailEntry = new PdpFeedDetailEntry();
pdpDetailEntry.setSourceDocNbr(getConcurBatchUtilityService().formatSourceDocumentNumber(getConcurBatchUtilityService().getConcurParameterValue(ConcurParameterConstants.CONCUR_REQUEST_EXTRACT_PDP_DOCUMENT_TYPE), detailFileLine.getRequestId()));
pdpDetailEntry.setInvoiceNbr(getConcurBatchUtilityService().getConcurParameterValue(ConcurParameterConstants.CONCUR_PDP_DEFAULT_INVOICE_NUMBER));
pdpDetailEntry.setPoNbr(StringUtils.EMPTY);
pdpDetailEntry.setInvoiceDate(getConcurBatchUtilityService().formatDate_MMddyyyy(detailFileLine.getBatchDate()));
pdpDetailEntry.setNetPaymentAmt(detailFileLine.getRequestAmount());
pdpDetailEntry.setFsOriginCd(getConcurBatchUtilityService().getConcurParameterValue(ConcurParameterConstants.CONCUR_AP_PDP_ORIGINATION_CODE));
pdpDetailEntry.setFdocTypCd(getConcurBatchUtilityService().getConcurParameterValue(ConcurParameterConstants.CONCUR_REQUEST_EXTRACT_PDP_DOCUMENT_TYPE));
List<String> paymentTexts = new ArrayList<String>();
paymentTexts.add(detailFileLine.getRequestEntryDescription());
pdpDetailEntry.setPaymentText(paymentTexts);
List<PdpFeedAccountingEntry> accountingLines = new ArrayList<PdpFeedAccountingEntry>();
accountingLines.add(pdpAccountingEntry);
pdpDetailEntry.setAccounting(accountingLines);
return pdpDetailEntry;
}
use of edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedDetailEntry in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountExtractPdpEntryServiceImpl method addDetailEntriesToNewGroupEntry.
private void addDetailEntriesToNewGroupEntry(PdpFeedGroupEntry newGroupEntry, PdpFeedGroupEntry originalGroupEntry) {
for (PdpFeedDetailEntry originalDetailEntry : originalGroupEntry.getDetail()) {
PdpFeedDetailEntry newDetailEntry = copyDetailEntry(originalDetailEntry);
KualiDecimal originalDetailTransactionTotal = KualiDecimal.ZERO;
for (PdpFeedAccountingEntry originalAccountingEntry : originalDetailEntry.getAccounting()) {
originalDetailTransactionTotal = originalDetailTransactionTotal.add(originalAccountingEntry.getAmount());
newDetailEntry.getAccounting().add(copyAccountingEntry(originalAccountingEntry));
}
cleanAccountingEntriesInDetailEntry(newDetailEntry);
addNewPaymentDetailToGroupIfTotalIsPositive(newGroupEntry, newDetailEntry, originalDetailTransactionTotal);
}
}
Aggregations