recently I debugged code of Acumatica, and found following expression:
[PXFormula(typeof (Switch<Case<Where<Add<SOOrder.releasedCntr, SOOrder.billedCntr>,
IsNull<Mult<Div<SOOrder.curyUnbilledOrderTotal, NullIf<SOOrder.curyLineTotal, decimal0>>,
SOOrder.curyFreightTot>, decimal0>>>>, SOOrder.curyUnbilledOrderTotal>))]
I always got scared when I see such kind of expressions. I have a feeling that it was written by somebody who can easily pass zebra puzzle. Unfortunately I'm not such a men.
While debugging it I needed to have reference for IsNull and NullIf. Below goes description of each one of them:
Returns null if Operand1 equals Operand2 and returns Operand1 if the two expression are not equal. Equivalent to SQL function NULLIF.
Returns Operand1 if it is not null, or Operand2 otherwise.