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


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualWritePlatformServiceImpl.java:
##########
@@ -385,10 +385,9 @@ private void 
updateChargeForSubmittedOnDate(Collection<LoanChargeData> chargesDa
         LocalDate scheduleEndDate = accrualData.getDueDateAsLocaldate();
         for (LoanChargeData loanCharge : chargesData) {
             BigDecimal chargeAmount = BigDecimal.ZERO;
-            if (((accrualData.getInstallmentNumber() == 1 && 
loanCharge.getSubmittedOnDate().isEqual(startDate))
-                    || loanCharge.getSubmittedOnDate().isBefore(startDate) || 
loanCharge.getSubmittedOnDate().isEqual(startDate)
-                    || loanCharge.getSubmittedOnDate().isAfter(startDate)) && 
!loanCharge.getSubmittedOnDate().isAfter(endDate)
-                    && !loanCharge.getDueDate().isBefore(startDate) && 
!loanCharge.getDueDate().isAfter(scheduleEndDate)) {
+            if (((accrualData.getInstallmentNumber() == 1 && 
loanCharge.getSubmittedOnDate().isEqual(startDate)

Review Comment:
   I am still a little confused.
   **Based on the condition here**:
   if it is the first installment AND the submitted on date is equals with 
installment start date AND the due date of the charge is equals with the start 
date 
   OR it is after the start date of installment period 
   AND the submitted on date is before or equals with end date of installment 
AND due date is before or equals with **schedule end date** (not with 
installment end date)
   
   **If the accrual calculation is based on due date the condition is the 
following:**
   if it is the first installment AND due date is equals with start date
   OR
   due date is after the start date AND before or equals with installment end 
date 
   
   Can you help me to understand the why does it need to be different and if 
the above conditions are right, then please help me to get understand it 
further?



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