magyari-adam commented on code in PR #4775:
URL: https://github.com/apache/fineract/pull/4775#discussion_r2156545640
##########
fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForLoan.java:
##########
@@ -412,6 +416,28 @@ private void
createJournalEntriesForCapitalizedIncomeAmortizationAdjustment(fina
}
}
+ private void createJournalEntriesForBuyDownFee(final LoanDTO loanDTO,
final LoanTransactionDTO loanTransactionDTO,
+ final Office office) {
+ // loan properties
+ final Long loanProductId = loanDTO.getLoanProductId();
+ final Long loanId = loanDTO.getLoanId();
+ final String currencyCode = loanDTO.getCurrencyCode();
+
+ // transaction properties
+ final String transactionId = loanTransactionDTO.getTransactionId();
+ final LocalDate transactionDate =
loanTransactionDTO.getTransactionDate();
+ final BigDecimal amount = loanTransactionDTO.getAmount();
+ final Long paymentTypeId = loanTransactionDTO.getPaymentTypeId();
+
+ // Create journal entries for Buy Down Fee
+ // DR: Fund Source (cash account), CR: Income from Buy Down Fees
+ if (MathUtil.isGreaterThanZero(amount)) {
+ this.helper.createJournalEntriesForLoan(office, currencyCode,
AccrualAccountsForLoan.FUND_SOURCE.getValue(),
+
AccrualAccountsForLoan.INCOME_FROM_BUY_DOWN_FEES.getValue(), loanProductId,
paymentTypeId, loanId, transactionId,
+ transactionDate, amount);
Review Comment:
I believe this should debit buy down expense and credit Deferred income
liability.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]