You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Adam Saghy (Jira)" <ji...@apache.org> on 2026/10/18 17:22:00 UTC

[jira] [Resolved] (FINERACT-2898) Charges submitted on the same day replay in creation order instead of due-date order

     [ https://issues.apache.org/jira/browse/FINERACT-2898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adam Saghy resolved FINERACT-2898.
----------------------------------
    Resolution: Fixed

> Charges submitted on the same day replay in creation order instead of due-date order
> ------------------------------------------------------------------------------------
>
>                 Key: FINERACT-2898
>                 URL: https://issues.apache.org/jira/browse/FINERACT-2898
>             Project: Apache Fineract
>          Issue Type: Bug
>          Components: Charges
>    Affects Versions: 1.16.0
>            Reporter: Piotr Wargulak
>            Assignee: Piotr Wargulak
>            Priority: Major
>             Fix For: 1.16.0
>
>
> On progressive loans, ChangeOperation#compareTo orders charges by effective date, then by submitted date, then by creation time. Two charges submitted on the same day therefore replay in creation order.
> When a payment made before that day is reprocessed, it is applied to those charges in that order. A charge due later can then be paid ahead of one due earlier. The order of rows in the loan's charge set is not meaningful, so the outcome can differ between otherwise identical loans.
> *Steps to reproduce:*
> # Create a progressive loan.
> # Add several specified-due-date fees on the same day, in an order different from their due dates.
> # Post an in-advance payment dated before that day.
> # Observe which fees it pays.
> *Proposed fix:* when both operations are charges with equal effective and submitted dates, compare their due dates (nulls last) before falling back to creation time. Add a unit test with charges created out of due-date order.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)