DeliveryConfirmation: Show 'Davon abgewertet' below total sum

This commit is contained in:
2026-02-19 15:26:09 +01:00
parent 4cd7ef85a1
commit 9e5f709d42
2 changed files with 11 additions and 6 deletions

View File

@@ -75,6 +75,7 @@ namespace Elwig.Models.Dtos {
public string? Attribute;
public string? Cultivation;
public string QualityLevel;
public bool IsDepreciated;
public (double Oe, double Kmw) Gradation;
public string[] Modifiers;
public int Weight;
@@ -89,17 +90,15 @@ namespace Elwig.Models.Dtos {
Attribute = p.Attribute?.Name;
Cultivation = p.Cultivation?.Name;
QualityLevel = p.Quality.Name;
IsDepreciated = p.QualId == "WEI";
Gradation = (p.Oe, p.Kmw);
Modifiers = p.Modifiers
.Select(m => m.Name)
.ToArray();
Modifiers = [.. p.Modifiers.Select(m => m.Name)];
Weight = p.Weight;
IsNetWeight = p.IsNetWeight;
Buckets = p.Buckets
Buckets = [.. p.Buckets
.Where(b => b.Value > 0)
.OrderByDescending(b => b.BktNr)
.Select(b => (b.Discr == "_" ? "ungeb." : $"geb. {p.SortId}{b.Discr}", b.Value))
.ToArray();
.Select(b => (b.Discr == "_" ? "ungeb." : $"geb. {p.SortId}{b.Discr}", b.Value))];
}
}
}