adamsaghy commented on code in PR #3269:
URL: https://github.com/apache/fineract/pull/3269#discussion_r1238589085


##########
fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersWriteServiceImpl.java:
##########
@@ -150,6 +170,27 @@ private ExternalAssetOwnerTransfer 
fetchAndValidateEffectiveTransferForBuyback(f
         return effectiveTransfers.get(0);
     }
 
+    private ExternalAssetOwnerTransfer 
fetchAndValidateEffectiveTransferForCancel(final Long transferId) {
+        ExternalAssetOwnerTransfer selectedTransfer = 
externalAssetOwnerTransferRepository.findById(transferId)
+                .orElseThrow(() -> new 
ExternalAssetOwnerInitiateTransferException(
+                        String.format("This loan cannot be cancel, transfer 
with id %s does not exist", transferId)));
+
+        List<ExternalAssetOwnerTransfer> effective = 
externalAssetOwnerTransferRepository
+                .findEffectiveTransfers(selectedTransfer.getLoanId(), 
selectedTransfer.getSettlementDate());

Review Comment:
   Should it find the effective transfer by the actual business date rather?



-- 
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]

Reply via email to