Your problem seams to be located here:
SELECT @maxCode = CAST(MAX(CAST(SUBSTRING(Voucher_No,LEN(@startFrom)+1,LEN(Voucher_No)- LEN(@Prefix)) AS INT)) AS varchar(100)) FROM dbo.Journal_Entry;
SET @sCode=CAST(@maxCode AS INT)
As the error says, you're casting a string that contains a letter 'J' to an INT
which for obvious reasons is not possible.
Either fix SUBSTRING
or don't store the letter 'J' in the database and only prepend it when reading.