case when {type} = 'Invoice' then {totalamount} el...
# suitescript
m
case when {type} = 'Invoice' then {totalamount} else null end