You have a lot of parentheses in there. Try this: ...
# general
j
You have a lot of parentheses in there. Try this:
CASE WHEN ({item.locationquantityonorder} + {item.locationquantityavailable} - {item.locationquantitybackordered}) < 0 THEN {item.locationquantityonorder} + {item.locationquantityavailable} - {item.locationquantitybackordered} END