Combine the labor settings into Labor products/services

The estimate item codes and "Replaced by imported time" become one list of products/services
(RedmineQboBilling::LaborItems), used to create issues from an estimate's labor lines (and an
appointment's minimum hours), to offer an invoice's labor lines to be replaced by imported time, and
to total the hours on estimates and invoices for the business report. While none are chosen,
products/services named Labor are used. The old settings and redmine_qbo_calendar's fallbacks are no
longer read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
This commit is contained in:
Claude committed 2026-10-31 08:22:32 -04:00
1 parent 616ee13725
commit 4732c32409
12 files changed
+120 -83

No files matched your search

@@ -39,14 +39,6 @@ module RedmineQboBilling
EstimateWriter
end
# The plugin setting "Replaced by imported time": only lines with these products/services are offered
# under Replace these lines when time is imported (e.g. an estimate's Labor lines); empty offers every line
def replaceable_item_ids
Array(Setting.plugin_redmine_qbo['replaceable_item_ids']).map(&:to_s).reject(&:blank?).uniq
rescue StandardError
[]
end
# A blank invoice for the customer, dated today
def new_form(customer: nil, user: User.current)
EstimateForm.new(