Balance unbalance due to rounding value

SOLVED

Hello everyone,

I encountered a balance unbalance error while running the CLOPER report. Upon investigation into the database and journal entries, I discovered that the rounding value was incorrectly allocated to the debit side instead of the credit side, resulting in an imbalance in the ledger currency.

Example:

Expected result:
Debit: 1000
Credit: 999
Credit: 1 (Rounding value)

Current:
Debit: 1000
Credit: 999
Debit: 1 (Rounding value)

I managed to resolve this issue by modifying the journal, but I'm still unsure about the root cause behind the rounding value being allocated to the wrong side.

Thank you all in advance for any insights you can provide!