diff --git a/FortnoxAPILibrary.Tests/ConnectorTests/ContractAccrualTests.cs b/FortnoxAPILibrary.Tests/ConnectorTests/ContractAccrualTests.cs index 972a96ca..c6fe435d 100644 --- a/FortnoxAPILibrary.Tests/ConnectorTests/ContractAccrualTests.cs +++ b/FortnoxAPILibrary.Tests/ConnectorTests/ContractAccrualTests.cs @@ -42,7 +42,7 @@ public void Test_ContractAccrual_CRUD() InvoiceRows = new List() { new ContractInvoiceRow() - {ArticleNumber = tmpArticle.ArticleNumber, DeliveredQuantity = "6", Price = "1000", VAT = "0"} + {ArticleNumber = tmpArticle.ArticleNumber, DeliveredQuantity = 6, Price = 1000, VAT = 0} }, PeriodStart = new DateTime(2020, 01, 1), PeriodEnd = new DateTime(2020, 03, 20) @@ -132,7 +132,7 @@ public void Test_ContractAccrual_Find() InvoiceRows = new List() { new ContractInvoiceRow() - {ArticleNumber = tmpArticle.ArticleNumber, DeliveredQuantity = "6", Price = "1000", VAT = "0"} + {ArticleNumber = tmpArticle.ArticleNumber, DeliveredQuantity = 6, Price = 1000, VAT = 0} }, PeriodStart = new DateTime(2020, 01, 1), PeriodEnd = new DateTime(2020, 03, 20) diff --git a/FortnoxAPILibrary.Tests/ConnectorTests/ContractTests.cs b/FortnoxAPILibrary.Tests/ConnectorTests/ContractTests.cs index 97290abd..584055dd 100644 --- a/FortnoxAPILibrary.Tests/ConnectorTests/ContractTests.cs +++ b/FortnoxAPILibrary.Tests/ConnectorTests/ContractTests.cs @@ -42,9 +42,9 @@ public void Test_Contract_CRUD() Language = Language.English, InvoiceRows = new List() { - new ContractInvoiceRow(){ ArticleNumber = tmpArticle.ArticleNumber, DeliveredQuantity = "10"}, - new ContractInvoiceRow(){ ArticleNumber = tmpArticle.ArticleNumber, DeliveredQuantity = "20"}, - new ContractInvoiceRow(){ ArticleNumber = tmpArticle.ArticleNumber, DeliveredQuantity = "15"} + new ContractInvoiceRow(){ ArticleNumber = tmpArticle.ArticleNumber, DeliveredQuantity = 10}, + new ContractInvoiceRow(){ ArticleNumber = tmpArticle.ArticleNumber, DeliveredQuantity = 20}, + new ContractInvoiceRow(){ ArticleNumber = tmpArticle.ArticleNumber, DeliveredQuantity = 15} }, PeriodStart = new DateTime(2020, 01, 01), PeriodEnd = new DateTime(2020, 03, 01) @@ -106,9 +106,9 @@ public void Test_Contract_Find() Language = Language.English, InvoiceRows = new List() { - new ContractInvoiceRow(){ ArticleNumber = tmpArticle.ArticleNumber, DeliveredQuantity = "10"}, - new ContractInvoiceRow(){ ArticleNumber = tmpArticle.ArticleNumber, DeliveredQuantity = "20"}, - new ContractInvoiceRow(){ ArticleNumber = tmpArticle.ArticleNumber, DeliveredQuantity = "15"} + new ContractInvoiceRow(){ ArticleNumber = tmpArticle.ArticleNumber, DeliveredQuantity = 10}, + new ContractInvoiceRow(){ ArticleNumber = tmpArticle.ArticleNumber, DeliveredQuantity = 20}, + new ContractInvoiceRow(){ ArticleNumber = tmpArticle.ArticleNumber, DeliveredQuantity = 15} }, PeriodStart = new DateTime(2020, 01, 01), PeriodEnd = new DateTime(2020, 03, 01) diff --git a/FortnoxAPILibrary/Entities/Contracts/ContractInvoiceRow.cs b/FortnoxAPILibrary/Entities/Contracts/ContractInvoiceRow.cs index a558510d..f67090f7 100644 --- a/FortnoxAPILibrary/Entities/Contracts/ContractInvoiceRow.cs +++ b/FortnoxAPILibrary/Entities/Contracts/ContractInvoiceRow.cs @@ -18,12 +18,12 @@ public class ContractInvoiceRow /// Contribution Percent [ReadOnly] [JsonProperty] - public string ContributionPercent { get; private set; } + public decimal ContributionPercent { get; private set; } /// Contribution Value [ReadOnly] [JsonProperty] - public string ContributionValue { get; private set; } + public decimal ContributionValue { get; private set; } /// Cost center code [JsonProperty] @@ -31,7 +31,7 @@ public class ContractInvoiceRow /// Delivered quantity [JsonProperty] - public string DeliveredQuantity { get; set; } + public decimal DeliveredQuantity { get; set; } /// Description [JsonProperty] @@ -39,7 +39,7 @@ public class ContractInvoiceRow /// Discount amount [JsonProperty] - public string Discount { get; set; } + public decimal Discount { get; set; } /// AMOUNT / PERCENT [JsonProperty] @@ -51,7 +51,7 @@ public class ContractInvoiceRow /// Unit price [JsonProperty] - public string Price { get; set; } + public decimal Price { get; set; } /// Project code [JsonProperty] @@ -60,7 +60,7 @@ public class ContractInvoiceRow /// Row amount [ReadOnly] [JsonProperty] - public string Total { get; private set; } + public decimal Total { get; private set; } /// Code of unit [JsonProperty] @@ -68,6 +68,6 @@ public class ContractInvoiceRow /// Vat percent code [JsonProperty] - public string VAT { get; set; } + public decimal VAT { get; set; } } } \ No newline at end of file diff --git a/FortnoxAPILibrary/FortnoxAPILibrary.csproj b/FortnoxAPILibrary/FortnoxAPILibrary.csproj index b3de3d34..1d0bfef6 100644 --- a/FortnoxAPILibrary/FortnoxAPILibrary.csproj +++ b/FortnoxAPILibrary/FortnoxAPILibrary.csproj @@ -4,7 +4,7 @@ netstandard2.0 8 Fortnox.NET.SDK - 3.4.0-alpha + 3.4.0 Richard Randak Softwerk AB Official .NET SDK for Fortnox API. This package is on behalf of Fortnox AB developed and maintained by Softwerk AB. For more information please visit our repository on Github.