Search in sources :

Example 1 with PdpFeedTrailerEntry

use of edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedTrailerEntry 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;
}
Also used : PdpFeedDetailEntry(edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedDetailEntry) KualiDecimal(org.kuali.kfs.core.api.util.type.KualiDecimal) PdpFeedTrailerEntry(edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedTrailerEntry) PdpFeedGroupEntry(edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedGroupEntry) PdpFeedAccountingEntry(edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedAccountingEntry)

Example 2 with PdpFeedTrailerEntry

use of edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedTrailerEntry in project cu-kfs by CU-CommunityApps.

the class ConcurCashAdvancePdpFeedFileServiceImpl method buildPdpFeedTrailerEntry.

private PdpFeedTrailerEntry buildPdpFeedTrailerEntry(int totalDetailRecordCount, KualiDecimal totalDetailRecordAmount) {
    PdpFeedTrailerEntry trailer = new PdpFeedTrailerEntry();
    trailer.setDetailCount(totalDetailRecordCount);
    trailer.setDetailTotAmt(totalDetailRecordAmount);
    return trailer;
}
Also used : PdpFeedTrailerEntry(edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedTrailerEntry)

Example 3 with PdpFeedTrailerEntry

use of edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedTrailerEntry in project cu-kfs by CU-CommunityApps.

the class ConcurCreateCashAdvancePdpFeedFileServiceImpl method buildPdpFeedTrailerEntry.

private PdpFeedTrailerEntry buildPdpFeedTrailerEntry(int totalDetailRecordCount, KualiDecimal totalDetailRecordAmount) {
    PdpFeedTrailerEntry trailer = new PdpFeedTrailerEntry();
    trailer.setDetailCount(totalDetailRecordCount);
    trailer.setDetailTotAmt(totalDetailRecordAmount);
    return trailer;
}
Also used : PdpFeedTrailerEntry(edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedTrailerEntry)

Aggregations

PdpFeedTrailerEntry (edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedTrailerEntry)3 PdpFeedAccountingEntry (edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedAccountingEntry)1 PdpFeedDetailEntry (edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedDetailEntry)1 PdpFeedGroupEntry (edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedGroupEntry)1 KualiDecimal (org.kuali.kfs.core.api.util.type.KualiDecimal)1