added invoice method for the transaction class