We are trying to get assembly inventory levels by site.
ItemInventoryAssembly has the total but not divided by site.
ItemSites, which offers inventory by site, does not include assembly items.
However, the following xml request (ItemSiteQueryRq) returns assembly items as well:
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="13.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<ItemSitesQueryRq>
<ItemSiteFilter>
<ItemFilter>
<FullName >The item's full name </FullName>
</ItemFilter>
</ItemSiteFilter>
<MaxReturned>25</MaxReturned>
<ActiveStatus>All</ActiveStatus>
</ItemSitesQueryRq>
</QBXMLMsgsRq>
</QBXML>
Is this just a setting in QODBC?
How can we get inventory by site for assembly items?
Turns out that the table ItemSites has assembly inventory levels as well. But the item numbers are listed in other columns.
So for regular inventory the columns are ItemInventoryRefListID and ItemInventoryRefFullName,
And for assembly inventory the columns are ItemInventoryAssemblyRefListID and ItemInventoryAssemblyRefFullName
Related
I am trying to modify a sales order created in QB Desktop. But it gives me XML error
0x80040400: QuickBooks found an error when parsing the provided XML text stream.
Here is my XML Request
<?xml version="1.0" encoding="ISO-8859-1"?>
<?qbxml version="11.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<SalesOrderModRq>
<SalesOrderMod>
<TxnID>1-1672737866</TxnID>
<EditSequence>1672737866</EditSequence>
<CustomerRef>
<FullName>156004 Loose Bee Ln</FullName>
</CustomerRef>
<TxnDate>2023-01-03</TxnDate>
<BillAddress>
<Addr1>123</Addr1>
<Addr2></Addr2>
<City>Gity</City>
<State>Ritham</State>
<PostalCode>5555</PostalCode>
<Country>Universe</Country>
</BillAddress>
<PONumber>4444444</PONumber>
<Other>Southshore Bay</Other>
<SalesOrderLineMod>
<TxnID>3-1672737866</TxnID
<ItemRef>
<FullName>Single Family - One Story</FullName>
</ItemRef>
<Desc>Foundation</Desc>
<Quantity>1</Quantity>
<Amount>85.00</Amount>
<DataExtMod>
<OwnerID>0</OwnerID>
<DataExtName>Lot</DataExtName>
<DataExtValue>8/98</DataExtValue>
</DataExtMod>
<DataExtMod>
<OwnerID>0</OwnerID>
<DataExtName>Address</DataExtName>
<DataExtValue>156004 Loose Bee Ln</DataExtValue>
</DataExtMod>
</SalesOrderLineMod>
</SalesOrderMod>
</SalesOrderModRq>
</QBXMLMsgsRq>
</QBXML>
Any help is highly appreciatable..
Whenever you get this error:
0x80040400: QuickBooks found an error when parsing the provided XML text stream
It means you used an XML tag incorrectly, an unsupported XML tag, or an XML tag in the wrong order.
You can refer to the documentation to see what supported tags, their order, etc. are:
https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/salesordermod
At least at first glance, I can see that TxnID inside SalesOrderLineMod is not correct (maybe you meant TxnLineID instead?):
<SalesOrderLineMod>
<TxnID>3-1672737866</TxnID
It may also be worth double-checking those DataExtMod tags too.
I'm running this query:
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="14.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<InvoiceQueryRq>
<IncludeLineItems>1</IncludeLineItems>
<IncludeLinkedTxns>1</IncludeLinkedTxns>
</InvoiceQueryRq>
</QBXMLMsgsRq>
</QBXML>
And I get this invoice line which is an expense created with the "Add Time/Costs" button in Quickbooks Desktop.
<InvoiceLineRet>
<TxnLineID>8E-1343336207</TxnLineID>
<Desc>License and Title</Desc>
<Rate>315</Rate>
<Amount>315.00</Amount>
<ServiceDate>2012-07-26</ServiceDate>
<SalesTaxCodeRef>
<ListID>80000002-1343060273</ListID>
<FullName>Non</FullName>
</SalesTaxCodeRef>
</InvoiceLineRet>
With most invoice lines, there's an item associated with it and I can get the account(s) associated with the item. I want to get the account ListID that's associated with this invoice line, as with other invoice lines. I can get the account name with a GeneralDetailReportQuery, but not the ID, and that report is much harder to work with as I'm importing Quickbooks data into another system.
How can I find the accountID for lines like this?
I am trying to create SalesOrder through QBWebConnector (backend - Rails + qbwc), following Onscreen Reference for Intuit Software Development Kits, and it says that SalesOrderAdd requires only CustomerRef attribute, but QBXML validator says:
Line: 10
LinePos: 9
Src Text: </SalesOrderAdd>
Reason: Element content is incomplete according to the DTD/Schema.
Expecting: ClassRef, TemplateRef, TxnDate, RefNumber, BillAddress, ShipAddress, PONumber, TermsRef, DueDate, SalesRepRef, FOB, ShipDate.
QBXML Request is:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?qbxml version="7.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<SalesOrderAddRq>
<SalesOrderAdd>
<CustomerRef>
<FullName>Test customer</FullName>
</CustomerRef>
</SalesOrderAdd>
</SalesOrderAddRq>
</QBXMLMsgsRq>
</QBXML>
Why is that? Can I change this behavior somehow (omit all tags except pointed as required in Onscreen Reference)?
The OSR is... less than perfect. But it does indicate there are additional required fields.
You need to add at least one line item or group line.
I want to delete a particular customer from quickbooks using the ListId of that customer . What would be my qbxml request in that case ?
You can use the ListDelRq to delete list-type things (Customers, Items, Vendors, etc.) from QuickBooks.
Refer to the OSR for full syntax:
https://developer-static.intuit.com/qbSDK-current/Common/newOSR/index.html
Your request will look something like this:
?xml version="1.0" encoding="utf-8"?>
<?qbxml version="9.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<ListDelRq>
<!-- ListDelType may have one of the following values: Account, BillingRate, Class, Currency, Customer, CustomerMsg, CustomerType, DateDrivenTerms, Employee, InventorySite, ItemDiscount, ItemFixedAsset, ItemGroup, ItemInventory, ItemInventoryAssembly, ItemNonInventory, ItemOtherCharge, ItemPayment, ItemSalesTax, ItemSalesTaxGroup, ItemService, ItemSubtotal, JobType, OtherName, PaymentMethod, PayrollItemNonWage, PayrollItemWage, PriceLevel, SalesRep, SalesTaxCode, ShipMethod, StandardTerms, ToDo, UnitOfMeasureSet, Vehicle, Vendor, VendorType, WorkersCompCode -->
<ListDelType>ENUMTYPE</ListDelType>
<ListID>IDTYPE</ListID>
</ListDelRq>
</QBXMLMsgsRq>
</QBXML>
I would like to get the ItemReceipt items that have LinkedTxn with the PurchaseOrder type.
Now I use the following query:
<?xml version="1.0" encoding="utf-8"?><?qbxml version="12.0"?>
<?qbxml version="12.0"?>
<QBXML>
<QBXMLMsgsRq onError="continueOnError">
<ItemReceiptQueryRq requestID="1">
<IncludeLineItems>true</IncludeLineItems>
<IncludeLinkedTxns>true</IncludeLinkedTxns>
<OwnerID>0</OwnerID>
</ItemReceiptQueryRq>
</QBXMLMsgsRq>
</QBXML>
The query returned all ItemReceipt items, and I filtred them on the client.
Could you tell me if there is a way to create a filter that returns only items that have LinkedTxn with the PurchaseOrder type?
The QuickBooks SDK does not support a way to create a filter that returns only items that have a LinkedTxn with a certain type.
You'll have to pull all of the transactions, and then filter them within your app.