Weighing: Do not ignore gross and tare weight and show it on DeliveryNote
This commit is contained in:
@ -176,7 +176,7 @@
|
||||
<Bold>Handwiegung</Bold>: handw[iegung], !Handw[iegung] (alle ohne Handwiegung)<LineBreak/>
|
||||
<Bold>Handlese</Bold>: Handl[ese], !handl[ese] (alle ohne Handlese)<LineBreak/>
|
||||
<Bold>Gebunden</Bold>: geb[unden], ungeb[unden], !geb[unden], !ungeb[unden]<LineBreak/>
|
||||
<Bold>Brutto/Netto Wiegung</Bold>: bto, Brut[to], nto, Net[to], gerebelt, !Gerebelt<LineBreak/>
|
||||
<Bold>Gerebelt</Bold>: gerebelt, !Gerebelt (nicht gerebelt gewogen)<LineBreak/>
|
||||
<Bold>Freitext</Bold>: z.B. Lieferscheinnummern, Anmerkung, "quw" (sucht nach dem Text "quw")
|
||||
</TextBlock>
|
||||
</TextBox.ToolTip>
|
||||
@ -469,7 +469,7 @@
|
||||
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"/>
|
||||
|
||||
<CheckBox x:Name="GerebeltGewogenInput" IsChecked="{Binding IsNetWeight, Mode=TwoWay}"
|
||||
Content="Netto (gerebelt gewogen)"
|
||||
Content="Gerebelt gewogen"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,75,10,10" Grid.Column="0" Grid.ColumnSpan="2"
|
||||
Checked="GerebeltGewogenInput_Changed" Unchecked="GerebeltGewogenInput_Changed"/>
|
||||
|
||||
|
@ -285,7 +285,7 @@ namespace Elwig.Windows {
|
||||
|
||||
private void InitialInputs() {
|
||||
ViewModel.LastScaleError = null;
|
||||
ViewModel.WeighingId = null;
|
||||
ViewModel.WeighingData = null;
|
||||
ViewModel.ScaleId = null;
|
||||
ViewModel.ManualWeighingReason = null;
|
||||
|
||||
@ -525,7 +525,7 @@ namespace Elwig.Windows {
|
||||
OnWeighingResult(s, res);
|
||||
} catch (Exception ex) {
|
||||
ViewModel.LastScaleError = ex.Message.Split(": ")[^1];
|
||||
OnWeighingResult(s, new() { Weight = 0 });
|
||||
OnWeighingResult(s, new());
|
||||
MessageBox.Show($"Beim Wiegen ist ein Fehler aufgetreten:\n\n{ex.Message}", "Waagenfehler",
|
||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
@ -538,16 +538,16 @@ namespace Elwig.Windows {
|
||||
}
|
||||
|
||||
private void OnWeighingResult(IScale scale, WeighingResult res) {
|
||||
if ((res.Weight ?? 0) > 0 && res.FullWeighingId != null) {
|
||||
ViewModel.Weight = res.Weight;
|
||||
if ((res.NetWeight ?? 0) > 0 && res.FullWeighingId != null) {
|
||||
ViewModel.Weight = res.NetWeight;
|
||||
ViewModel.ScaleId = scale.ScaleId;
|
||||
ViewModel.WeighingId = res.FullWeighingId;
|
||||
ViewModel.WeighingData = res.ToJson().ToJsonString();
|
||||
ViewModel.ManualWeighingReason = null;
|
||||
ManualWeighingInput.IsChecked = false;
|
||||
} else {
|
||||
ViewModel.Weight = null;
|
||||
ViewModel.ScaleId = null;
|
||||
ViewModel.WeighingId = null;
|
||||
ViewModel.WeighingData = null;
|
||||
}
|
||||
ViewModel.LastScaleError = null;
|
||||
TextBox_TextChanged(WeightInput, null);
|
||||
@ -842,7 +842,7 @@ namespace Elwig.Windows {
|
||||
ManualWeighingInput.IsChecked = true;
|
||||
ViewModel.ManualWeighingReason = res?.Item2;
|
||||
ViewModel.ScaleId = null;
|
||||
ViewModel.WeighingId = null;
|
||||
ViewModel.WeighingData = null;
|
||||
}
|
||||
|
||||
protected override void ShortcutEdit() {
|
||||
@ -1004,7 +1004,7 @@ namespace Elwig.Windows {
|
||||
DId = await ctx.NextDId(p.Year),
|
||||
LNr = lnr,
|
||||
DateString = $"{delivery.Date:yyyy-MM-dd}",
|
||||
TimeString = $"{delivery.Time:HH:mm:SS}",
|
||||
TimeString = $"{delivery.Time:HH:mm:ss}",
|
||||
ZwstId = delivery.ZwstId,
|
||||
MgNr = delivery.MgNr,
|
||||
Comment = delivery.Comment,
|
||||
|
Reference in New Issue
Block a user