Kris Jones
04/23/2019, 10:54 PMNVL2(
{ item.averagecost },
TRUNC(
SUM(
NVL({ amount }, 0) - NVL({ item.averagecost }, 0) * { quantity }
) / SUM(NULLIF({ amount }, 0)),
2
) * 100,
TRUNC(
SUM(
NVL({ amount }, 0) - NVL({ item.lastpurchaseprice }, 0) * { quantity }
) / SUM(NULLIF({ amount }, 0)),
2
) * 100
)
I've verified that both of the TRUNC()
blocks work outside of the NVL2
, but Netsuite throws an error when trying to save the above. Anyone have an idea why?