Home › Forums › CoreObjX / DB › QB is displaying wrong cost even i pass a correct value using coreobjx
Tagged: QB cost, Wrong cost
This topic contains 5 replies, has 2 voices, and was last updated by dontbugmexd 2 years, 10 months ago.
I pass a cost of 300 and amount of 510 using coreobjx in QB but QB displaying the amount instead of cost.
See screenshot.
But the item created in QB has the correct cost but when in comes with the estimates the amount is being displayed as cost.
And also when i added the item manually inside QB the cost displays the correct value but using coreobjx to add item to estimates it displays the amount to the cost instead of the cost itself.
Here’s my code.
Dim oLine As CoreObjX70.txnItemLine = estimate.ItemLines.Add()
oLine.Item = qbItem.FullName
oLine.Cost = DataMan.ToDouble(lineItem.Item.Cost) ‘300
oLine.Amount = lineItem.Rate ‘510
oLine.SalesTaxCode = If(lineItem.IsTaxable, “Tax”, “Non”)
oLine.Quantity = lineItem.Quantity
I need answers.
Hello. You shouldn’t assign any value to the “Amount”. The “Amount” will be calculated. I think that is the issue.
Best Regards,
I tried the solution you gave me. I didn’t assign amount but it behaves the same. Still displaying wrong cost at QB. I tried sending diff. new items to QB using VB but no luck.
here’s how i add the item before the code above. lineitem is my model class which contains fields cost for cost and salesprice for amount.
oInventory = qbook.Company.Items.AddInventory(lineItem.QBName, account, cogsAccount, asset, , Double.Parse(lineItem.Cost).ToString(), “” + lineItem.Description + “”, Double.Parse(lineItem.SalesPrice), “” + lineItem.Feature + “”, , , , lineItem.Manufacturer, True)
oInventory.ManufacturerPartNumber = lineItem.Manufacturer
oInventory.PurchaseDescription = lineItem.Description
oInventory.SalesDescription = lineItem.Feature
oInventory.IncomeAccount = account
oInventory.PurchaseCost = lineItem.Cost
oInventory.SalesPrice = lineItem.SalesPrice
And when you look at the item inside item list in QB it’s displaying the correct cost but looking the item in the estimate the cost is wrong.
Hi.
Please answer.
Thanks
You must be logged in to reply to this topic.