-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should SalesItemLineDetail have a UnitPrice property? #291
Comments
A Sales Receipt SHOULD not have a UnitPrice, but it COULD have one. Try the following. Create a sales receipt for a sandbox company, and on the line only specify the Product/Service + Amount. Leave Qty and Unit Price blank. If you query that in the API explorer, you will see the following. "Line": [ So, Qty and UnitPrice are optional. You might see them in the JSON or not. Likewise, when you create items for invoices and sales receipts, you can decide whether to include those properties or not. Having said that, it appears to have been omitted from the Sales Receipt documentation. |
If it's an optional property, shouldn't the class in the .net SDK define that property? I don't see it in intellisense or the debugger. I see Qty defined in ItemLineDetail which SalesItemLineDetail inherits from. But I don't see UnitPrice (or UnitPriceSpecified) in either. I'm looking at FMS.cs |
In searching these issues we found that it seems to be to set the AnyIntuitObject property and then set another property saying that it's a UnitPrice. Not very intuitive but it works. You still have to provide the total amount and the API will throw an error if Total Amount != Qty * UnitPrice. |
According to the JSON documentation at https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/SalesReceipt, the SalesItemLineDetail should have a UnitPrice property. I see the one for Qty but not UnitPrice. Should the model in this SDK have it or is the JSON sample incorrect?
The text was updated successfully, but these errors were encountered: