Hello Experts,
I'm trying to set up a query based approval template that'll exclude a specific business partner (or customer group) and will trigger when margin % drops below a specified level. I believe it's important the query checks margin on the active window for this to work correctly.
I've got the below to work on some occasions, but I seem to run into errors when the value reaches a certain level. I'm not at all convinced I have this right, so help would be greatly appreciated.
SELECT DISTINCT 'TRUE' FROM ORDR
WHERE $[ORDR.CardCode] <> 'C0001103'
AND ($[ORDR.GrosProfit] / NULLIF($[$22.0.number],0)) < '0.25'
Thanks in advance!