Fix ods export with doubles
This commit is contained in:
@ -264,8 +264,7 @@ namespace Elwig.Helpers.Export {
|
||||
c = $"<{ct}{add}/>";
|
||||
} else if (data is float || data is double || data is byte || data is char ||
|
||||
data is short || data is ushort || data is int || data is uint || data is long || data is ulong) {
|
||||
|
||||
double v = double.Parse(data?.ToString() ?? "0", CultureInfo.InvariantCulture);
|
||||
double v = double.Parse(data?.ToString() ?? "0"); // use default culture for ToString and Parse()!
|
||||
if (units != null && units.Length > 0) {
|
||||
int n = -1;
|
||||
switch (units[0]) {
|
||||
|
@ -71,6 +71,6 @@ namespace Elwig.Models.Dtos {
|
||||
[NotMapped]
|
||||
public (int? Kg, double? Percent) OverUnderDelivery =>
|
||||
Weight < DeliveryObligation ? (Weight - DeliveryObligation, Weight * 100.0 / DeliveryObligation - 100.0) :
|
||||
Weight > DeliveryRight ? (Weight - DeliveryRight, Weight * 100.0 / DeliveryRight - 100) : (null, null);
|
||||
Weight > DeliveryRight ? (Weight - DeliveryRight, Weight * 100.0 / DeliveryRight - 100.0) : (null, null);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user