Fix Modifier ValueStr
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
using Elwig.Helpers;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
@ -43,8 +44,9 @@ namespace Elwig.Models {
|
||||
public virtual Season Season { get; private set; }
|
||||
|
||||
public string ValueStr =>
|
||||
(Abs != null) ? $"{(Abs.Value < 0 ? "\u00a0-" : "+")}{Math.Abs(Abs.Value)}\u00a0{Season.Currency.Symbol}/kg" :
|
||||
(Rel != null) ? $"{(Math.Abs(Rel.Value) < 0.1 ? "\u2007" : "")}{(Rel.Value < 0 ? "\u00a0-" : "+")}{Math.Abs(Rel.Value):0.00##\u00a0%}" : "";
|
||||
(Abs != null) ? $"{Utils.GetSign(Abs.Value)}{Math.Abs(Abs.Value)}\u00a0{Season.Currency.Symbol}/kg" :
|
||||
(Rel != null) ? $"{Utils.GetSign(Rel.Value)}{Math.Abs(Rel.Value):0.00##\u00a0%}" :
|
||||
"";
|
||||
|
||||
public override string ToString() {
|
||||
return Name;
|
||||
|
Reference in New Issue
Block a user