adamsaghy commented on code in PR #2609:
URL: https://github.com/apache/fineract/pull/2609#discussion_r980174059
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java:
##########
@@ -869,6 +873,20 @@ public CommandProcessingResult undoLoanDisbursal(final
Long loanId, final JsonCo
final Map<String, Object> accountingBridgeData =
loan.deriveAccountingBridgeData(currency.getCode(), existingTransactionIds,
existingReversedTransactionIds, isAccountTransfer);
journalEntryWritePlatformService.createJournalEntriesForLoan(accountingBridgeData);
+
+ // Remove All the Disbursement Details If the Loan Product is
disabled and exists one
+ if (loan.loanProduct().isDisallowExpectedDisbursements()) {
Review Comment:
If we have multiple disbursement details and the loan is not getting back to
approved (by undoing the latest disbursement) i dont think it is a good idea to
remove all of the entries.
--
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]