DECODE({type},'Invoice',{amount},0)
# suitescript
a
DECODE({type},'Invoice',{amount},0)