cancel
Showing results for 
Search instead for 
Did you mean: 

Setting the prices in a goods receipt

Former Member
0 Kudos

Hi

I want to create good receipt notes for SBO 2005 A SP01 PL36 which I can do fine but I can't seem to set the price correctly, I just seem to end up with the last buy price

Can anyone help me please ?

The code is below

Thanks

Regards Andy

Dim oimports As SAPbobsCOM.Documents

oimports = SBO.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenEntry)

oimports.Reference2 = "ab3"

oimports.Lines.ItemCode = "1110001"

oimports.Lines.Quantity = 1

oimports.Lines.Price = 7.77

oimports.Lines.LineTotal = 7.77

oimports.Lines.DiscountPercent = 0

oimports.Lines.AccountCode = "_SYS00000000917"

If oimports.Add <> 0 Then

MsgBox(SBO.GetLastErrorDescription)

End If

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

When you set the price on the lines it automatically sets the discount percent on that line. The reason for this is that the price is retrieved from the price list and when you change the price it is assumed that you're giving a discount. Try and remove the line that makes the discount percentage zero and see what the effect is. I think this line resets the price.

Hope it helps,

Adele

Former Member
0 Kudos

Hi Adele

I have only just added that line, didn't seem to make any difference

Any other ideas ?

Thanks

Regards Andy

kurt_huwiler
Participant
0 Kudos

Hello Paul,

have you tried with -> .UnitPrice ?

as i know, you have to use .Price or .UnitPrice depending on SBO Company setting

SAPbobsCOM.AdminInfo.CalculateRowDiscount

if tNo

oimports.Lines.Price = 7.77

if tYes

oimports.Lines.UnitPrice = 7.77

Regards

Thomas

Former Member
0 Kudos

Hi Thomas

That worked

Many thanks

Regards Andy

Answers (0)