minimul / qbo_api

Ruby JSON-only client for QuickBooks Online API v3. Built on top of the Faraday gem.
MIT License
85 stars 46 forks source link

Tax code issues #85

Closed viveki2it closed 4 years ago

viveki2it commented 6 years ago

Hi,

I'm using this gem to integrate quickbooks with my product. I'm able to sync invoice and it's line items to quickbooks and I've also figured out a way that how to apply tax code on invoice line items but I'm facing an issue when I try to apply tax rate to a quickbooks invoice. Can anyone please guide me to some tutorial or help me by telling me about what methods I should use to apply the tax-rate.

And alo, let me know there is a way to integrate custom taxes to invoices.

Thanks.

minimul commented 6 years ago

Have you read through this tutorial?

ntippie commented 6 years ago

Applying a tax code to an sales transaction is done at the transaction level for companies that use the global QBO edition, and at the transaction line level for companies that use the US QBO edition. As I recall, you can't use both methods in the same company with the v3 API. You can tell which method you should be following for a given company by querying the CompanyInfo resource for the Country attribute.

line_level_tax = qbo_api.get(:company_info, qbo_api.realm_id)['Country'] != 'US'
bf4 commented 6 years ago

@viveki2it You may find my notes in https://github.com/minimul/qbo_api/pull/77#discussion_r177903418 helpful