My suggestion would be Void option at the end of the Transaction. when checked it should display a date, by selecting that date it should make a contra entry of the same transaction. Same goes for Sales/Purchase order cancellation.
I am not sure what you meant by end of transaction, but i agree that a date should be added. However, it should not be selected, rather the date which the action was made. And add a short description/reason of voiding.
i see this old reply of @lubos, however, i’d like to insist on the option on voiding the transaction.
issuance of a credit note is best when there is tax involved, movement of inventory involved, or perhaps, simply because you have a mutual understanding with the customer and that you are required to do a refund related to the invoice.
however, on some cases which do not involve the above stated scenarios, i.e. incorrectly doing the invoice and that instead of issuing a credit note, it is better to have it cancelled/voided, in order to maintain the sequence on reference number, and to better see perhaps the history of the invoice.
i hope this get’s into the developer’s consideration.