Weighing: Do not ignore gross and tare weight and show it on DeliveryNote

This commit is contained in:
2024-07-22 17:10:36 +02:00
parent 1141331608
commit fd0ed97305
26 changed files with 159 additions and 96 deletions

View File

@ -69,13 +69,14 @@ namespace Elwig.Helpers.Weighing {
var time = line[37..43];
identNr = identNr.Length > 0 && identNr != "0" ? identNr : null;
var parsedDate = DateOnly.ParseExact(date, "yyyyMMdd");
return new() {
Weight = int.Parse(netto),
GrossWeight = int.Parse(brutto),
TareWeight = int.Parse(tara),
NetWeight = int.Parse(netto),
WeighingId = identNr,
FullWeighingId = identNr,
Date = parsedDate,
Time = TimeOnly.ParseExact(time, "HHmmss"),
Date = DateOnly.TryParseExact(date, "yyyyMMdd", out var d) ? d : null,
Time = TimeOnly.TryParseExact(time, "HHmmss", out var t) ? t : null,
};
}