Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No UnitPrice available on SalesItemLineDetail using IPP .NET SDK for QuickBooks v3.0?

According to the documentation here: https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/v3/020_key_concepts/0700_other_topics#SalesItemLineDetail

I should have the ability to set a UnitPrice so my Invoices show UnitPrice, Qty and a SubTotal.

I have Invoices working great but I am missing this critical piece of information, here is my code for generating a Line on an Invoice:

foreach (var i in orderItems)
            {
                Line invLine = new Line();
                invLine.Id = i.ItemID;
                invLine.Amount = i.SubTotal.Value;
                invLine.AmountSpecified = true;
                invLine.Description = i.ItemName;
                invLine.DetailType = LineDetailTypeEnum.SalesItemLineDetail;
                invLine.DetailTypeSpecified = true;

                SalesItemLineDetail silDetails = new SalesItemLineDetail();
                silDetails.Qty = i.Qty;
                silDetails.QtySpecified = true;
                silDetails.ItemRef = new ReferenceType() {  Value = i.ItemID };
                invLine.AnyIntuitObject = silDetails;

                invoice.Line[lineCount] = invLine;
                lineCount += 1;
            }

Does anyone have this working? What am I missing here?

like image 395
Slee Avatar asked Sep 09 '13 17:09

Slee


1 Answers

//Line Sales Item Line Detail - UnitPrice
lineSalesItemLineDetail.AnyIntuitObject = 33m;
lineSalesItemLineDetail.ItemElementName = ItemChoiceType.UnitPrice;

https://gist.github.com/IntuitDeveloperRelations/6500373

like image 177
Peter Lavelle Avatar answered Nov 17 '22 12:11

Peter Lavelle