This error occurs when TurboCASH attempts to insert a duplicate row into the BATCH table
(commonly a duplicate BATCHID or DOCUMENTNO) while reversing a batch.
The database prevents duplicates and raises this constraint violation.
SELECT * FROM BATCH WHERE BATCHID = <ID causing error>;
If the reversal tries to reuse an existing BATCHID, adjust the ID (or sequence) so a new unique ID is generated.
DOCUMENTNO. Find duplicates with:
SELECT DOCUMENTNO FROM BATCH GROUP BY DOCUMENTNO HAVING COUNT(*) > 1;
If duplicates exist, rename or adjust the document number on the original batch before reversing.
TurboCASH enforces unique constraints on identifiers. If the reversal process does not generate a new unique
BATCHID or DOCUMENTNO, the database rejects the insert to preserve data integrity.
When a reversal tries to insert a batch with an existing BATCHID or a duplicate DOCUMENTNO; the database blocks the duplicate to preserve integrity.
Not immediately. First attempt the Fix Unique ID workflow, clear/reset temporary entries, or create a manual reversing journal. Always back up before running SQL or reset actions.
Yes — after resolving duplicate IDs and ensuring no partial reversals remain, retry the reverse. If it still fails, use manual reversal or contact support.