You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by "adamsaghy (via GitHub)" <gi...@apache.org> on 2023/04/03 14:15:56 UTC

[GitHub] [fineract] adamsaghy commented on a diff in pull request #3090: FINERACT-1724-Last-repayment-amount-date-closed-overpaid-loans

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


##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanBusinessEventSerializer.java:
##########
@@ -68,6 +68,9 @@ protected <T> ByteBufferSerializable toAvroDTO(BusinessEvent<T> rawEvent) {
         if (data.isActive()) {
             CollectionData delinquentData = delinquencyReadPlatformService.calculateLoanCollectionData(loanId);
             data.setDelinquent(delinquentData);
+        } else {
+            CollectionData delinquentData = delinquencyReadPlatformService.retrieveLoanLastRepaymentData(loanId);

Review Comment:
   Why to not use the `delinquencyReadPlatformService.calculateLoanCollectionData` here as well?



##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanBusinessEventSerializer.java:
##########
@@ -68,6 +68,9 @@ protected <T> ByteBufferSerializable toAvroDTO(BusinessEvent<T> rawEvent) {
         if (data.isActive()) {
             CollectionData delinquentData = delinquencyReadPlatformService.calculateLoanCollectionData(loanId);
             data.setDelinquent(delinquentData);
+        } else {
+            CollectionData delinquentData = delinquencyReadPlatformService.retrieveLoanLastRepaymentData(loanId);

Review Comment:
   Why not to use the `delinquencyReadPlatformService.calculateLoanCollectionData` here as well?



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