Elwig: Rename (wine) variant to variety

This commit is contained in:
2024-01-27 11:36:43 +01:00
parent 519e903d1c
commit d3aca196dd
12 changed files with 30 additions and 29 deletions

@ -55,13 +55,13 @@ namespace Elwig.Documents {
CurrencySymbol = season.Currency.Symbol ?? season.Currency.Code;
Precision = season.Precision;
var variants = ctx.WineVarieties.ToDictionary(v => v.SortId, v => v);
var varieties = ctx.WineVarieties.ToDictionary(v => v.SortId, v => v);
var attributes = ctx.WineAttributes.ToDictionary(a => a.AttrId, a => a);
var comTypes = ctx.AreaCommitmentTypes.ToDictionary(t => t.VtrgId, t => t);
MemberUnderDeliveries = underDeliveries?
.OrderBy(u => u.Key)
.Select(u => (
variants[u.Key[..2]].Name + (u.Key.Length > 2 ? " " + attributes[u.Key[2..]].Name : ""),
varieties[u.Key[..2]].Name + (u.Key.Length > 2 ? " " + attributes[u.Key[2..]].Name : ""),
u.Value.Diff,
u.Value.Diff * (comTypes[u.Key].PenaltyPerKg ?? 0)
- (comTypes[u.Key].PenaltyAmount ?? 0)