Elwig: Fix abgewertet/depreciated behaviour and rename to devalued

This commit is contained in:
lorenz.stechauner committed 2026-12-02 17:09:14 +01:00
1 parent 2ed559eb3f
commit 4ce6ce8248
24 files changed
+121 -107

No files matched your search

@@ -58,7 +58,7 @@ namespace Elwig.Models.Dtos {
FROM v_delivery v
JOIN delivery_part p ON (p.year, p.did, p.dpnr) = (v.year, v.did, v.dpnr)
WHERE (p.year = {year} OR {year} IS NULL) AND (v.mgnr = {mgnr} OR {mgnr} IS NULL)
ORDER BY p.year, v.mgnr, v.sortid, v.abgewertet ASC, v.attribute_prio DESC, COALESCE(v.attrid, '~'), v.kmw DESC, v.lsnr, v.dpnr
ORDER BY p.year, v.mgnr, v.sortid, v.devalued ASC, v.attribute_prio DESC, COALESCE(v.attrid, '~'), v.kmw DESC, v.lsnr, v.dpnr
""").IgnoreAutoIncludes().ToListAsync();
}
}
@@ -72,7 +72,7 @@ namespace Elwig.Models.Dtos {
public string? Cultivation;
public string QualityLevel;
public string QualId;
public bool IsDepreciated;
public bool IsDevalued;
public (double Oe, double Kmw) Gradation;
public string[] Modifiers;
public int Weight;
@@ -89,7 +89,7 @@ namespace Elwig.Models.Dtos {
Cultivation = p.Cultivation?.Name;
QualityLevel = p.Quality.Name;
QualId = p.Quality.QualId;
IsDepreciated = p.QualId == "WEI";
IsDevalued = p.QualId == "WEI";
Gradation = (p.Oe, p.Kmw);
Modifiers = [.. p.Modifiers.Select(m => m.Name)];
Weight = p.Weight;