BigDecimal.valueOf(value) and new BigDecimal(value) gives "Unexpected type: java.math.BigDecimal" exception. You have to use this instead:
Groovy
def price = api.global.price as BigDecimal
// local variable price is now BigDecimal
BigDecimal.valueOf(value) and new BigDecimal(value) gives "Unexpected type: java.math.BigDecimal" exception. You have to use this instead:
def price = api.global.price as BigDecimal
// local variable price is now BigDecimal