We are using Umbraco 7.5.x on Umbraco Cloud. we have a custom document type with a Umbraco.Decimal datatype.
The correct values are being stored as we can edit them from the backoffice. But when we try to display those values, only values above zero are show properly. Negative values (eg -0.75) are not displayed.
What is the correct way to display the values of this datatype so all values are shown?
Our use case above is, we have a nodes that display values of stock prices, which can be negative sometimes. the values are stored in a Umbraco.decimal field. The positive values display without any issues. Any negative values display as zero.
For example in our view, we grab the a particular node, and display its value from the fields:
@{
var lastStockValues = Umbraco.Content(123).Children.Last();
}
<div>@((lastStockValues.stockdelta*100).ToString("0.##")) % </div>
Thanks!