DeliveryAdminWindow: Add button to correct tare

This commit is contained in:
2026-09-14 14:43:24 +02:00
parent fea779bd95
commit 8ba051198f
11 changed files with 185 additions and 20 deletions
+11 -2
View File
@@ -35,8 +35,13 @@ namespace Elwig.Services {
vm.SortId = "";
vm.GradationKmwString = "";
vm.WeightString = "";
vm.Weight = null;
vm.ActualTare = 0;
vm.TargetTare = null;
vm.Tare = null;
vm.IsManualWeighing = false;
vm.PartComment = "";
vm.TemperatureString = "";
vm.AcidString = "";
@@ -51,7 +56,11 @@ namespace Elwig.Services {
vm.WineKg = ControlUtils.GetItemFromSourceWithPk(vm.WineKgSource, p.KgNr) as AT_Kg;
vm.WineRd = ControlUtils.GetItemFromSourceWithPk(vm.WineRdSource, p.KgNr, p.RdNr) as WbRd;
vm.WineOrigin = ControlUtils.GetItemFromSourceWithPk(vm.WineOriginSource, p.HkId) as WineOrigin;
vm.WeightString = $"{p.Weight:N0}";
vm.Weight = p.Weight;
vm.ActualTare = p.WeighingInfo.Tare ?? 0;
vm.TargetTare = vm.ActualTare + p.WeighingInfo.TareCorrection;
vm.Tare = vm.ActualTare != 0 ? vm.TargetTare ?? vm.ActualTare : null;
vm.IsManualWeighing = p.IsManualWeighing;
vm.IsNetWeight = p.IsNetWeight;