mariiaKraievska commented on code in PR #4430:
URL: https://github.com/apache/fineract/pull/4430#discussion_r1984676400
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualActivityProcessingServiceImpl.java:
##########
@@ -207,14 +207,21 @@ private LoanTransaction
reverseReplayAccrualActivityTransaction(@NotNull Loan lo
newLoanTransaction.copyLoanTransactionRelations(loanTransaction.getLoanTransactionRelations());
newLoanTransaction.getLoanTransactionRelations().add(LoanTransactionRelation.linkToTransaction(newLoanTransaction,
loanTransaction,
LoanTransactionRelationTypeEnum.REPLAYED));
+
+
newLoanTransaction.updateExternalId(loanTransaction.getExternalId());
+ loanTransaction.reverse();
+ loanTransaction.updateExternalId(null);
+
loanAccountService.saveLoanTransactionWithDataIntegrityViolationChecks(loanTransaction);
+
loanAccountService.saveLoanTransactionWithDataIntegrityViolationChecks(newLoanTransaction);
loan.addLoanTransaction(newLoanTransaction);
LoanAdjustTransactionBusinessEvent.Data data = new
LoanAdjustTransactionBusinessEvent.Data(loanTransaction);
data.setNewTransactionDetail(newLoanTransaction);
businessEventNotifierService.notifyPostBusinessEvent(new
LoanAdjustTransactionBusinessEvent(data));
+ } else {
+ reverseAccrualActivityTransaction(loanTransaction);
Review Comment:
Shouldn't we also updateExternalId for loanTransaction in this method
(reverseAccrualActivityTransaction)?
--
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]