case when ( SUM ( case when {type} = 'Invoice' the...
# suitescript
m
case when ( SUM ( case when {type} = 'Invoice' then {amount} else 0 end )) > ( SUM ( case when {type} = 'Sales Order' then SUM({amount}) else 0 end )) then "Good Job" else "Totes Fired" end