mirror of
https://github.com/rickbarrette/redmine_qbo_lineitems.git
synced 2026-04-02 07:01:59 -04:00
fixed taxable check
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user