FINERACT-1724
- Fixing the order of disbursement and downpayment transactions
This commit is contained in:
committed by
Arnold Gálovics
parent
7370dfdc73
commit
f72f578d4b
+3
-2
@@ -436,6 +436,7 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
|
||||
actualDisbursementDate, txnExternalId);
|
||||
disbursementTransaction.updateLoan(loan);
|
||||
loan.addLoanTransaction(disbursementTransaction);
|
||||
LoanTransaction savedLoanTransaction = loanTransactionRepository.saveAndFlush(disbursementTransaction);
|
||||
}
|
||||
if (loan.getRepaymentScheduleInstallments().isEmpty()) {
|
||||
/*
|
||||
@@ -460,8 +461,8 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
|
||||
businessEventNotifierService.notifyPreBusinessEvent(new LoanTransactionDownPaymentPreBusinessEvent(loan));
|
||||
LoanTransaction downPaymentTransaction = loan.handleDownPayment(amountToDisburse.getAmount(), command,
|
||||
scheduleGeneratorDTO);
|
||||
businessEventNotifierService
|
||||
.notifyPostBusinessEvent(new LoanTransactionDownPaymentPostBusinessEvent(downPaymentTransaction));
|
||||
LoanTransaction savedLoanTransaction = loanTransactionRepository.saveAndFlush(downPaymentTransaction);
|
||||
businessEventNotifierService.notifyPostBusinessEvent(new LoanTransactionDownPaymentPostBusinessEvent(savedLoanTransaction));
|
||||
businessEventNotifierService.notifyPostBusinessEvent(new LoanBalanceChangedBusinessEvent(loan));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user