Weighing: Do not ignore gross and tare weight and show it on DeliveryNote
All checks were successful
Test / Run tests (push) Successful in 1m56s

This commit is contained in:
2024-07-22 17:10:36 +02:00
parent 96f20e3935
commit 4a7dd9b000
25 changed files with 152 additions and 90 deletions

View File

@ -60,8 +60,18 @@
}
}
<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</i> @(part.IsNetWeight ? " (gerebelt gewogen)" : " (nicht gerebelt gewogen)")
@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}" : "")
@(part.IsNetWeight ? " (gerebelt gewogen)" : " (nicht gerebelt gewogen)")
@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")
}
}
</td></tr>
@if (part.Comment != null) {
<tr><td></td><td colspan="5"><i>Anmerkung:</i> @part.Comment</td></tr>