fixed taxable check

This commit is contained in:
2026-03-17 19:29:05 -04:00
parent 26f84bd221
commit c968893f94

View File

@@ -58,7 +58,10 @@ class BillLineItemsJob < ActiveJob::Base
line.sales_item! do |detail|
detail.unit_price = item.unit_price
detail.quantity = item.quantity
detail.tax_code_ref = Quickbooks::Model::BaseReference.new("TAX") item.item.nil? || item.item.taxable
# Assign "TAX" only if the item is taxable or unknown
if item.item.nil? || item.item.taxable
detail.tax_code_ref = Quickbooks::Model::BaseReference.new("TAX")
end
end
estimate.line_items << line
@@ -68,8 +71,6 @@ class BillLineItemsJob < ActiveJob::Base
log "Created estimate ##{e.doc_number}"
end
private
def log(msg)
Rails.logger.info "[BillLineItemsJob] #{msg}"
end