-
Notifications
You must be signed in to change notification settings - Fork 83
Bug: Revert transaction uses direct accounting entry code/description instead of revert block #2016
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
When creating a revert transaction that uses a transaction route with an operation route configured with both direct and revert accounting entries, the resulting operations incorrectly use the code and description from the direct block instead of the revert block.
Steps to Reproduce
- Create an operation route with
operationType: "bidirectional"and distinctdirectandrevertaccounting entries (with different code/description values to distinguish them) - Create a transaction using this route — works correctly (uses
directentries) - Revert the transaction
Expected Behavior
The revert transaction operations should use routeCode and routeDescription from the revert block of the operation route accounting entries.
For example, if the operation route defines:
"revert": {
"debit": {
"code": "4.1.9.50.01.01.00005",
"description": "Ordens de Pagamento em Moeda Nacional (revert)"
},
"credit": {
"code": "1.4.2.35.01.01.00005",
"description": "Banco Central - Outros Depósitos (revert)"
}
}The revert operations should reflect these values.
Actual Behavior
The revert transaction operations use the code and description from the direct block:
- Debit operation shows
routeCode: "1.4.2.35.01.01.00005"/routeDescription: "Banco Central - Outros Depósitos"(fromdirect.debit) - Credit operation shows
routeCode: "4.1.9.50.01.01.00005"/routeDescription: "Ordens de Pagamento em Moeda Nacional"(fromdirect.credit)
Impact
- Incorrect chart of accounts mapping on revert entries
- Financial reporting/reconciliation can be affected since revert operations carry wrong accounting metadata
Environment
- Midaz ledger v3.6.0-beta.112
- Reported by: Ops team (Lazari)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working