Fix price double cast

This commit is contained in:
Sergey Chebotar 2021-12-05 16:32:25 +03:00
parent 5c9ee3ae65
commit 44a48b0818
2 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@
using ExcelDna.Integration; using ExcelDna.Integration;
using Newtonsoft.Json; using Newtonsoft.Json;
using System; using System;
using System.Globalization;
using System.Linq; using System.Linq;
using System.Runtime.Caching; using System.Runtime.Caching;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
@ -96,7 +97,7 @@ namespace Rehau.Sku.Assist
case ProductField.Id: case ProductField.Id:
return product.Id; return product.Id;
case ProductField.Price: case ProductField.Price:
return product.Price; return double.Parse((string)product.Price, CultureInfo.InvariantCulture);
default: default:
return ExcelError.ExcelErrorValue; return ExcelError.ExcelErrorValue;
} }

View File

@ -14,6 +14,6 @@ namespace Rehau.Sku.Assist
[ExcelFunction] [ExcelFunction]
public static object RAUPRICE(string request) public static object RAUPRICE(string request)
=> SkuAssist.GetProduct(request, ProductField.Price); => SkuAssist.GetProduct(request, ProductField.Price);
} }
} }