I have a case where, I am showing both the order amt. and the invoice amt. they can be different. the invoice amt. may sometimes not exist.
because the order has not been shipped yet. however we do want to credit the sales person with this order in our reports.
SO I have a formula which says if the invtot 0 use the order amt. but this is not doing.
if {AEPAYCRI.INVTOT} = 0 then {AEPAYCR.OHTTN$}
else
{AEPAYCRI.INVTOT}
but in reality, there is no 0, there is simply no records for that order number. the formula should really say
if order number not in invoice table
use the order amt.