Search code examples
c#c#-4.0quickbooksquickbooks-onlineintuit-partner-platform

How to export Line items with Tax Code and Value in QBO Canada


Iam using ASP.NET Web application to export the invoices to QuickBooks online.

It working fine with QBO United states. Then If it is in Canada then it is mandatory to add the TaxCodeRef to the line items else it will throw buissiness validation error. So, i have added the tax code in QBO Canada and the same added with the invoice line items.

                    ReferenceType Tax_info = new ReferenceType();
                    Tax_info.name = "Test_TaxCode";
                    Tax_info.Value = "2";
                    Tax_info.type = "";

For adding with the line items i have used the following lines

                SalesItemLineDetail lineSalesItemLineDetail = new SalesItemLineDetail();
                     /* setup all other properties*/
                lineSalesItemLineDetail.TaxCodeRef = Tax_info;
                        /*export with the invoice*/

but, iam stuck with the following

1) The invoice is exported in the QBO CA , but its tax code is coming as default coming as exempt ? why it happen? Is there any QBO Setting or iam not doing in the proper way? enter image description here

2) The Value is in the TaxCodeRef is the Percentage? in this same case if iam export with the value more than 5 , then it will throw the exception. It describes Error in the tax calculation !

3) Is there anyway to pass the Tax Code Name only, anyway we can set the tax code for items in the QBO so?

I have pretty less knowledge about the Canadian QBO Tax things. Please anyone respond for this , have gone through the link , QBO Developer forum - Canada Tax

Thanks in advance


Solution

  • Please read the global tax model for NON US first so that your initial queries are answered. You should set the taxcode Id of an existing taxcode in the taxcoderef object. https://developer.intuit.com/docs/0100_accounting/0300_developer_guides/global_tax_model