Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db8afa59b7 | ||
|
|
3d96c31a70 | ||
|
|
a18d687f18 | ||
|
|
5f2788eb9e |
No files matched your search
@@ -179,7 +179,7 @@ namespace Elwig.Helpers.Billing {
|
||||
} else {
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
var ctrd = obj["contracted"] ?? obj["geb"];
|
||||
var ctrd = obj["ctrd"] ?? obj["geb"];
|
||||
if (ctrd is JsonObject) {
|
||||
c2 = GetCurveData(ctrd.AsObject(), cMode);
|
||||
} else if (ctrd?.AsValue().TryGetValue(out decimal v) == true) {
|
||||
@@ -287,11 +287,9 @@ namespace Elwig.Helpers.Billing {
|
||||
curve["data"] = GraphToJson(entry.DataGraph, entry.Mode.ToString().ToLower());
|
||||
|
||||
if (entry.ContractedFlatBonus != null) {
|
||||
curve["contracted"] = (decimal)entry.ContractedFlatBonus;
|
||||
curve.Remove("geb");
|
||||
curve["ctrd"] = (decimal)entry.ContractedFlatBonus;
|
||||
} else if (entry.ContractedGraph != null) {
|
||||
curve["contracted"] = GraphToJson(entry.ContractedGraph, entry.Mode.ToString().ToLower());
|
||||
curve.Remove("geb");
|
||||
curve["ctrd"] = GraphToJson(entry.ContractedGraph, entry.Mode.ToString().ToLower());
|
||||
}
|
||||
|
||||
return curve;
|
||||
|
||||
@@ -92,13 +92,13 @@
|
||||
{"$ref": "#/definitions/curve_data"}
|
||||
]
|
||||
},
|
||||
"geb": {
|
||||
"ctrd": {
|
||||
"anyOf": [
|
||||
{"type": "number"},
|
||||
{"$ref": "#/definitions/curve_data"}
|
||||
]
|
||||
},
|
||||
"contracted": {
|
||||
"geb": {
|
||||
"anyOf": [
|
||||
{"type": "number"},
|
||||
{"$ref": "#/definitions/curve_data"}
|
||||
|
||||
@@ -35,11 +35,11 @@ namespace Elwig.Windows {
|
||||
|
||||
private static readonly LegendItem
|
||||
UnContractedLegend = new() {
|
||||
LabelText = "UnContracted", LineWidth = 1, LineColor = ColorUnContracted,
|
||||
LabelText = "Ungebunden", LineWidth = 1, LineColor = ColorUnContracted,
|
||||
MarkerStyle = new(MarkerShape.FilledCircle, 5, ColorUnContracted)
|
||||
},
|
||||
ContractedLegend = new() {
|
||||
LabelText = "Contracted", LineWidth = 1, LineColor = ColorContracted,
|
||||
LabelText = "Gebunden", LineWidth = 1, LineColor = ColorContracted,
|
||||
MarkerStyle = new(MarkerShape.FilledCircle, 5, ColorContracted)
|
||||
},
|
||||
LdwLegend = new() {
|
||||
|
||||
@@ -298,7 +298,7 @@ namespace Tests.UnitTests.HelperTests {
|
||||
"73oe": 0.5,
|
||||
"17kmw": 0.6
|
||||
},
|
||||
"contracted": 0.1
|
||||
"ctrd": 0.1
|
||||
}, {
|
||||
"id": 2,
|
||||
"mode": "kmw",
|
||||
@@ -306,7 +306,7 @@ namespace Tests.UnitTests.HelperTests {
|
||||
"15kmw": 0.6,
|
||||
"17kmw": 0.7
|
||||
},
|
||||
"contracted": {
|
||||
"ctrd": {
|
||||
"73oe": 0.65,
|
||||
"17kmw": 0.80
|
||||
}
|
||||
|
||||
@@ -56,12 +56,12 @@ namespace Tests.UnitTests.HelperTests {
|
||||
"id": 1,
|
||||
"mode": "oe",
|
||||
"data": {"15kmw": 0.54},
|
||||
"contracted": 0.1
|
||||
"ctrd": 0.1
|
||||
}, {
|
||||
"id": 2,
|
||||
"mode": "oe",
|
||||
"data": {"15kmw": 0.61},
|
||||
"contracted": 0.1
|
||||
"ctrd": 0.1
|
||||
}]
|
||||
}
|
||||
""";
|
||||
|
||||
Reference in new issue
Block a user