adamsaghy commented on PR #6579: URL: https://github.com/apache/fineract/pull/6579#issuecomment-6502774518
Checked this against the description: the open-cycle undo, reopening the previous cycle with only the undone amount outstanding, the `transaction.undo.recurring.charge.has.later.transactions` refusal, the waiver undo and the unchanged non-recurring path all behave as described. One interaction outside the description: charge inactivation can now fail with the new 400. `inactivateCharge` in `SavingsAccountWritePlatformServiceJpaRepositoryImpl` undoes the charge's "last" payment in a loop while the charge is paid ahead. `getLastChargePayment` takes the last entry of `account.getTransactions()`, which is ordered by `dateOf, createdDate, id`. `undoChargeTransaction` decides what came later by id. Weekly and monthly fee payments can be backdated (`payCharge` only rejects dates before activation or in the future), so the two orders can differ: - id1, dated Oct 20, pays 45 and closes cycle 1 - id2, dated Oct 10, pays 45 and closes cycle 2 Inactivation picks id1; id2 counts as paid afterwards (45, with 0 paid on the open cycle), so the undo is refused and the inactivation fails. Before this change that undo went through. Picking the highest id in `getLastChargePayment` would line the two up. Minor: the new unit tests cover `SavingsAccountCharge` only. The `paidAfterwards` calculation and the refusal in `SavingsAccount.undoChargeTransaction` aren't covered by a test. -- 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]
