[#34] Billing: Collapse data more compactly

This commit is contained in:
2024-02-20 23:14:00 +01:00
parent 56fdf62c5c
commit 9fec79ef8c
4 changed files with 30 additions and 16 deletions

View File

@ -126,7 +126,7 @@ namespace Elwig.Windows {
Vaributes = Utils.GetVaributeList(Context, Year);
GraphEntries.ForEach(e => {
e.Vaributes.ForEach(v => {
var found = Vaributes.Find(a => a.Attribute?.AttrId == v.Attribute?.AttrId && a.Variety?.SortId == v.Variety?.SortId);
var found = Vaributes.Find(a => a.Variety?.SortId == v.Variety?.SortId && a.Attribute?.AttrId == v.Attribute?.AttrId && a.Cultivation?.CultId == v.Cultivation?.CultId);
if (found == null) return;
if (e.Abgewertet) {
found.AssignedAbgewGraphId = e.Id;