From c968893f9478872f3501e87d4a690aaf21ddaa3f Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Tue, 17 Mar 2026 19:29:05 -0400 Subject: [PATCH] fixed taxable check --- app/jobs/bill_line_items_job.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/jobs/bill_line_items_job.rb b/app/jobs/bill_line_items_job.rb index 524bb57..e427f17 100644 --- a/app/jobs/bill_line_items_job.rb +++ b/app/jobs/bill_line_items_job.rb @@ -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