How to add Sales Tax Item to QuickBooks Desktop? - quickbooks

I am using QB desktop edition. I am creating all Items like Inventory/Service/OtherCharge/Payment in QB through IDS,but I am not able to add -'Sales Tax Item' throgh my .net code,because
Intuit.Ipp.Data.Qbd.ItemTypeEnum - Having only Assembly/FixedAsset/Group/Inventory/Service/OtherCharge/Payment.Product/SubTotal. and not Sales Tax Item.
Is there any other way to create Sales Tax Item ?
Please help.
Regards,
Reshma D.

You can use the SalesTax object instead.
<?xml version="1.0" encoding="utf-16"?>
<Add xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" RequestId="26d2185e14e24563afe3ea451f70440b" xmlns="http://www.intuit.com/sb/cdm/v2">
<ExternalRealmId>132875294</ExternalRealmId>
<Object xsi:type="SalesTax">
<Name>All ST</Name>
<Desc>County supplemental tax</Desc>
<TaxRate>10</TaxRate>
<VendorName>Franchise Tax Board</VendorName>
</Object>
</Add>
Documentation is here.

Related

quickbooks api to add a payment against an invoice with RubyRails app

I am trying to mark an invoice mark as paid and as per my understanding I have to add a payment against the invoice. I am using qbwc gem and it is using qbxml v.13.
I have found out few examples of creating the payment object here https://community-intuit.force.com/developer/s/article/QBO-REST-Apply-payments-to-invoice but the qbxml tag for creating payment is not clear to me.
Here are few xml tags that I have found in OSR ReceivePaymentAddRq, ItemPaymentAddRq etc
But I am still not sure how to create the payment object and which xml tags should be used and help is appreciated, thanks in advance.
A minimal qbXML example looks like this:
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="10.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<ReceivePaymentAddRq>
<ReceivePaymentAdd>
<CustomerRef>
<ListID>F230000-1196864585</ListID>
<!--<FullName>Keith Palmer</FullName>--> <!-- You can specify either ListID or FullName -->
</CustomerRef>
<TxnDate>2007-12-14</TxnDate>
<RefNumber>00612361</RefNumber>
<TotalAmount>195.00</TotalAmount>
<!-- Specify the Invoice TxnID here, or see below for auto-apply... -->
<AppliedToTxnAdd>
<TxnID>12006-1196864828</TxnID>
<PaymentAmount>195.00</PaymentAmount>
</AppliedToTxnAdd>
<!-- If you don't want to apply payments manually to a particular transaction, use <IsAutoApply>true</IsAutoApply> -->
<!-- instead of the <AppliedToTxn> node. QuickBooks will make it's best guess how to apply the payment. -->
</ReceivePaymentAdd>
</ReceivePaymentAddRq>
</QBXMLMsgsRq>
</QBXML>

Quickbooks error message: something has been deleted

When we sent some data to Quickbooks Online to sync up, the following error was returned. The values looked fine. How to further investigate this problem?
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<FaultInfo xmlns="http://www.intuit.com/sb/cdm/baseexceptionmodel/xsd">
<Message>Something you're trying to use has been deleted. Check the fields with accounts, customers, items, vendors or employees.</Message>
<ErrorCode>-20403</ErrorCode>
<Cause>SERVER</Cause>
</FaultInfo>
<?xml version="1.0" encoding="UTF-8"?>
<Bill xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:ns2="http://www.intuit.com/sb/cdm/qbo">
<Header>
<DocNumber>D968866A85B</DocNumber>
<TxnDate>2014-05-18</TxnDate>
<Note>April Home Based Expenses</Note>
<VendorId>2014</VendorId>
<TotalAmt>-150.00</TotalAmt>
</Header>
<Line>
<Desc>Internet/Online Fees:Home Based Expenses:Troy Cable</Desc>
<Amount>50.00</Amount>
<ClassId idDomain="QBO">3000000000000299133</ClassId>
<AccountId idDomain="QBO">51</AccountId>
</Line>
<Line>
<Desc>Mobile/Cellular Phone:Home Based Expenses:Verizon Wireless</Desc>
<Amount>100.00</Amount>
<ClassId idDomain="QBO">3000000000000299133</ClassId>
<AccountId idDomain="QBO">51</AccountId>
</Line>
</Bill>
I searched online and found that could be a bad bank account. But no bank account is in this XML string we sent.
Either your vendor, 2014, or account, 51, reference has been deleted. Check each manually on QBO or with an API call.

QBO unable to upload invoice

My task is to upload an invoice to UK QuickBooks Online.
I always get an error:
"You must select a product/service or an account for each split line with either an amount or a billable $$customer$$."
My XML request:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Invoice xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:ns2="http://www.intuit.com/sb/cdm/qbopayroll/v1" xmlns:ns3="http://www.intuit.com/sb/cdm/qbo">
<Header>
<TxnDate>2013-11-30</TxnDate>
<CustomerId idDomain="QBO">1</CustomerId>
<TaxAmt>6.8</TaxAmt>
<BillAddr>
<Line1>Alex</Line1>
<Line2>Test</Line2>
<Line3>Prague</Line3>
</BillAddr>
<ShipAddr>
<Line1>Test</Line1>
<Line2>Prague</Line2>
</ShipAddr>
<BillEmail></BillEmail>
<DiscountTaxable>false</DiscountTaxable>
</Header>
<Line>
<Desc>Internet connection</Desc>
<Amount>34</Amount>
<Taxable>true</Taxable>
<ItemId>3</ItemId>
<UnitPrice>34</UnitPrice>
<Qty>1.00</Qty>
</Line>
How can I solve this problem?
Thanks.
It looks like you're using the v2 APIs, which only support the USA QuickBooks Online editions.
Have you tried using the v3 APIs, which use a global tax model which supports what you're trying to do?

Intuit Partner Platform QBD API v2: Invoice create / update doesn't seem to recognize item Amount, Price & Quantity

I am trying export Invoices from my app to QuickBooks Desktop. The invoice gets created, and I get a success message, but the QuickBooks Desktop app does not reflect the Amount, Price or Quantity sent through the API.
Here is a request / response example of one such operation:
Request:
<?xml version="1.0"?>
<Mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.intuit.com/sb/cdm/v2" RequestId="6ffd7874b723b84ad2eba8146c12fda1">
<ExternalRealmId>MY_REALM_ID</ExternalRealmId>
<Object xsi:type="Invoice">
<Id idDomain="NG">2064384</Id>
<SyncToken>4</SyncToken>
<Header>
<DocNumber>100009</DocNumber>
<TxnDate>2013-10-16</TxnDate>
<Status>Pending</Status>
<CustomerId idDomain="QB">2</CustomerId>
<CustomerName>Jenny Cliff</CustomerName>
<RemitToId idDomain="QB">2</RemitToId>
<RemitToName>Jenny Cliff</RemitToName>
<ShipDate>2013-10-16</ShipDate>
<SubTotalAmt>950.0</SubTotalAmt>
<TaxRate>0.0</TaxRate>
<TaxAmt>0.0</TaxAmt>
<TotalAmt>950.0</TotalAmt>
<ToBePrinted>true</ToBePrinted>
<ToBeEmailed>false</ToBeEmailed>
<ARAccountId idDomain="QB">40</ARAccountId>
<ARAccountName>Accounts Receivable</ARAccountName>
<DueDate>2013-10-17</DueDate>
<BillAddr>
<Line1>217 E Washington Ave,</Line1>
<City>Sunnyvale</City>
<Country>USA</Country>
<CountrySubDivisionCode>CA</CountrySubDivisionCode>
<PostalCode>94086</PostalCode>
<Tag>Billing</Tag>
</BillAddr>
<ShipAddr>
<Line1>217 E Washington Ave,</Line1>
<City>Sunnyvale</City>
<CountrySubDivisionCode>CA</CountrySubDivisionCode>
<PostalCode>94086</PostalCode>
<Default>false</Default>
<Tag>Shipping</Tag>
</ShipAddr>
<Balance>950.0</Balance>
</Header>
<Line>
<Desc>Test Item 1</Desc>
<Amount>500.0</Amount>
<UnitPrice>500.0</UnitPrice>
<Qty>1</Qty>
</Line>
<Line>
<Desc>Test Item 2</Desc>
<Amount>450.0</Amount>
<UnitPrice>450.0</UnitPrice>
<Qty>1</Qty>
</Line>
</Object>
</Mod>
Response:
<RestResponse xmlns="http://www.intuit.com/sb/cdm/v2">
<Success RequestId="6ffd7874b723b84ad2eba8146c12fda1">
<ObjectRef>
<Id idDomain="NG">2064384</Id>
<SyncToken>5</SyncToken>
<LastUpdatedTime>2013-10-16T17:45:06Z</LastUpdatedTime>
</ObjectRef>
<RequestName>InvoiceMod</RequestName>
<ProcessedTime>2013-10-16T17:45:06Z</ProcessedTime>
</Success>
</RestResponse>
Documentation reference can be found here.
Per the documentation:
https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/v2/0500_quickbooks_windows/0600_object_reference/invoice
For each node you specify, you MUST also specify an Item node. From the docs:
ItemId
IdType
Required
ID for the Item object. A reference to the Item is required for the Create operation, either the ItemId or ItemName; ItemId is preferred.
Change your XML request so that you're referring to an item.
This mirrors the behavior of the QuickBooks GUI.

quickbooks vendor credit error message

When I sent the following XML to QuickBooks Desktop cloud, I received the following error which I don't understand. Googled but didn't find anything relating. Does anyone know what the source column is?
error message received:
p_validate_txn_ln - unable to find src_column_name_id per ref id acc_id = 39 idDomain = QB
<Object xsi:type="VendorCredit"><Header>
<DocNumber>8D1FC366607</DocNumber>
<TxnDate>2013-09-11</TxnDate>
<Note>Expense Report 09/11/2013 #2</Note>
<VendorName>E100</VendorName>
<TotalAmt>-25.00</TotalAmt>
<APAccountName>Accounts Payable</APAccountName></Header>
<Line>
<Desc>Airfare:</Desc>
<Amount>25.00</Amount>
<ClassId idDomain="QB">5</ClassId>
<ReimbursableInfo>
<CustomerId idDomain="QB">5</CustomerId>
<JobId idDomain="QB">6</JobId>
</ReimbursableInfo>
<BillableStatus>NotBillable</BillableStatus>
<AccountId idDomain="QB">39</AccountId>
</Line>
</Object>
After not including AccountId or ItemId, I was able to send the create VendorCredit object fine. Got success response. However after I ran sync manager, go to QB Desktop, find the Account, the vendorCredit is not there. Any advice?
XML sent:
<Object xsi:type="VendorCredit">
<Header>
<DocNumber>58B58878D79</DocNumber>
<TxnDate>2013-09-12</TxnDate>
<Note>Expense Report 09/12/2013 #2</Note>
<VendorName>E100</VendorName>
<TotalAmt>-43.80</TotalAmt>
<APAccountName>Accounts Payable</APAccountName>
</Header>
<Line>
<Desc>Advertising:</Desc>
<Amount>43.80</Amount>
<ClassId idDomain="QB">1</ClassId>
<ReimbursableInfo>
<CustomerId idDomain="QB">4</CustomerId>
<JobId idDomain="QB">8</JobId>
</ReimbursableInfo>
</Line>
</Object>
Response received:
<?xml version="1.0" encoding="UTF-8"?>
<RestResponse>
<Success RequestId="4a3f1538a01b4a4dac6f03406c6710c7">
<VendorCredit>
<Id idDomain="NG">14542796</Id>
<SyncToken>1</SyncToken>
<MetaData>
<CreatedBy>app</CreatedBy>
<CreateTime>2013-09-12T23:41:38Z</CreateTime>
<LastModifiedBy>app</LastModifiedBy>
<LastUpdatedTime>2013-09-12T23:41:38Z</LastUpdatedTime>
</MetaData>
<Synchronized>false</Synchronized>
<Header>
<DocNumber>58B58878D79</DocNumber>
<TxnDate>2013-09-12T00:00:00Z</TxnDate>
<Note>Expense Report 09/12/2013 #2</Note>
<VendorName>E100</VendorName>
<TotalAmt>-43.8</TotalAmt>
<APAccountName>Accounts Payable</APAccountName>
</Header>
<Line>
<Id idDomain="NG">50786642</Id>
<Desc>Advertising:</Desc>
<Amount>43.8</Amount>
<ClassId idDomain="QB">1</ClassId>
<ReimbursableInfo>
< CustomerId idDomain="QB">4</CustomerId>
<JobId idDomain="QB">8</JobId>
</ReimbursableInfo>
</Line>
</VendorCredit>
<RequestName>VendorCreditAdd</RequestName><ProcessedTime>2013-09-12T23:41:38Z</ProcessedTime>
</Success>
</RestResponse>
Although the docs mention AccountId as a required field, it is not(the docs might be slightly off). You can ignore it. if you chooss to add it then all fields related to Items need to included.
Instead ItemId is a required field. So, please include it in your request.
Please refer:
https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/v2/0500_quickbooks_windows/0600_object_reference/vendorcredit
I created a vendor create request as follows and was able to get the correct response.
Request-
<Add xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" RequestId="Szey2z7hrGf888888888jfc5hrGSYg99" xsi:schemaLocation="http://www.intuit.com/sb/cdm/v2 ./RestDataFilter.xsd">
<Object xsi:type="VendorCredit">
<Header>
<DocNumber>8D1FC366607</DocNumber>
<TxnDate>2013-09-11</TxnDate>
<Note>Expense Report 09/11/2013 #2</Note>
<VendorName>TestVendor4</VendorName>
<TotalAmt>-25.00</TotalAmt>
<APAccountName>Accounts Payable</APAccountName>
</Header>
<Line>
<Desc>Airfare:</Desc>
<Amount>25.00</Amount>
<ClassId idDomain="QB">1</ClassId>
<ReimbursableInfo>
<CustomerId idDomain="QB">31</CustomerId>
</ReimbursableInfo>
<BillableStatus>NotBillable</BillableStatus>
<ItemId idDomain="QB">12</ItemId>
</Line>
</Object>
</Add>
Response-
<RestResponse xmlns="http://www.intuit.com/sb/cdm/v2">
<Success RequestId="Szey2z7hrGf888888888jfc5hrGSYg99">
<ObjectRef>
<Id idDomain="NG">1925041</Id>
<SyncToken>1</SyncToken>
<LastUpdatedTime>2013-09-12T07:50:34Z</LastUpdatedTime>
</ObjectRef>
<RequestName>VendorCreditAdd</RequestName>
<ProcessedTime>2013-09-12T07:50:34Z</ProcessedTime>
</Success>
</RestResponse>
Edit for the questions asked:
*Please note:*
VendorCredit is an AP transaction representing a credit from a third party for returned goods or services not rendered. In QuickBooks desktop versions, a vendor credit is also known as a "bill credit". That is, it is a credit that a vendor owes you because you overpaid your bill, returned merchandise, or for some other reason. The VendorCredit is not applied until it is referenced in a Bill Payment transaction.
Note: A VendorCredit should not be confused with a Credit Memo, which is something you owe your customer
ItemId refers to those items for which the credit is made. You can get the ItemId by calling the Item api in QBD. Refer is in your request here.
Since, you are not mentioning the itemid in your request xml, you got the response but the sync to QB desktop file failed. You Vendor credit object must have errored out.
To check if the entity is in an error state, you can check by executing a query and setting ErroredObjectsOnly="true".
http://docs.developer.intuit.com/0025_Intuit_Anywhere/0050_Data_Services/v2/0500_QuickBooks_Windows/0100_Calling_Data_Services/0015_Retrieving_Objects#Objects_in_Error_State
If the entity is in error state, you can query for the specific reason using the SyncStatus API:
http://docs.developer.intuit.com/0025_Intuit_Anywhere/0050_Data_Services/v2/0500_QuickBooks_Windows/0600_Object_Reference/SyncStatus
Please add the itemid reference in your request and it should work.
http://support.quickbooks.intuit.com/support/articles/SLN74445
QuickBooks has detected that you have no items When trying to enter an Invoice or a Sales Receipt without an item this warning is received:
QuickBooks has detected that you have no items or that one or more of your amounts are not associated with items. Please enter an item.
Why this is happening
If "Require Accounts" is checked in the Preferences this warning will occur.
How to fix it
To be able to enter in an Invoice or Sales Receipt without an Item on it:
1. Click the Edit Menu.
2. Click Preferences...
3. Click Accounting Preference> Company Preferences.
4. Uncheck Require accounts.
5. Click OK.
You will now be able to enter an Invoice or a Sales Receipt without an item on it.

Resources