Weighing: Do not ignore gross and tare weight and show it on DeliveryNote

This commit is contained in:
2024-07-22 17:10:36 +02:00
parent a1eb71d560
commit 2d284a5c65
26 changed files with 158 additions and 96 deletions

View File

@ -60,8 +60,17 @@
}
}
<tr><td></td><td colspan="5">
@Raw(part.IsManualWeighing ? "<i>Handwiegung</i>" : $"<i>Waage:</i> {part.ScaleId ?? "?"}, <i>ID:</i> {part.WeighingId ?? "?"}")
(@(part.IsNetWeight ? "netto/gerebelt gewogen" : "brutto/nicht gerebelt gewogen"))@Raw(part.WeighingReason != null ? $", <i>Begründung:</i>" : "") @part.WeighingReason
@if (part.IsManualWeighing) {
<i>Handwiegung @(part.IsNetWeight ? " (gerebelt gewogen)" : " (nicht gerebelt gewogen)")</i>@Raw(part.WeighingReason != null ? ", <i>Begründung:</i> " : "") @part.WeighingReason
} else {
var info = part.WeighingInfo;
<i>Waage:</i> @(part.ScaleId ?? "?")@(", ") <i>ID:</i> @(info.Id ?? "?")
@(info.Date != null ? $" {info.Date:dd.MM.yyyy}" : "") @(info.Time != null ? $", {info.Time:HH:mm}" : "")
@if (info.Gross != null && info.Tare != null && info.Net != null) {
<br/><i>Brutto:</i> @($"{info.Gross:N0} kg")@(" ") <i>Tara:</i> @($"{info.Tare:N0} kg")@(" ") <i>Netto:</i> @($"{info.Net:N0} kg")
}
@Raw(part.IsNetWeight ? " <i>gerebelt gewogen</i>" : " <i>nicht gerebelt gewogen</i>")
}
</td></tr>
@if (part.Comment != null) {
<tr><td></td><td colspan="5"><i>Anmerkung:</i> @part.Comment</td></tr>