DeliveryConfirmation: Show 'Davon abgewertet' below total sum
This commit is contained in:
@@ -100,6 +100,12 @@
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="8">Davon abgewertet:</td>
|
||||||
|
<td colspan="2" class="number">@($"{Model.Data.Rows.Where(p => p.IsDepreciated).Sum(p => p.Weight):N0}")</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@Raw(BusinessDocument.PrintSortenaufteilung(Model.MemberStats))
|
@Raw(BusinessDocument.PrintSortenaufteilung(Model.MemberStats))
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ namespace Elwig.Models.Dtos {
|
|||||||
public string? Attribute;
|
public string? Attribute;
|
||||||
public string? Cultivation;
|
public string? Cultivation;
|
||||||
public string QualityLevel;
|
public string QualityLevel;
|
||||||
|
public bool IsDepreciated;
|
||||||
public (double Oe, double Kmw) Gradation;
|
public (double Oe, double Kmw) Gradation;
|
||||||
public string[] Modifiers;
|
public string[] Modifiers;
|
||||||
public int Weight;
|
public int Weight;
|
||||||
@@ -89,17 +90,15 @@ namespace Elwig.Models.Dtos {
|
|||||||
Attribute = p.Attribute?.Name;
|
Attribute = p.Attribute?.Name;
|
||||||
Cultivation = p.Cultivation?.Name;
|
Cultivation = p.Cultivation?.Name;
|
||||||
QualityLevel = p.Quality.Name;
|
QualityLevel = p.Quality.Name;
|
||||||
|
IsDepreciated = p.QualId == "WEI";
|
||||||
Gradation = (p.Oe, p.Kmw);
|
Gradation = (p.Oe, p.Kmw);
|
||||||
Modifiers = p.Modifiers
|
Modifiers = [.. p.Modifiers.Select(m => m.Name)];
|
||||||
.Select(m => m.Name)
|
|
||||||
.ToArray();
|
|
||||||
Weight = p.Weight;
|
Weight = p.Weight;
|
||||||
IsNetWeight = p.IsNetWeight;
|
IsNetWeight = p.IsNetWeight;
|
||||||
Buckets = p.Buckets
|
Buckets = [.. p.Buckets
|
||||||
.Where(b => b.Value > 0)
|
.Where(b => b.Value > 0)
|
||||||
.OrderByDescending(b => b.BktNr)
|
.OrderByDescending(b => b.BktNr)
|
||||||
.Select(b => (b.Discr == "_" ? "ungeb." : $"geb. {p.SortId}{b.Discr}", b.Value))
|
.Select(b => (b.Discr == "_" ? "ungeb." : $"geb. {p.SortId}{b.Discr}", b.Value))];
|
||||||
.ToArray();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user