If you can just not display the data, rather than raising an error then changing your WHERE
clause to:
WHERE ( fs_transaksie.verwysnr = @ReceiptNumber ) AND (fs_transaksie.trans_tipe = 3)
And (fs_transaksie.rek != 5205)
should exclude it - you are already filtering it to just be trans_tipe = 3
so adding the And (fs_transaksie.rek != 5205)
will exclude any where the results are 3 and 5205 respectively.