Closed timmyd87 closed 1 year ago
Is the Product in QBO marked as taxable? I think that's needed to trigger an automatic tax calculation.
If its not taxable then it sounds like it falls back to the human to trigger that on edit invoice.
Thank you for your reply, yes the line item was taxable, tick.
needed to pass the invoice.txn_tax_detail to trigger the calculations - found it here in the docs for anyone that comes across it. - https://developer.intuit.com/app/developer/qbo/docs/workflows/manage-sales-tax-for-us-locales#working-with-tax-codes
Appreciate the point in the right direction
I can successfully update an invoice and add a line item for a credit card fee when they process in my app. However in Quickbooks the line appears excluding tax (which is perfect) but it doesn't update the invoice subtotal to apply the taxable amounts to. Unless i actually go into QBO, click on edit invoice and click on the line item does it trigger this.....Is there any way to force QBO to recalculate the item and invoice totals through the API?
`line = Quickbooks::Model::Line.new line.description = 'Credit Card Processing Fee' line.amount = ActionController::Base.helpers.number_to_currency( @fee, delimiter: '', unit: '') line.sales_item! do |detail| detail.unit_price = ActionController::Base.helpers.number_to_currency(@fee, delimiter: '', unit: '') detail.quantity = 1 detail.tax_code_ref = Quickbooks::Model::BaseReference.new(10) end