use of edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedAccountingEntry in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountExtractPdpEntryServiceImpl method copyAccountingEntry.
private PdpFeedAccountingEntry copyAccountingEntry(PdpFeedAccountingEntry accountingEntry) {
PdpFeedAccountingEntry newAccountingEntry = new PdpFeedAccountingEntry();
newAccountingEntry.setCoaCd(accountingEntry.getCoaCd());
newAccountingEntry.setAccountNbr(accountingEntry.getAccountNbr());
newAccountingEntry.setSubAccountNbr(accountingEntry.getSubAccountNbr());
newAccountingEntry.setObjectCd(accountingEntry.getObjectCd());
newAccountingEntry.setSubObjectCd(accountingEntry.getSubObjectCd());
newAccountingEntry.setProjectCd(accountingEntry.getProjectCd());
newAccountingEntry.setOrgRefId(accountingEntry.getOrgRefId());
newAccountingEntry.setAmount(accountingEntry.getAmount());
return newAccountingEntry;
}
use of edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedAccountingEntry in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountExtractPdpEntryServiceImpl method buildPdpFeedAccountingEntry.
@Override
public PdpFeedAccountingEntry buildPdpFeedAccountingEntry(ConcurAccountInfo concurAccountInfo) {
PdpFeedAccountingEntry currentAccountingEntry = new PdpFeedAccountingEntry();
currentAccountingEntry.setCoaCd(concurAccountInfo.getChart());
currentAccountingEntry.setAccountNbr(concurAccountInfo.getAccountNumber());
currentAccountingEntry.setSubAccountNbr(concurAccountInfo.getSubAccountNumber());
currentAccountingEntry.setObjectCd(getConcurParameterValue(ConcurParameterConstants.CONCUR_SAE_PDP_DEFAULT_OBJECT_CODE));
currentAccountingEntry.setSubObjectCd(StringUtils.EMPTY);
currentAccountingEntry.setOrgRefId(concurAccountInfo.getOrgRefId());
currentAccountingEntry.setProjectCd(concurAccountInfo.getProjectCode());
currentAccountingEntry.setAmount(KualiDecimal.ZERO);
return currentAccountingEntry;
}
use of edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedAccountingEntry 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.PdpFeedAccountingEntry in project cu-kfs by CU-CommunityApps.
the class ConcurStandardAccountingExtractServiceImpl method getAccountingEntryForLine.
private PdpFeedAccountingEntry getAccountingEntryForLine(PdpFeedDetailEntry detailEntry, ConcurStandardAccountingExtractDetailLine line, ConcurStandardAccountingExtractFile concurStandardAccountingExtractFile) {
ConcurAccountInfo concurAccountInfo = buildConcurAccountInfoFromExtractDetailLine(line, concurStandardAccountingExtractFile);
for (PdpFeedAccountingEntry accountingEntry : detailEntry.getAccounting()) {
if (isCurrentAccountingEntrySameAsLineDetail(accountingEntry, concurAccountInfo)) {
return accountingEntry;
}
}
PdpFeedAccountingEntry accountingEntry = getConcurStandardAccountExtractPdpEntryService().buildPdpFeedAccountingEntry(concurAccountInfo);
detailEntry.getAccounting().add(accountingEntry);
return accountingEntry;
}
use of edu.cornell.kfs.concur.batch.xmlObjects.PdpFeedAccountingEntry 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);
}
Aggregations