Weighing: Do not ignore gross and tare weight and show it on DeliveryNote
All checks were successful
Test / Run tests (push) Successful in 2m45s

This commit is contained in:
2024-07-22 17:10:36 +02:00
parent f242163271
commit 0754559034
25 changed files with 152 additions and 90 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,
};
}