You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2022/09/26 15:15:11 UTC

[GitHub] [fineract] adamsaghy commented on a diff in pull request #2609: FINERACT-1724: Remove disbursement details in undo loan disbursal command

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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org