I can't set the decimal value of SalesQty correctly on client while trying AIF Sales Order

128 views Asked by At

I am trying to create sale order on client with AIF services. I can set values of other fields correctly but when i'm trying to set SalesQty field as for example 20 it's created as 1.00. I don't understand the problem here.

var salesLine = new AxdEntity_SalesLine()
{
     ItemId = txtUrunId.Text,  //"1015188", 
     SalesQty = Convert.ToDecimal(txtMiktar.Text),  //20, 
     SalesUnit = "ADET", 
     TaxGroup = "IHRACAT", 
     TaxItemGroup = "S%0", 
     InventDim = new AxdEntity_InventDim[] { dim }
};
1

There are 1 answers

0
mhmtensyldrm On BEST ANSWER

There's also another field as SalesQtySpecified and that field is boolean. I assigned it to true and now I can assign SalesQty correctly.

var salesLine = new AxdEntity_SalesLine()
{
     ItemId = txtUrunId.Text, 
     SalesQty = Convert.ToDecimal(txtMiktar.Text),
     SalesQtySpecified = true, // THIS IS THE SOLUTION
     SalesUnit = "ADET", 
     TaxGroup = "IHRACAT", 
     TaxItemGroup = "S%0", 
     InventDim = new AxdEntity_InventDim[] { dim }
};