The simplest way is to do this as you now have the @VoucherType1 set is to dot his
CASE @vouchertype1
WHEN 'Discount' THEN @amountvalue
ELSE 0
END
this way when you have a vouchertype that ends with 'Discount' you apply the amount otherwise you simply insert a 0.
_________________________________________________________________________
SSC Guide to Posting and Best Practices