diff --git a/Elwig/App.xaml b/Elwig/App.xaml
index 5aa2aa1..d8b5a5e 100644
--- a/Elwig/App.xaml
+++ b/Elwig/App.xaml
@@ -55,7 +55,7 @@
-
+
diff --git a/Elwig/Documents/style.css b/Elwig/Documents/style.css
index ad86d5a..a0ba588 100644
--- a/Elwig/Documents/style.css
+++ b/Elwig/Documents/style.css
@@ -263,7 +263,7 @@ main .signatures {
width: 100%;
display: flex;
justify-content: space-around;
- margin: 20mm 0 5mm 0;
+ margin: 20mm 0 2mm 0;
}
main .signatures > * {
diff --git a/Elwig/Models/DeliveryPart.cs b/Elwig/Models/DeliveryPart.cs
index 51897b8..c259cf9 100644
--- a/Elwig/Models/DeliveryPart.cs
+++ b/Elwig/Models/DeliveryPart.cs
@@ -105,7 +105,7 @@ namespace Elwig.Models {
public virtual ISet PartModifiers { get; private set; }
[NotMapped]
- public IEnumerable Modifiers => PartModifiers.Select(m => m.Modifier);
+ public IEnumerable Modifiers => PartModifiers.Select(m => m.Modifier).OrderBy(m => m.Ordering);
public string OriginString => Origin.OriginString + "\n" + (Kg?.Gl != null ? $" / {Kg.Gl.Name}" : "") + (Kg != null ? $" / {Kg.AtKg.Gem.Name} / KG {Kg.AtKg.Name}" : "") + (Rd != null ? $" / Ried {Rd.Name}" : "");
}
diff --git a/Elwig/Models/Modifier.cs b/Elwig/Models/Modifier.cs
index cd0f223..46ebd7a 100644
--- a/Elwig/Models/Modifier.cs
+++ b/Elwig/Models/Modifier.cs
@@ -11,6 +11,9 @@ namespace Elwig.Models {
[Column("modid")]
public string ModId { get; set; }
+ [Column("ordering")]
+ public int Ordering { get; set; }
+
[Column("name")]
public string Name { get; set; }
@@ -39,9 +42,9 @@ namespace Elwig.Models {
[ForeignKey("Year")]
public virtual Season Season { get; private set; }
- public string ValueStr => (Abs != null) ?
- $"{(Abs < 0 ? " -" : "+")}{Math.Abs(Abs.Value)} {Season.Currency.Symbol}/kg" :
- $"{(Rel < 0 ? " -" : "+")}{Math.Abs(Rel.Value):P2}";
+ public string ValueStr =>
+ (Abs != null) ? $"{(Abs.Value < 0 ? "\u00a0-" : "+")}{Math.Abs(Abs.Value)}\u00a0{Season.Currency.Symbol}/kg" :
+ (Rel != null) ? $"{(Rel.Value < 0 ? "\u00a0-" : "+")}{(Math.Abs(Rel.Value) < 0.1 ? "\u2007" : "")}{Math.Abs(Rel.Value):0.00##\u00a0%}" : "";
public override string ToString() {
return Name;
diff --git a/Elwig/Windows/DeliveryAdminWindow.xaml.cs b/Elwig/Windows/DeliveryAdminWindow.xaml.cs
index 488e3de..6cf7a04 100644
--- a/Elwig/Windows/DeliveryAdminWindow.xaml.cs
+++ b/Elwig/Windows/DeliveryAdminWindow.xaml.cs
@@ -198,7 +198,7 @@ namespace Elwig.Windows {
ControlUtils.RenewItemsSource(WineVarietyInput, await Context.WineVarieties.OrderBy(v => v.Name).ToListAsync(), i => (i as WineVar)?.SortId);
ControlUtils.RenewItemsSource(AttributesInput, await Context.WineAttributes.OrderBy(a => a.Name).ToListAsync(), i => (i as WineAttr)?.AttrId);
ControlUtils.RenewItemsSource(WineQualityLevelInput, await Context.WineQualityLevels.ToListAsync(), i => (i as WineQualLevel)?.QualId);
- ControlUtils.RenewItemsSource(ModifiersInput, await Context.Modifiers.Where(m => m.Year == y).OrderBy(m => m.Name).ToListAsync(), i => (i as Modifier)?.ModId);
+ ControlUtils.RenewItemsSource(ModifiersInput, await Context.Modifiers.Where(m => m.Year == y).OrderBy(m => m.Ordering).ToListAsync(), i => (i as Modifier)?.ModId);
ControlUtils.RenewItemsSource(WineOriginInput, (await Context.WineOrigins.ToListAsync()).OrderByDescending(o => o.SortKey).ThenBy(o => o.HkId), i => (i as WineOrigin)?.HkId);
var kgList = await Context.WbKgs.Select(k => k.AtKg).OrderBy(k => k.Name).Cast