Skip to content

Reverse a Posted Session

If a Transaction Processor session was posted to the wrong entity, the wrong account, or simply needs to be undone, Kraal can rewind the entire session in a single action. Rewind walks every document the session created in ERPNext and reverses each one using the right mechanism for its document type. The original entries stay in the ledger; reversing entries net them to zero so the audit trail is preserved.

When to use rewind

  • You posted a bank statement under the wrong subsidiary (e.g. the Holdings parent instead of an operating company).
  • You posted invoices or bills against the wrong customer / supplier.
  • A batch of receipts ended up against the wrong expense account.

If you only need to fix a single line of a session, edit the entry directly in ERPNext or post a small adjusting journal entry. Rewind is for reversing the whole session.

Where to find Rewind

There are two places you can rewind a session, depending on which Transaction Processor layout your workspace is on.

In the redesigned layout (Zones)

URL: https://app.kraal.ai/transaction-processor (with the redesigned layout enabled)

  1. Scroll down to the Audit History table at the bottom of the page.
  2. Hover the row of the session you want to reverse. A Rewind link appears on the right alongside Open in ERP.
  3. Click Rewind. A confirmation modal opens with a preview of every document that will be reversed.

In the legacy layout

URL: https://app.kraal.ai/transaction-processor

  1. Open the session from the Recent Uploads list or the Processing History tab.
  2. In the posting actions sidebar (right of the session review), find View History.
  3. When the session has at least one posted document, a Rewind session button appears next to the Refresh button.
  4. Click Rewind session to open the confirmation modal.

The confirmation modal

The modal shows a per-document summary before anything is reversed:

FieldMeaning
TotalAll ERPNext documents this session produced.
ReversibleDocuments we can reverse automatically.
Period lockedDocuments whose posting date falls in a locked accounting period. These will be skipped.
Already reversedDocuments that have already been rewound — they will not be touched again.
Manual onlyDocument types that need a manual reversal in ERPNext (rare; mostly third-party doctypes).

Below the summary, every document is listed with:

  • The ERPNext doctype and document name (e.g. Journal Entry / KRL-JV-2024-04-001).
  • The posting date.
  • The reversal method that will be used (see Per-doctype reversal behavior below).
  • A status badge: Reversible, Locked, Done, or Manual.

Confirming the rewind

To prevent accidental reversal, the modal requires two things:

  1. A short Reason explaining why you are rewinding the session. This is stored on the audit trail.
  2. Typing the word REWIND in the confirmation field — case-insensitive.

Once both are present and there is at least one reversible document, the Rewind session button activates. Click it to execute the rewind.

Per-doctype reversal behavior

Kraal picks the right reversal mechanism per ERPNext document type:

DoctypeHow it's reversed
Journal EntryA new Journal Entry is posted with the original lines flipped (debits become credits and vice versa). The two entries net to zero. Both stay visible in ERPNext.
Sales InvoiceThe invoice is cancelled in ERPNext (docstatus = 2). Any payment entries linked to it are automatically unlinked.
Purchase InvoiceSame as Sales Invoice — cancelled in ERPNext, payment entries unlinked.
Payment EntryCancelled in ERPNext.
Bank TransactionCancelled and unlinked from any matched payments.
Anything elseFlagged as Manual in the preview. You will need to reverse it directly in ERPNext.

What happens after a successful rewind

  • The session is marked Rewound in the Audit History table. It moves to the Rewound tab automatically.
  • Each ERPNext document on the audit row links to its reversal entry. You can open both the original and the reversal in ERPNext for review.
  • The session can no longer be reversed a second time — repeated rewind attempts return "Already reversed" in the preview.
  • The execution feed records a session.rewound event with the actor and the reason you typed.

What can block a rewind

The rewind is safe to attempt — if it can't proceed cleanly, it tells you why and changes nothing. The most common blockers are:

Period lock

If the posting date of any document falls in a closed accounting period, that document is skipped and shown with the Locked badge. The rest of the session is still rewound. To reverse the locked documents, an admin needs to unlock the period in Automated Close → Period Lock, then re-run the rewind.

Period locks protect closed books

Unlocking a closed period to rewind a session is an audit-relevant action. Make sure the period close has not been certified to your client before unlocking.

Bank reconciliation interlock

If one of the session's Journal Entries was already used in a bank reconciliation, ERPNext will refuse to cancel its payment links. Open the reconciliation in ERPNext, un-reconcile the affected lines, then re-run the rewind.

Manually edited entries

If a CPA edited the original entry in ERPNext after Kraal posted it (e.g. changed a line's amount or account), the rewind reads the current state of the entry and flips that — so the reversal will be correct for the current entry, not the historical Kraal-posted version. Review the reversal in ERPNext to confirm it nets cleanly.

Already-reversed sessions

Each session can only be rewound once. The audit history's Rewound tab tracks every previously-reversed session.

After the rewind: re-posting against the correct entity

If you rewound because the session went to the wrong entity, the workflow is:

  1. Rewind the session as described above.
  2. Switch the entity in the header (Posting to picker) to the correct subsidiary.
  3. Re-upload the same statement or document. Kraal does not automatically re-post under the new entity — re-uploading is intentional so you can verify the extraction once more before posting.
  4. Review and post the new session.

Permissions

The Rewind action is available to users with the same posting permission used to create the session in the first place. The rewind reuses the same ERPNext credentials that Kraal already has for the client.

See also

Kraal — AI-powered accounting for modern firms