Weighing: Differentiate between scale and terminal
This commit is contained in:
@@ -21,6 +21,11 @@ namespace Elwig.Helpers.Weighing {
|
||||
/// </summary>
|
||||
public int? NetWeight;
|
||||
|
||||
/// <summary>
|
||||
/// Reported id of the scale
|
||||
/// </summary>
|
||||
public string? ScaleId;
|
||||
|
||||
/// <summary>
|
||||
/// Weighing id (or IdentNr) provided by the scale
|
||||
/// </summary>
|
||||
@@ -49,6 +54,7 @@ namespace Elwig.Helpers.Weighing {
|
||||
|
||||
public readonly JsonObject ToJson() {
|
||||
var obj = new JsonObject();
|
||||
if (ScaleId != null) obj["scale"] = ScaleId;
|
||||
if (FullWeighingId != null) obj["id"] = FullWeighingId;
|
||||
if (WeighingId != null) obj["nr"] = int.Parse(WeighingId);
|
||||
if (Date != null) obj["date"] = $"{Date:yyyy-MM-dd}";
|
||||
|
||||
Reference in New Issue
Block a user