ruchiD commented on code in PR #3515:
URL: https://github.com/apache/fineract/pull/3515#discussion_r1373347809


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/delinquency/service/LoanDelinquencyDomainServiceImpl.java:
##########
@@ -139,8 +167,114 @@ public CollectionData getOverdueCollectionData(final Loan 
loan) {
         if (delinquentDays > 0) {
             collectionData.setDelinquentDays(delinquentDays);
         }
+        return new LoanDelinquencyData(collectionData, 
loanInstallmentsCollectionData);
+    }
 
-        log.debug("Result: {}", collectionData.toString());
+    private CollectionData getInstallmentOverdueCollectionData(final Loan 
loan, final LoanRepaymentScheduleInstallment installment) {

Review Comment:
   Merged logic of calculation loan and installments delinquency into one 
method -> getLoanDelinquencyData,
   
   In this method iterating to all loan installments and calculating 
delinquency for each installment in ->getInstallmentOverdueCollectionData 
   
   If installment is not paid 
   
   checking that
   [1] If installment is overdue calculating delinquent data with considering 
any chargeback transactions  in -> 
calculateDelinquencyDataForOverdueInstallment method
   [2[ If installment is not overdue calculating delinquent data if there is 
chargeback transaction before installment due date and current business date in 
->calculateDelinquencyDataForNonOverdueInstallment method
   
   If installment is paid setting delinquent days as 0. 
   
   Adding installments delinquency calculation to final calculation data if 
configured.
   
   For calculating loan delinquency taking overdueSince date for oldest overdue 
installment or first non due installment with chargeback transaction which is 
before installment due date and current business date.
   
   
   getLoanDelinquencyData returns LoanDelinquencyData which has 
loanCollectionData and map of installment Collection Data.



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