DECODE({type}, 'Item Receipt', 1, 'Purchase Order'...
# general
m
DECODE({type}, 'Item Receipt', 1, 'Purchase Order', -1, 0);