Skip to Content
0
Former Member
Jun 15, 2011 at 02:24 PM

Wrong Unit Price in a Good Issue Document using DI

102 Views

Hi,

in my addon I want to create a new Goods Receipt document, using DI.

In the Lines, I set the ItemCode, I set the Quantity, and I set the Price, then I add the document, but when I go to Sap, in the Goods Receipt created, the Unit Price is wrong. I've try to set Quantity and LineTotal, Quantity and Price, Quantity Price and LineTotal but all the combinations is not correct, and the Unit Price is not equals to the price that I have set.

I have try to change the Price List, but nothing is happened.

This is my simple code:

/////////////////////////

Dim entrataMerce As SAPbobsCOM.Documents = myDB.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenEntry)

entrataMerce.CardCode = cardCode

entrataMerce.Series = series

entrataMerce.Lines.ItemCode = itemCode

entrataMerce.Lines.Quantity = 1

entrataMerce.Lines.Price = 100

entrataMerce.Lines.WarehouseCode = whsCode

entrataMerce.Add()

/////////////////////////

Where is the error?

Thanks

Marco