diff --git a/Elwig/App.xaml.cs b/Elwig/App.xaml.cs index 5e77ff4..953f83b 100644 --- a/Elwig/App.xaml.cs +++ b/Elwig/App.xaml.cs @@ -145,7 +145,13 @@ namespace Elwig { var list = new List(); foreach (var s in Config.Scales) { try { - list.Add(Scale.FromConfig(s)); + var scale = Scale.FromConfig(s); + if (scale is ICommandScale cmd) { + try { + await cmd.SetDateAndTime(DateTime.Now); + } catch { } + } + list.Add(scale); } catch (Exception exc) { list.Add(new InvalidScale(s.Id)); if (s.Required) diff --git a/Elwig/Documents/DeliveryNote.cs b/Elwig/Documents/DeliveryNote.cs index 1c50ffa..d8fe420 100644 --- a/Elwig/Documents/DeliveryNote.cs +++ b/Elwig/Documents/DeliveryNote.cs @@ -182,13 +182,13 @@ namespace Elwig.Documents { } else { var info = part.WeighingInfo; weighing.Add(Italic("Waage/Terminal:")) - .Add(Normal(" " + (info.ScaleId ?? "1") + "/" + (part.ScaleTerminalId ?? "?") + ", ")) + .Add(Normal(" " + (info.ScaleId ?? "?") + "/" + (part.ScaleTerminalId ?? "?") + ", ")) .Add(Italic("ID:")) .Add(Normal(" " + (info.Id ?? "?"))); if (info.Date != null || info.Time != null) weighing.Add(Normal(" \u2013 ")); if (info.Time != null) - weighing.Add(Normal($"{info.Time:HH:mm}")); + weighing.Add(Normal($"{info.Time:HH:mm:ss}")); if (info.Date != null) weighing.Add(Normal($", {info.Date:dd.MM.yyyy}")); if (info.Gross != null && info.Tare != null && info.Net != null) {