Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
"Save x %" on Item Template?
I've set up a custom item field DISC_PCT of PERCENT type with the default value calculated using the following formula (store value unchecked):
ROUND(({pricelevel1}-{pricelevel5})/{pricelevel1},3)
This custom field is called by item template through javascript to display the % discount on any item that is onsale. Silly issue but I can't get the percentage to simply display in integer format. If I use:
ROUND(({pricelevel1}-{pricelevel5})/{pricelevel1},3) - it displays "46.9%"
ROUND(({pricelevel1}-{pricelevel5})/{pricelevel1},2) - displays "47.0%"
ROUND(({pricelevel1}-{pricelevel5})/{pricelevel1},1) - displays "0.0%"
I simply want to drop all decimal places and round or truncate to the whole integer for display purposes. I tried TRUNC but it didn't work either.