Skip to Content

Problem when assigning Discount Percent through DI API

Good day experts, I have a problem when I want to specify the Discount Percent to a line within a sales quotation created with DI API. The way in which I assign value is the following:

Cotizacion.Lines.DiscountPercent = double.Parse(dr["DescuentoArticulo"].ToString());

This comes from a DataTable, which contains the number in the following format "#. ####". Example: 5.2800 According to the documentation of the SDK the expected format is a variable double type, however I have dealt with and without decimals, or simply putting a "5" or any other value directly, but my problem is that by assigning any different amount of "0" when creating the document, leave me blank the prices of the items as shown below:

If I replicate the scenario, with the only change of putting "0" in discount, the document is created correctly:

Anyone will have an idea why this problem and how could it be solved? Thank you in advance for your time and support. Best regards.

d1.png (24.9 kB)
d2.png (6.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers