Just double checking there's spacing around "THEN ...
# suitescript
j
Just double checking there's spacing around "THEN 0ELSE " and ")END" also is there any chance of NULL on those fields