use of org.kuali.kfs.gl.businessobject.OriginEntryFull in project cu-kfs by CU-CommunityApps.
the class ConcurDetailLineGroupForCollector method buildOriginEntryForPaymentOffset.
protected Optional<OriginEntryFull> buildOriginEntryForPaymentOffset(OriginEntryFull cashEntry, List<ConcurStandardAccountingExtractDetailLine> cashLines) {
KualiDecimal cashAmount = getSignedAmountFromOriginEntry(cashEntry);
KualiDecimal cashAdvanceAmount = calculateAndUpdateUsableAmountForCashAdvanceLinesReferencedByRegularLines(cashLines);
KualiDecimal cashAmountToOffset = cashAmount.add(cashAdvanceAmount);
if (cashAmountToOffset.isZero()) {
return Optional.empty();
}
OriginEntryFull offsetEntry = buildOffsetOriginEntry(cashEntry, cashAmountToOffset);
offsetEntry.setFinancialObjectCode(collectorHelper.getPaymentOffsetObjectCode());
offsetEntry.setFinancialSubObjectCode(collectorHelper.getDashOnlyPropertyValue(KFSPropertyConstants.SUB_OBJECT_CODE));
return Optional.of(offsetEntry);
}
use of org.kuali.kfs.gl.businessobject.OriginEntryFull in project cu-kfs by CU-CommunityApps.
the class ConcurDetailLineGroupForCollector method addOriginEntryForCorpCardPersonalExpense.
protected void addOriginEntryForCorpCardPersonalExpense(Consumer<OriginEntryFull> entryConsumer, ConcurStandardAccountingExtractDetailLine detailLine, String chartCode, String accountNumber, String subAccountNumber, String objectCode, KualiDecimal amount) {
OriginEntryFull originEntry = buildCorpCardPersonalExpenseOriginEntry(detailLine, chartCode, accountNumber, subAccountNumber, objectCode, StringUtils.EMPTY, amount);
entryConsumer.accept(originEntry);
}
use of org.kuali.kfs.gl.businessobject.OriginEntryFull in project cu-kfs by CU-CommunityApps.
the class ConcurDetailLineGroupForCollector method addOffsetOriginEntriesForUnusedAtmCashAdvanceAmountLines.
protected void addOffsetOriginEntriesForUnusedAtmCashAdvanceAmountLines(Consumer<OriginEntryFull> entryConsumer, List<ConcurStandardAccountingExtractDetailLine> unusedAtmAmountLines) {
if (CollectionUtils.isEmpty(unusedAtmAmountLines)) {
return;
}
KualiDecimal totalAmount = calculateTotalAmountForLines(unusedAtmAmountLines);
if (totalAmount.isNonZero()) {
OriginEntryFull offsetEntry = this.buildOriginEntryForUnusedAtmAmountOffset(unusedAtmAmountLines, totalAmount);
entryConsumer.accept(offsetEntry);
}
}
use of org.kuali.kfs.gl.businessobject.OriginEntryFull in project cu-kfs by CU-CommunityApps.
the class ConcurDetailLineGroupForCollector method buildOriginEntryWithoutAccountingIdentifiers.
protected OriginEntryFull buildOriginEntryWithoutAccountingIdentifiers(ConcurStandardAccountingExtractDetailLine detailLine, KualiDecimal amount) {
OriginEntryFull originEntry = new OriginEntryFull();
// Default constructor sets fiscal year to zero; need to forcibly clear it to allow auto-setup by the Poster, as per the spec.
originEntry.setUniversityFiscalYear(null);
originEntry.setFinancialBalanceTypeCode(collectorHelper.getActualFinancialBalanceTypeCode());
originEntry.setFinancialDocumentTypeCode(collectorHelper.getDocumentTypeCode());
originEntry.setFinancialSystemOriginationCode(collectorHelper.getSystemOriginationCode());
originEntry.setDocumentNumber(buildDocumentNumber(detailLine));
originEntry.setTransactionLedgerEntryDescription(buildTransactionDescription(detailLine));
originEntry.setTransactionDate(collectorHelper.getTransmissionDate());
setTransactionSequenceNumberToNextAvailableValue(originEntry);
configureAmountAndDebitCreditCodeOnOriginEntry(originEntry, amount);
return originEntry;
}
use of org.kuali.kfs.gl.businessobject.OriginEntryFull in project cu-kfs by CU-CommunityApps.
the class ConcurDetailLineGroupForCollector method buildOriginEntryForCorporateCardOffset.
protected Optional<OriginEntryFull> buildOriginEntryForCorporateCardOffset(OriginEntryFull corporateCardEntry, List<ConcurStandardAccountingExtractDetailLine> corporateCardLines) {
KualiDecimal corporateCardAmount = getSignedAmountFromOriginEntry(corporateCardEntry);
OriginEntryFull offsetEntry = buildOffsetOriginEntry(corporateCardEntry, corporateCardAmount);
offsetEntry.setChartOfAccountsCode(collectorHelper.getPrepaidOffsetChartCode());
offsetEntry.setAccountNumber(collectorHelper.getPrepaidOffsetAccountNumber());
offsetEntry.setSubAccountNumber(collectorHelper.getDashOnlyPropertyValue(KFSPropertyConstants.SUB_ACCOUNT_NUMBER));
offsetEntry.setFinancialObjectCode(collectorHelper.getPrepaidOffsetObjectCode());
offsetEntry.setFinancialSubObjectCode(collectorHelper.getDashOnlyPropertyValue(KFSPropertyConstants.SUB_OBJECT_CODE));
return Optional.of(offsetEntry);
}
Aggregations