budaidev commented on PR #6283:
URL: https://github.com/apache/fineract/pull/6283#issuecomment-5579127086

   > I think only one gap remained:
   > 
   > WorkingCapitalLoanBreachScheduleServiceImpl.java:346: restoreSplitPeriod 
derives the pre-split end as calculateToDate(...) + graceDays for period 1, but 
fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/service/WorkingCapitalLoanBreachScheduleServiceImpl.java:297
 — which runs on every PAUSE/RESUME — re-dates period 1 without grace days. On 
a loan with breachGraceDays > 0 that has ever been paused, the undo restores 
the wrong boundary. Probe over the PR's own harness (grace 3, freq 60, pause 
02-10..02-14): P1 stands at [01-01..03-06] (65 days), a restart reset on 02-20 
splits it correctly, and the undo restores [01-01..03-09] (68 days) instead of 
65 — every later boundary shifts by the grace days. Same mismatch defeats the 
new early-out at line 352: after that pause, a restart reset on P2's fromDate 
splits nothing (correctly), but the undo re-dates P1 and deletes P2 without 
regenerating it, leaving no period covering the business d
 ate — which contradicts the PR's own e2e scenario "Undo of a no-split restart 
reset is flag-only: schedule structure unchanged". The grace omission in 
recalculatePeriodsForPauses is pre-existing, but restoreSplitPeriod is new and 
depends on agreeing with it; both should compute the period end through one 
shared helper.
   
   Confirmed, reproduced with the numbers. Fixed the way you suggested: one 
private helper computes the natural period end. Test coverage has been added


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