From e1201bc6b8d4b434d187a75dddf78fef39b60b17 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Fri, 8 Mar 2024 15:18:47 +0100 Subject: [PATCH] [#40] DeliveryConfirmation: Add column indication gross/net weight --- Elwig/Documents/DeliveryConfirmation.cshtml | 13 ++++++++++++- .../Models/Dtos/DeliveryConfirmationDeliveryData.cs | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Elwig/Documents/DeliveryConfirmation.cshtml b/Elwig/Documents/DeliveryConfirmation.cshtml index 20bf4a2..17b7b6b 100644 --- a/Elwig/Documents/DeliveryConfirmation.cshtml +++ b/Elwig/Documents/DeliveryConfirmation.cshtml @@ -11,13 +11,14 @@ + - + @@ -30,6 +31,14 @@ Gradation Flächenbindung Gewicht + + + + bto./nto. + + + Davon
abzuwerten @@ -72,8 +81,10 @@ } @if (i == p.Buckets.Length - 1) { @($"{p.Weight:N0}") + @(p.IsNetWeight ? "n" : "b") } else { + } @if (first) { diff --git a/Elwig/Models/Dtos/DeliveryConfirmationDeliveryData.cs b/Elwig/Models/Dtos/DeliveryConfirmationDeliveryData.cs index 0be2155..d5bba40 100644 --- a/Elwig/Models/Dtos/DeliveryConfirmationDeliveryData.cs +++ b/Elwig/Models/Dtos/DeliveryConfirmationDeliveryData.cs @@ -78,6 +78,7 @@ namespace Elwig.Models.Dtos { public (double Oe, double Kmw) Gradation; public string[] Modifiers; public int Weight; + public bool IsNetWeight; public (string Name, int Value)[] Buckets; public DeliveryConfirmationDeliveryRow(DeliveryPart p) { @@ -93,6 +94,7 @@ namespace Elwig.Models.Dtos { .Select(m => m.Name) .ToArray(); Weight = p.Weight; + IsNetWeight = p.IsNetWeight; Buckets = p.Buckets .Where(b => b.Value > 0) .OrderByDescending(b => b.BktNr)