# reverseJournalEntry

## Overview

Reverses a POSTED journal entry by creating a new POSTED entry whose debits and
credits mirror the original — the only correction mechanism for a posted entry. The
original stays POSTED for traceability, and the two are linked via `reversalOfId`.
The reversal posts to the original entry's period unless `reversalPeriodId` is given,
and the target period must be OPEN. Thin wrapper over the native `reverseJournalEntry`.

## Modules Commands Used

- [financial-accounting] reverseJournalEntry

## Exception Handling

| Error Code | Description |
| --- | --- |
| FINANCIAL_ACCOUNTING_JOURNAL_ENTRY_NOT_FOUND | The journal entry does not exist |
| FINANCIAL_ACCOUNTING_INVALID_STATUS_FOR_REVERSAL | The entry is not in POSTED status |
| FINANCIAL_ACCOUNTING_ALREADY_REVERSED | The entry has already been reversed |
| FINANCIAL_ACCOUNTING_INVALID_PERIOD_STATUS | The reversal's target accounting period is not OPEN |
