You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by "taskain7 (via GitHub)" <gi...@apache.org> on 2023/09/12 06:00:18 UTC
[GitHub] [fineract] taskain7 opened a new pull request, #3449: [FINERACT-1958] Business events for down payment installments
taskain7 opened a new pull request, #3449:
URL: https://github.com/apache/fineract/pull/3449
## Description
Installment data in events include if the isntallment is down payment.
LoanTransactionEvenet is raised on auto payment on down paymnet.
API changes if the installment is down payment.
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [fineract] adamsaghy merged pull request #3449: [FINERACT-1958] Business events for down payment installments
Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy merged PR #3449:
URL: https://github.com/apache/fineract/pull/3449
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [fineract] adamsaghy commented on a diff in pull request #3449: [FINERACT-1958] Business events for down payment installments
Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on code in PR #3449:
URL: https://github.com/apache/fineract/pull/3449#discussion_r1325935247
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainServiceJpa.java:
##########
@@ -313,7 +311,7 @@ private LoanTransactionBusinessEvent getTransactionRepaymentTypeBusinessEvent(Lo
} else if (isRecoveryRepayment) {
repaymentEvent = new LoanTransactionRecoveryPaymentPostBusinessEvent(transaction);
} else if (repaymentTransactionType.isDownPayment()) {
- repaymentEvent = new LoanTransactionDownPaymentPostBusinessEvent(transaction);
+ repaymentEvent = new LoanTransactionMakeRepaymentPostBusinessEvent(transaction);
Review Comment:
Are you sure? we dont wanna trigger downpayment business event for downpayment transaction?
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainServiceJpa.java:
##########
@@ -292,7 +290,7 @@ private LoanBusinessEvent getLoanRepaymentTypeBusinessEvent(LoanTransactionType
} else if (isRecoveryRepayment) {
repaymentEvent = new LoanTransactionRecoveryPaymentPreBusinessEvent(loan);
} else if (repaymentTransactionType.isDownPayment()) {
- repaymentEvent = new LoanTransactionDownPaymentPreBusinessEvent(loan);
+ repaymentEvent = new LoanTransactionMakeRepaymentPreBusinessEvent(loan);
Review Comment:
Are you sure? we dont wanna trigger downpayment business event for downpayment transaction?
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java:
##########
@@ -456,7 +458,14 @@ public CommandProcessingResult disburseLoan(final Long loanId, final JsonCommand
changedTransactionDetail = loan.disburse(currentUser, command, changes, scheduleGeneratorDTO, null, downPaymentEnabled);
}
loan.adjustNetDisbursalAmount(amountToDisburse.getAmount());
- loan.handleDownPayment(amountToDisburse.getAmount(), command, scheduleGeneratorDTO);
+ if (loan.isAutoRepaymentForDownPaymentEnabled()) {
+ businessEventNotifierService.notifyPreBusinessEvent(new LoanTransactionMakeRepaymentPreBusinessEvent(loan));
+ LoanTransaction downPaymentTransaction = loan.handleDownPayment(amountToDisburse.getAmount(), command,
+ scheduleGeneratorDTO);
+ businessEventNotifierService
+ .notifyPostBusinessEvent(new LoanTransactionMakeRepaymentPostBusinessEvent(downPaymentTransaction));
Review Comment:
Are you sure? we dont wanna trigger downpayment business event for downpayment transaction?
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org