I pass a cost of 300 and amount of 510 using coreobjx in QB but QB displaying the amount instead of cost.
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.
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.
You must be logged in to reply to this topic.