The code mentioned below can be used to achieve:
1) Voiding the transaction;
2) Preparing the POS for the next sales.
The code is part of the BlankOperation::BlankOperation(IBlankOperationInfo operationInfo, IPosTransaction posTransaction).
Ref