DeliveryNote: Add manual weighing reason
This commit is contained in:
@ -90,7 +90,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
<tr><td></td><td colspan="5">
|
<tr><td></td><td colspan="5">
|
||||||
@Raw(part.ManualWeighing ? "<i>Handwiegung</i>" : $"<i>Waage:</i> {part.ScaleId ?? "?"}, <i>ID:</i> {part.WeighingId ?? "?"}") (@(part.IsGerebelt ? "gerebelt gewogen" : "nicht gerebelt gewogen"))
|
@Raw(part.ManualWeighing ? "<i>Handwiegung</i>" : $"<i>Waage:</i> {part.ScaleId ?? "?"}, <i>ID:</i> {part.WeighingId ?? "?"}")
|
||||||
|
(@(part.IsGerebelt ? "gerebelt gewogen" : "nicht gerebelt gewogen"))@Raw(part.WeighingReason != null ? $", <i>Begründung:</i>" : "") @part.WeighingReason
|
||||||
</td></tr>
|
</td></tr>
|
||||||
@if (part.Comment != null) {
|
@if (part.Comment != null) {
|
||||||
<tr><td></td><td colspan="5"><i>Anmerkung:</i> @part.Comment</td></tr>
|
<tr><td></td><td colspan="5"><i>Anmerkung:</i> @part.Comment</td></tr>
|
||||||
@ -153,7 +154,7 @@
|
|||||||
@Raw(FormatRow(Model.Member.DeliveryObligation, Model.Member.DeliveryRight, Model.Member.Deliveries.Where(d => d.Year == Model.Delivery.Year).Sum(d => d.Weight)))
|
@Raw(FormatRow(Model.Member.DeliveryObligation, Model.Member.DeliveryRight, Model.Member.Deliveries.Where(d => d.Year == Model.Delivery.Year).Sum(d => d.Weight)))
|
||||||
</tr>
|
</tr>
|
||||||
@foreach (var (id, name, right, obligation, sum) in Model.MemberBuckets.OrderBy(b => b.Item1)) {
|
@foreach (var (id, name, right, obligation, sum) in Model.MemberBuckets.OrderBy(b => b.Item1)) {
|
||||||
if (right > 0 || obligation > 0 || (sum > 0 && buckets[id[..2]] > 1)) {
|
if (right > 0 || obligation > 0 || (sum > 0 && buckets[id[..2]] > 1 && !id.EndsWith('_'))) {
|
||||||
<tr class="@(sortids.Contains(id[..2]) ? "" : "optional")">
|
<tr class="@(sortids.Contains(id[..2]) ? "" : "optional")">
|
||||||
<th>@name</th>
|
<th>@name</th>
|
||||||
@Raw(FormatRow(obligation, right, sum))
|
@Raw(FormatRow(obligation, right, sum))
|
||||||
|
@ -87,6 +87,9 @@ namespace Elwig.Models {
|
|||||||
[Column("weighing_id")]
|
[Column("weighing_id")]
|
||||||
public string? WeighingId { get; set; }
|
public string? WeighingId { get; set; }
|
||||||
|
|
||||||
|
[Column("weighing_reason")]
|
||||||
|
public string? WeighingReason { get; set; }
|
||||||
|
|
||||||
[Column("comment")]
|
[Column("comment")]
|
||||||
public string? Comment { get; set; }
|
public string? Comment { get; set; }
|
||||||
|
|
||||||
|
@ -530,6 +530,7 @@ namespace Elwig.Windows {
|
|||||||
|
|
||||||
ScaleId = p?.ScaleId;
|
ScaleId = p?.ScaleId;
|
||||||
WeighingId = p?.WeighingId;
|
WeighingId = p?.WeighingId;
|
||||||
|
ManualWeighingReason = p?.WeighingReason;
|
||||||
|
|
||||||
FinishInputFilling();
|
FinishInputFilling();
|
||||||
}
|
}
|
||||||
@ -591,8 +592,7 @@ namespace Elwig.Windows {
|
|||||||
p.ManualWeighing = ManualWeighingInput.IsChecked ?? false;
|
p.ManualWeighing = ManualWeighingInput.IsChecked ?? false;
|
||||||
p.ScaleId = ScaleId;
|
p.ScaleId = ScaleId;
|
||||||
p.WeighingId = WeighingId;
|
p.WeighingId = WeighingId;
|
||||||
if (ManualWeighingReason != null)
|
p.WeighingReason = ManualWeighingReason;
|
||||||
p.Comment = (p.Comment != null ? $"{p.Comment} / " : "") + $"Begründung Handwiegung: {ManualWeighingReason}";
|
|
||||||
|
|
||||||
EntityEntry<Delivery>? dEntry = null;
|
EntityEntry<Delivery>? dEntry = null;
|
||||||
EntityEntry<DeliveryPart>? pEntry = null;
|
EntityEntry<DeliveryPart>? pEntry = null;
|
||||||
|
Reference in New Issue
Block a user