Billing: Add functionality to collapse curves
This commit is contained in:
@ -18,10 +18,11 @@ namespace Elwig.Helpers.Billing {
|
||||
public double? GebundenFlatBonus {
|
||||
get {
|
||||
try {
|
||||
return GebundenGraph?.DataX.Zip(GebundenGraph.DataY)
|
||||
var val = GebundenGraph?.DataX.Zip(GebundenGraph.DataY)
|
||||
.Select(e => Math.Round(e.Second - DataGraph.GetPriceAtOe(e.First), Precision))
|
||||
.Distinct()
|
||||
.Single();
|
||||
return (val == 0) ? null : val;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user