FINERACT-2232: Loan account capitalized income transaction template

This commit is contained in:
Jose Alberto Hernandez
2025-04-24 11:48:10 +02:00
committed by Adam Saghy
parent 13c99f98ab
commit 205b39ddf0
11 changed files with 78 additions and 10 deletions
@@ -664,6 +664,9 @@ public class LoanTransactionsApiResource {
transactionData = this.loanReadPlatformService.retrieveLoanChargeOffTemplate(resolvedLoanId);
} else if (CommandParameterUtil.is(commandParam, DOWN_PAYMENT)) {
transactionData = this.loanReadPlatformService.retrieveLoanTransactionTemplate(resolvedLoanId);
} else if (CommandParameterUtil.is(commandParam, LoanApiConstants.CAPITALIZED_INCOME_TRANSACTION_COMMAND)) {
transactionData = this.loanReadPlatformService.retrieveLoanTransactionTemplate(resolvedLoanId,
LoanTransactionType.CAPITALIZED_INCOME);
} else {
throw new UnrecognizedQueryParamException("command", commandParam);
}
@@ -63,6 +63,8 @@ public interface LoanReadPlatformService {
LoanTransactionData retrieveLoanTransactionTemplate(Long loanId);
LoanTransactionData retrieveLoanTransactionTemplate(Long loanId, LoanTransactionType transactionType);
LoanTransactionData retrieveWaiveInterestDetails(Long loanId);
LoanTransactionData retrieveLoanTransaction(Long loanId, Long transactionId);
@@ -111,7 +111,6 @@ import org.apache.fineract.portfolio.loanaccount.domain.LoanCapitalizedIncomeCal
import org.apache.fineract.portfolio.loanaccount.domain.LoanCapitalizedIncomeStrategy;
import org.apache.fineract.portfolio.loanaccount.domain.LoanChargeOffBehaviour;
import org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment;
import org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleTransactionProcessorFactory;
import org.apache.fineract.portfolio.loanaccount.domain.LoanRepositoryWrapper;
import org.apache.fineract.portfolio.loanaccount.domain.LoanStatus;
import org.apache.fineract.portfolio.loanaccount.domain.LoanSubStatus;
@@ -166,7 +165,6 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService, Loa
private final StaffReadPlatformService staffReadPlatformService;
private final PaginationHelper paginationHelper;
private final PaymentTypeReadPlatformService paymentTypeReadPlatformService;
private final LoanRepaymentScheduleTransactionProcessorFactory loanRepaymentScheduleTransactionProcessorFactory;
private final FloatingRatesReadPlatformService floatingRatesReadPlatformService;
private final LoanUtilService loanUtilService;
private final ConfigurationDomainService configurationDomainService;
@@ -179,7 +177,6 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService, Loa
private final LoanTransactionRelationReadService loanTransactionRelationReadService;
private final LoanForeclosureValidator loanForeclosureValidator;
private final LoanTransactionMapper loanTransactionMapper;
private final org.apache.fineract.portfolio.loanaccount.mapper.LoanMapper loanMapper;
private final LoanTransactionProcessingService loadTransactionProcessingService;
@Override
@@ -452,6 +449,12 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService, Loa
return loanDetails;
}
@Override
public LoanTransactionData retrieveLoanTransactionTemplate(final Long loanId, LoanTransactionType transactionType) {
return LoanTransactionData.templateOnTop(retrieveLoanTransactionTemplate(loanId),
LoanEnumerations.transactionType(transactionType));
}
@Override
public LoanTransactionData retrieveLoanTransactionTemplate(final Long loanId) {
@@ -323,22 +323,20 @@ public class LoanAccountConfiguration {
CodeValueReadPlatformService codeValueReadPlatformService, CalendarReadPlatformService calendarReadPlatformService,
StaffReadPlatformService staffReadPlatformService, PaginationHelper paginationHelper,
PaymentTypeReadPlatformService paymentTypeReadPlatformService,
LoanRepaymentScheduleTransactionProcessorFactory loanRepaymentScheduleTransactionProcessorFactory,
FloatingRatesReadPlatformService floatingRatesReadPlatformService, LoanUtilService loanUtilService,
ConfigurationDomainService configurationDomainService, AccountDetailsReadPlatformService accountDetailsReadPlatformService,
ColumnValidator columnValidator, DatabaseSpecificSQLGenerator sqlGenerator,
DelinquencyReadPlatformService delinquencyReadPlatformService, LoanTransactionRepository loanTransactionRepository,
LoanChargePaidByReadService loanChargePaidByReadService, LoanTransactionRelationReadService loanTransactionRelationReadService,
LoanForeclosureValidator loanForeclosureValidator, LoanTransactionMapper loanTransactionMapper, LoanMapper loanMapper,
LoanForeclosureValidator loanForeclosureValidator, LoanTransactionMapper loanTransactionMapper,
LoanTransactionProcessingService loanTransactionProcessingService) {
return new LoanReadPlatformServiceImpl(jdbcTemplate, context, loanRepositoryWrapper, applicationCurrencyRepository,
loanProductReadPlatformService, clientReadPlatformService, groupReadPlatformService, loanDropdownReadPlatformService,
fundReadPlatformService, chargeReadPlatformService, codeValueReadPlatformService, calendarReadPlatformService,
staffReadPlatformService, paginationHelper, paymentTypeReadPlatformService,
loanRepaymentScheduleTransactionProcessorFactory, floatingRatesReadPlatformService, loanUtilService,
configurationDomainService, accountDetailsReadPlatformService, columnValidator, sqlGenerator,
staffReadPlatformService, paginationHelper, paymentTypeReadPlatformService, floatingRatesReadPlatformService,
loanUtilService, configurationDomainService, accountDetailsReadPlatformService, columnValidator, sqlGenerator,
delinquencyReadPlatformService, loanTransactionRepository, loanChargePaidByReadService, loanTransactionRelationReadService,
loanForeclosureValidator, loanTransactionMapper, loanMapper, loanTransactionProcessingService);
loanForeclosureValidator, loanTransactionMapper, loanTransactionProcessingService);
}
@Bean