[ 
https://issues.apache.org/jira/browse/FINERACT-790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18123128#comment-18123128
 ] 

Shwetan Londhe edited comment on FINERACT-790 at 10/4/26 12:00 PM:
-------------------------------------------------------------------

Hi all, cc:[~pnyota] , [~adamsaghy] 

I tested FINERACT-790 (double journal entry on undo disbursal, then re-disburse 
to savings) on current develop and the issue no longer occurs. I think the 
ticket can be closed if others agree.

Tested on: commit 583575d2aa7e1c692d7bebfaa9af67177df1f573, 1.16.0-SNAPSHOT, 
Windows, fresh DB, cash-based accounting (accountingRule 2) on both loan and 
savings products, loan linked to a savings account.

Steps: disburseToSavings (10,000) -> undoDisbursal -> disburseToSavings again, 
then GET /journalentries (unfiltered).

Result: the second disbursal added only its own 4 entries (ids 11-14, new 
transaction ids L5 and S2). Nothing was added to the reversed first disbursal 
(L3, S1).

*Snapshot A* (after undo, 8 rows; glAccountId 1 = asset, 2 = liability):
{code:json}
[
{"id":3,"glAccountId":1,"entryType":"DEBIT","amount":10000,"transactionId":"L3","reversed":false},
{"id":4,"glAccountId":2,"entryType":"CREDIT","amount":10000,"transactionId":"L3","reversed":false},
{"id":5,"glAccountId":2,"entryType":"DEBIT","amount":10000,"transactionId":"S1","reversed":false},
{"id":6,"glAccountId":2,"entryType":"CREDIT","amount":10000,"transactionId":"S1","reversed":false},
{"id":7,"glAccountId":1,"entryType":"CREDIT","amount":10000,"transactionId":"L3","reversed":false},
{"id":8,"glAccountId":2,"entryType":"DEBIT","amount":10000,"transactionId":"L3","reversed":false},
{"id":9,"glAccountId":2,"entryType":"DEBIT","amount":10000,"transactionId":"S1","reversed":false},
{"id":10,"glAccountId":2,"entryType":"CREDIT","amount":10000,"transactionId":"S1","reversed":false}
]
{code}

*Snapshot B* (after second disbursal, 12 rows): the 8 rows above, plus:
{code:json}
[
{"id":11,"glAccountId":1,"entryType":"DEBIT","amount":10000,"transactionId":"L5","reversed":false},
{"id":12,"glAccountId":2,"entryType":"CREDIT","amount":10000,"transactionId":"L5","reversed":false},
{"id":13,"glAccountId":2,"entryType":"DEBIT","amount":10000,"transactionId":"S2","reversed":false},
{"id":14,"glAccountId":2,"entryType":"CREDIT","amount":10000,"transactionId":"S2","reversed":false}
]
{code}
(Trimmed to key fields; other fields of each row are unchanged between 
snapshots. Full responses: <LINK TO GIST/PASTEBIN>.)

*Not covered:*
* Accrual-based accounting (only cash-based tested)
* Multi-tranche loans, charges, other dates
* The savings reversal rows (S1, ids 9-10) use the same liability account as 
the originals, so their direction can't be told from the rows; I checked row 
counts and transaction ids instead

If someone has a configuration where it still happens, please share it and I'll 
retest. Otherwise I think this can be resolved.


was (Author: JIRAUSER314769):
Hi all, cc:[~pnyota] , [~adamsaghy] 

I tested FINERACT-790 (double journal entry on undo disbursal, then re-disburse 
to savings) on current develop and the issue no longer occurs. I think the 
ticket can be closed if others agree.

Tested on: commit 583575d2aa7e1c692d7bebfaa9af67177df1f573, 1.16.0-SNAPSHOT, 
Windows, fresh DB, cash-based accounting (accountingRule 2) on both loan and 
savings products, loan linked to a savings account.

Steps: disburseToSavings (10,000) -> undoDisbursal -> disburseToSavings again, 
then GET /journalentries (unfiltered).

Result: the second disbursal added only its own 4 entries (ids 11-14, new 
transaction ids L5 and S2). Nothing was added to the reversed first disbursal 
(L3, S1).

Snapshot A (after undo, 8 rows). glAccountId 1 = asset, 2 = liability:
{
    "totalFilteredRecords": 8,
    "pageItems": [
        {
            "id": 3,
            "officeId": 1,
            "officeName": "Head Office",
            "glAccountName": "Test Asset",
            "glAccountId": 1,
            "glAccountCode": "A100",
            "glAccountType": {
                "id": 1,
                "code": "accountType.asset",
                "value": "ASSET"
            },
            "transactionDate": [
                2026,
                10,
                1
            ],
            "entryType": {
                "id": 2,
                "code": "journalEntrytType.debit",
                "value": "DEBIT"
            },
            "amount": 10000.000000,
            "currency": {
                "code": "USD",
                "name": "US Dollar",
                "decimalPlaces": 2,
                "displaySymbol": "$",
                "nameCode": "currency.USD",
                "displayLabel": "US Dollar ($)"
            },
            "transactionId": "L3",
            "manualEntry": false,
            "entityType": {
                "id": 1,
                "code": "productType.loan",
                "value": "LOAN"
            },
            "entityId": 1,
            "createdByUserId": 1,
            "createdDate": [
                2026,
                10,
                4
            ],
            "createdByUserName": "mifos",
            "reversed": false,
            "submittedOnDate": [
                2026,
                10,
                4
            ]
        },
        {
            "id": 4,
            "officeId": 1,
            "officeName": "Head Office",
            "glAccountName": "Test Liability",
            "glAccountId": 2,
            "glAccountCode": "L100",
            "glAccountType": {
                "id": 2,
                "code": "accountType.liability",
                "value": "LIABILITY"
            },
            "transactionDate": [
                2026,
                10,
                1
            ],
            "entryType": {
                "id": 1,
                "code": "journalEntryType.credit",
                "value": "CREDIT"
            },
            "amount": 10000.000000,
            "currency": {
                "code": "USD",
                "name": "US Dollar",
                "decimalPlaces": 2,
                "displaySymbol": "$",
                "nameCode": "currency.USD",
                "displayLabel": "US Dollar ($)"
            },
            "transactionId": "L3",
            "manualEntry": false,
            "entityType": {
                "id": 1,
                "code": "productType.loan",
                "value": "LOAN"
            },
            "entityId": 1,
            "createdByUserId": 1,
            "createdDate": [
                2026,
                10,
                4
            ],
            "createdByUserName": "mifos",
            "reversed": false,
            "submittedOnDate": [
                2026,
                10,
                4
            ]
        },
        {
            "id": 5,
            "officeId": 1,
            "officeName": "Head Office",
            "glAccountName": "Test Liability",
            "glAccountId": 2,
            "glAccountCode": "L100",
            "glAccountType": {
                "id": 2,
                "code": "accountType.liability",
                "value": "LIABILITY"
            },
            "transactionDate": [
                2026,
                10,
                1
            ],
            "entryType": {
                "id": 2,
                "code": "journalEntrytType.debit",
                "value": "DEBIT"
            },
            "amount": 10000.000000,
            "currency": {
                "code": "USD",
                "name": "US Dollar",
                "decimalPlaces": 2,
                "displaySymbol": "$",
                "nameCode": "currency.USD",
                "displayLabel": "US Dollar ($)"
            },
            "transactionId": "S1",
            "manualEntry": false,
            "entityType": {
                "id": 2,
                "code": "productType.saving",
                "value": "SAVING"
            },
            "entityId": 1,
            "createdByUserId": 1,
            "createdDate": [
                2026,
                10,
                4
            ],
            "createdByUserName": "mifos",
            "reversed": false,
            "submittedOnDate": [
                2026,
                10,
                4
            ]
        },
        {
            "id": 6,
            "officeId": 1,
            "officeName": "Head Office",
            "glAccountName": "Test Liability",
            "glAccountId": 2,
            "glAccountCode": "L100",
            "glAccountType": {
                "id": 2,
                "code": "accountType.liability",
                "value": "LIABILITY"
            },
            "transactionDate": [
                2026,
                10,
                1
            ],
            "entryType": {
                "id": 1,
                "code": "journalEntryType.credit",
                "value": "CREDIT"
            },
            "amount": 10000.000000,
            "currency": {
                "code": "USD",
                "name": "US Dollar",
                "decimalPlaces": 2,
                "displaySymbol": "$",
                "nameCode": "currency.USD",
                "displayLabel": "US Dollar ($)"
            },
            "transactionId": "S1",
            "manualEntry": false,
            "entityType": {
                "id": 2,
                "code": "productType.saving",
                "value": "SAVING"
            },
            "entityId": 1,
            "createdByUserId": 1,
            "createdDate": [
                2026,
                10,
                4
            ],
            "createdByUserName": "mifos",
            "reversed": false,
            "submittedOnDate": [
                2026,
                10,
                4
            ]
        },
        {
            "id": 7,
            "officeId": 1,
            "officeName": "Head Office",
            "glAccountName": "Test Asset",
            "glAccountId": 1,
            "glAccountCode": "A100",
            "glAccountType": {
                "id": 1,
                "code": "accountType.asset",
                "value": "ASSET"
            },
            "transactionDate": [
                2026,
                10,
                1
            ],
            "entryType": {
                "id": 1,
                "code": "journalEntryType.credit",
                "value": "CREDIT"
            },
            "amount": 10000.000000,
            "currency": {
                "code": "USD",
                "name": "US Dollar",
                "decimalPlaces": 2,
                "displaySymbol": "$",
                "nameCode": "currency.USD",
                "displayLabel": "US Dollar ($)"
            },
            "transactionId": "L3",
            "manualEntry": false,
            "entityType": {
                "id": 1,
                "code": "productType.loan",
                "value": "LOAN"
            },
            "entityId": 1,
            "createdByUserId": 1,
            "createdDate": [
                2026,
                10,
                4
            ],
            "createdByUserName": "mifos",
            "reversed": false,
            "submittedOnDate": [
                2026,
                10,
                4
            ]
        },
        {
            "id": 8,
            "officeId": 1,
            "officeName": "Head Office",
            "glAccountName": "Test Liability",
            "glAccountId": 2,
            "glAccountCode": "L100",
            "glAccountType": {
                "id": 2,
                "code": "accountType.liability",
                "value": "LIABILITY"
            },
            "transactionDate": [
                2026,
                10,
                1
            ],
            "entryType": {
                "id": 2,
                "code": "journalEntrytType.debit",
                "value": "DEBIT"
            },
            "amount": 10000.000000,
            "currency": {
                "code": "USD",
                "name": "US Dollar",
                "decimalPlaces": 2,
                "displaySymbol": "$",
                "nameCode": "currency.USD",
                "displayLabel": "US Dollar ($)"
            },
            "transactionId": "L3",
            "manualEntry": false,
            "entityType": {
                "id": 1,
                "code": "productType.loan",
                "value": "LOAN"
            },
            "entityId": 1,
            "createdByUserId": 1,
            "createdDate": [
                2026,
                10,
                4
            ],
            "createdByUserName": "mifos",
            "reversed": false,
            "submittedOnDate": [
                2026,
                10,
                4
            ]
        },
        {
            "id": 9,
            "officeId": 1,
            "officeName": "Head Office",
            "glAccountName": "Test Liability",
            "glAccountId": 2,
            "glAccountCode": "L100",
            "glAccountType": {
                "id": 2,
                "code": "accountType.liability",
                "value": "LIABILITY"
            },
            "transactionDate": [
                2026,
                10,
                1
            ],
            "entryType": {
                "id": 2,
                "code": "journalEntrytType.debit",
                "value": "DEBIT"
            },
            "amount": 10000.000000,
            "currency": {
                "code": "USD",
                "name": "US Dollar",
                "decimalPlaces": 2,
                "displaySymbol": "$",
                "nameCode": "currency.USD",
                "displayLabel": "US Dollar ($)"
            },
            "transactionId": "S1",
            "manualEntry": false,
            "entityType": {
                "id": 2,
                "code": "productType.saving",
                "value": "SAVING"
            },
            "entityId": 1,
            "createdByUserId": 1,
            "createdDate": [
                2026,
                10,
                4
            ],
            "createdByUserName": "mifos",
            "reversed": false,
            "submittedOnDate": [
                2026,
                10,
                4
            ]
        },
        {
            "id": 10,
            "officeId": 1,
            "officeName": "Head Office",
            "glAccountName": "Test Liability",
            "glAccountId": 2,
            "glAccountCode": "L100",
            "glAccountType": {
                "id": 2,
                "code": "accountType.liability",
                "value": "LIABILITY"
            },
            "transactionDate": [
                2026,
                10,
                1
            ],
            "entryType": {
                "id": 1,
                "code": "journalEntryType.credit",
                "value": "CREDIT"
            },
            "amount": 10000.000000,
            "currency": {
                "code": "USD",
                "name": "US Dollar",
                "decimalPlaces": 2,
                "displaySymbol": "$",
                "nameCode": "currency.USD",
                "displayLabel": "US Dollar ($)"
            },
            "transactionId": "S1",
            "manualEntry": false,
            "entityType": {
                "id": 2,
                "code": "productType.saving",
                "value": "SAVING"
            },
            "entityId": 1,
            "createdByUserId": 1,
            "createdDate": [
                2026,
                10,
                4
            ],
            "createdByUserName": "mifos",
            "reversed": false,
            "submittedOnDate": [
                2026,
                10,
                4
            ]
        }
    ]
}


Snapshot B (after second disbursal, 12 rows): the 8 rows above, plus:
{
    "totalFilteredRecords": 12,
    "pageItems": [
        {
            "id": 3,
            "officeId": 1,
            "officeName": "Head Office",
            "glAccountName": "Test Asset",
            "glAccountId": 1,
            "glAccountCode": "A100",
            "glAccountType": {
                "id": 1,
                "code": "accountType.asset",
                "value": "ASSET"
            },
            "transactionDate": [
                2026,
                10,
                1
            ],
            "entryType": {
                "id": 2,
                "code": "journalEntrytType.debit",
                "value": "DEBIT"
            },
            "amount": 10000.000000,
            "currency": {
                "code": "USD",
                "name": "US Dollar",
                "decimalPlaces": 2,
                "displaySymbol": "$",
                "nameCode": "currency.USD",
                "displayLabel": "US Dollar ($)"
            },
            "transactionId": "L3",
            "manualEntry": false,
            "entityType": {
                "id": 1,
                "code": "productType.loan",
                "value": "LOAN"
            },
            "entityId": 1,
            "createdByUserId": 1,
            "createdDate": [
                2026,
                10,
                4
            ],
            "createdByUserName": "mifos",
            "reversed": false,
            "submittedOnDate": [
                2026,
                10,
                4
            ]
        },
        {
            "id": 4,
            "officeId": 1,
            "officeName": "Head Office",
            "glAccountName": "Test Liability",
            "glAccountId": 2,
            "glAccountCode": "L100",
            "glAccountType": {
                "id": 2,
                "code": "accountType.liability",
                "value": "LIABILITY"
            },
            "transactionDate": [
                2026,
                10,
                1
            ],
            "entryType": {
                "id": 1,
                "code": "journalEntryType.credit",
                "value": "CREDIT"
            },
            "amount": 10000.000000,
            "currency": {
                "code": "USD",
                "name": "US Dollar",
                "decimalPlaces": 2,
                "displaySymbol": "$",
                "nameCode": "currency.USD",
                "displayLabel": "US Dollar ($)"
            },
            "transactionId": "L3",
            "manualEntry": false,
            "entityType": {
                "id": 1,
                "code": "productType.loan",
                "value": "LOAN"
            },
            "entityId": 1,
            "createdByUserId": 1,
            "createdDate": [
                2026,
                10,
                4
            ],
            "createdByUserName": "mifos",
            "reversed": false,
            "submittedOnDate": [
                2026,
                10,
                4
            ]
        },
        {
            "id": 5,
            "officeId": 1,
            "officeName": "Head Office",
            "glAccountName": "Test Liability",
            "glAccountId": 2,
            "glAccountCode": "L100",
            "glAccountType": {
                "id": 2,
                "code": "accountType.liability",
                "value": "LIABILITY"
            },
            "transactionDate": [
                2026,
                10,
                1
            ],
            "entryType": {
                "id": 2,
                "code": "journalEntrytType.debit",
                "value": "DEBIT"
            },
            "amount": 10000.000000,
            "currency": {
                "code": "USD",
                "name": "US Dollar",
                "decimalPlaces": 2,
                "displaySymbol": "$",
                "nameCode": "currency.USD",
                "displayLabel": "US Dollar ($)"
            },
            "transactionId": "S1",
            "manualEntry": false,
            "entityType": {
                "id": 2,
                "code": "productType.saving",
                "value": "SAVING"
            },
            "entityId": 1,
            "createdByUserId": 1,
            "createdDate": [
                2026,
                10,
                4
            ],
            "createdByUserName": "mifos",
            "reversed": false,
            "submittedOnDate": [
                2026,
                10,
                4
            ]
        },
        {
            "id": 6,
            "officeId": 1,
            "officeName": "Head Office",
            "glAccountName": "Test Liability",
            "glAccountId": 2,
            "glAccountCode": "L100",
            "glAccountType": {
                "id": 2,
                "code": "accountType.liability",
                "value": "LIABILITY"
            },
            "transactionDate": [
                2026,
                10,
                1
            ],
            "entryType": {
                "id": 1,
                "code": "journalEntryType.credit",
                "value": "CREDIT"
            },
            "amount": 10000.000000,
            "currency": {
                "code": "USD",
                "name": "US Dollar",
                "decimalPlaces": 2,
                "displaySymbol": "$",
                "nameCode": "currency.USD",
                "displayLabel": "US Dollar ($)"
            },
            "transactionId": "S1",
            "manualEntry": false,
            "entityType": {
                "id": 2,
                "code": "productType.saving",
                "value": "SAVING"
            },
            "entityId": 1,
            "createdByUserId": 1,
            "createdDate": [
                2026,
                10,
                4
            ],
            "createdByUserName": "mifos",
            "reversed": false,
            "submittedOnDate": [
                2026,
                10,
                4
            ]
        },
        {
            "id": 7,
            "officeId": 1,
            "officeName": "Head Office",
            "glAccountName": "Test Asset",
            "glAccountId": 1,
            "glAccountCode": "A100",
            "glAccountType": {
                "id": 1,
                "code": "accountType.asset",
                "value": "ASSET"
            },
            "transactionDate": [
                2026,
                10,
                1
            ],
            "entryType": {
                "id": 1,
                "code": "journalEntryType.credit",
                "value": "CREDIT"
            },
            "amount": 10000.000000,
            "currency": {
                "code": "USD",
                "name": "US Dollar",
                "decimalPlaces": 2,
                "displaySymbol": "$",
                "nameCode": "currency.USD",
                "displayLabel": "US Dollar ($)"
            },
            "transactionId": "L3",
            "manualEntry": false,
            "entityType": {
                "id": 1,
                "code": "productType.loan",
                "value": "LOAN"
            },
            "entityId": 1,
            "createdByUserId": 1,
            "createdDate": [
                2026,
                10,
                4
            ],
            "createdByUserName": "mifos",
            "reversed": false,
            "submittedOnDate": [
                2026,
                10,
                4
            ]
        },
        {
            "id": 8,
            "officeId": 1,
            "officeName": "Head Office",
            "glAccountName": "Test Liability",
            "glAccountId": 2,
            "glAccountCode": "L100",
            "glAccountType": {
                "id": 2,
                "code": "accountType.liability",
                "value": "LIABILITY"
            },
            "transactionDate": [
                2026,
                10,
                1
            ],
            "entryType": {
                "id": 2,
                "code": "journalEntrytType.debit",
                "value": "DEBIT"
            },
            "amount": 10000.000000,
            "currency": {
                "code": "USD",
                "name": "US Dollar",
                "decimalPlaces": 2,
                "displaySymbol": "$",
                "nameCode": "currency.USD",
                "displayLabel": "US Dollar ($)"
            },
            "transactionId": "L3",
            "manualEntry": false,
            "entityType": {
                "id": 1,
                "code": "productType.loan",
                "value": "LOAN"
            },
            "entityId": 1,
            "createdByUserId": 1,
            "createdDate": [
                2026,
                10,
                4
            ],
            "createdByUserName": "mifos",
            "reversed": false,
            "submittedOnDate": [
                2026,
                10,
                4
            ]
        },
        {
            "id": 9,
            "officeId": 1,
            "officeName": "Head Office",
            "glAccountName": "Test Liability",
            "glAccountId": 2,
            "glAccountCode": "L100",
            "glAccountType": {
                "id": 2,
                "code": "accountType.liability",
                "value": "LIABILITY"
            },
            "transactionDate": [
                2026,
                10,
                1
            ],
            "entryType": {
                "id": 2,
                "code": "journalEntrytType.debit",
                "value": "DEBIT"
            },
            "amount": 10000.000000,
            "currency": {
                "code": "USD",
                "name": "US Dollar",
                "decimalPlaces": 2,
                "displaySymbol": "$",
                "nameCode": "currency.USD",
                "displayLabel": "US Dollar ($)"
            },
            "transactionId": "S1",
            "manualEntry": false,
            "entityType": {
                "id": 2,
                "code": "productType.saving",
                "value": "SAVING"
            },
            "entityId": 1,
            "createdByUserId": 1,
            "createdDate": [
                2026,
                10,
                4
            ],
            "createdByUserName": "mifos",
            "reversed": false,
            "submittedOnDate": [
                2026,
                10,
                4
            ]
        },
        {
            "id": 10,
            "officeId": 1,
            "officeName": "Head Office",
            "glAccountName": "Test Liability",
            "glAccountId": 2,
            "glAccountCode": "L100",
            "glAccountType": {
                "id": 2,
                "code": "accountType.liability",
                "value": "LIABILITY"
            },
            "transactionDate": [
                2026,
                10,
                1
            ],
            "entryType": {
                "id": 1,
                "code": "journalEntryType.credit",
                "value": "CREDIT"
            },
            "amount": 10000.000000,
            "currency": {
                "code": "USD",
                "name": "US Dollar",
                "decimalPlaces": 2,
                "displaySymbol": "$",
                "nameCode": "currency.USD",
                "displayLabel": "US Dollar ($)"
            },
            "transactionId": "S1",
            "manualEntry": false,
            "entityType": {
                "id": 2,
                "code": "productType.saving",
                "value": "SAVING"
            },
            "entityId": 1,
            "createdByUserId": 1,
            "createdDate": [
                2026,
                10,
                4
            ],
            "createdByUserName": "mifos",
            "reversed": false,
            "submittedOnDate": [
                2026,
                10,
                4
            ]
        },
        {
            "id": 11,
            "officeId": 1,
            "officeName": "Head Office",
            "glAccountName": "Test Asset",
            "glAccountId": 1,
            "glAccountCode": "A100",
            "glAccountType": {
                "id": 1,
                "code": "accountType.asset",
                "value": "ASSET"
            },
            "transactionDate": [
                2026,
                10,
                1
            ],
            "entryType": {
                "id": 2,
                "code": "journalEntrytType.debit",
                "value": "DEBIT"
            },
            "amount": 10000.000000,
            "currency": {
                "code": "USD",
                "name": "US Dollar",
                "decimalPlaces": 2,
                "displaySymbol": "$",
                "nameCode": "currency.USD",
                "displayLabel": "US Dollar ($)"
            },
            "transactionId": "L5",
            "manualEntry": false,
            "entityType": {
                "id": 1,
                "code": "productType.loan",
                "value": "LOAN"
            },
            "entityId": 1,
            "createdByUserId": 1,
            "createdDate": [
                2026,
                10,
                4
            ],
            "createdByUserName": "mifos",
            "reversed": false,
            "submittedOnDate": [
                2026,
                10,
                4
            ]
        },
        {
            "id": 12,
            "officeId": 1,
            "officeName": "Head Office",
            "glAccountName": "Test Liability",
            "glAccountId": 2,
            "glAccountCode": "L100",
            "glAccountType": {
                "id": 2,
                "code": "accountType.liability",
                "value": "LIABILITY"
            },
            "transactionDate": [
                2026,
                10,
                1
            ],
            "entryType": {
                "id": 1,
                "code": "journalEntryType.credit",
                "value": "CREDIT"
            },
            "amount": 10000.000000,
            "currency": {
                "code": "USD",
                "name": "US Dollar",
                "decimalPlaces": 2,
                "displaySymbol": "$",
                "nameCode": "currency.USD",
                "displayLabel": "US Dollar ($)"
            },
            "transactionId": "L5",
            "manualEntry": false,
            "entityType": {
                "id": 1,
                "code": "productType.loan",
                "value": "LOAN"
            },
            "entityId": 1,
            "createdByUserId": 1,
            "createdDate": [
                2026,
                10,
                4
            ],
            "createdByUserName": "mifos",
            "reversed": false,
            "submittedOnDate": [
                2026,
                10,
                4
            ]
        },
        {
            "id": 13,
            "officeId": 1,
            "officeName": "Head Office",
            "glAccountName": "Test Liability",
            "glAccountId": 2,
            "glAccountCode": "L100",
            "glAccountType": {
                "id": 2,
                "code": "accountType.liability",
                "value": "LIABILITY"
            },
            "transactionDate": [
                2026,
                10,
                1
            ],
            "entryType": {
                "id": 2,
                "code": "journalEntrytType.debit",
                "value": "DEBIT"
            },
            "amount": 10000.000000,
            "currency": {
                "code": "USD",
                "name": "US Dollar",
                "decimalPlaces": 2,
                "displaySymbol": "$",
                "nameCode": "currency.USD",
                "displayLabel": "US Dollar ($)"
            },
            "transactionId": "S2",
            "manualEntry": false,
            "entityType": {
                "id": 2,
                "code": "productType.saving",
                "value": "SAVING"
            },
            "entityId": 1,
            "createdByUserId": 1,
            "createdDate": [
                2026,
                10,
                4
            ],
            "createdByUserName": "mifos",
            "reversed": false,
            "submittedOnDate": [
                2026,
                10,
                4
            ]
        },
        {
            "id": 14,
            "officeId": 1,
            "officeName": "Head Office",
            "glAccountName": "Test Liability",
            "glAccountId": 2,
            "glAccountCode": "L100",
            "glAccountType": {
                "id": 2,
                "code": "accountType.liability",
                "value": "LIABILITY"
            },
            "transactionDate": [
                2026,
                10,
                1
            ],
            "entryType": {
                "id": 1,
                "code": "journalEntryType.credit",
                "value": "CREDIT"
            },
            "amount": 10000.000000,
            "currency": {
                "code": "USD",
                "name": "US Dollar",
                "decimalPlaces": 2,
                "displaySymbol": "$",
                "nameCode": "currency.USD",
                "displayLabel": "US Dollar ($)"
            },
            "transactionId": "S2",
            "manualEntry": false,
            "entityType": {
                "id": 2,
                "code": "productType.saving",
                "value": "SAVING"
            },
            "entityId": 1,
            "createdByUserId": 1,
            "createdDate": [
                2026,
                10,
                4
            ],
            "createdByUserName": "mifos",
            "reversed": false,
            "submittedOnDate": [
                2026,
                10,
                4
            ]
        }
    ]
}

Not covered:
- Accrual-based accounting (only cash-based tested)
- Multi-tranche loans, charges, other dates
- The savings reversal rows (S1, ids 9-10) use the same liability account as 
the originals, so their direction can't be distinguished from the rows; I 
checked row counts and transaction ids instead

If anyone has a configuration where it still happens, please share it and I'll 
retest.

Thanks,
Shwetan Londhe

> Double journal entry on reversal then post of disburse to savings.
> ------------------------------------------------------------------
>
>                 Key: FINERACT-790
>                 URL: https://issues.apache.org/jira/browse/FINERACT-790
>             Project: Apache Fineract
>          Issue Type: Bug
>          Components: Accounting, Loan
>    Affects Versions: 1.3.1, 1.8.0
>         Environment: All
>            Reporter: Nyota Macharia
>            Priority: Critical
>              Labels: beginner-friendly, p1
>
> First apply for loan and link savings account. Then disburse the loan to 
> savings. Reverse the disbursal then disburse again. The implication during 
> the second disbursal is that journal entries for the first (reversed) 
> disbursal will be recreated hence making it a double entry.



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

Reply via email to