From 1502a939c934f0b04fa4bab95103981a5b96f8c3 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 31 Oct 2026 08:21:19 -0400 Subject: [PATCH] Drop the leftover settings page The labor products/services and the issues-from-estimates defaults are set in redmine_qbo only. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM --- README.md | 2 +- app/controllers/customer_appointments_controller.rb | 2 +- app/models/customer_appointment.rb | 2 +- app/views/settings/_qbo_calendar_settings.html.erb | 5 ----- config/locales/en.yml | 2 -- init.rb | 7 ++----- 6 files changed, 5 insertions(+), 15 deletions(-) delete mode 100644 app/views/settings/_qbo_calendar_settings.html.erb diff --git a/README.md b/README.md index 33a5aec..1831033 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ This plugin allows for adding customer appointment capability to the Redmine cal Add appointments to the redmine calanedar with the abiltiy to attach a QBO customer, QBO Vehicle, QBO Estimate, ect. -* An appointment's hours can't be less than its estimate's labor hours (the lines matching redmine_qbo's estimate item codes). Picking an estimate raises the hours to match. +* An appointment's hours can't be less than its estimate's labor hours (the quantities of its lines with redmine_qbo's labor products/services). Picking an estimate raises the hours to match. * The appointment page lists the issues linked to its estimate, and **Create Issues from Estimate** opens redmine_qbo's Create issues page with the appointment's dates, technician and vehicle. * Estimate pages in redmine_qbo get an **Add appointment** link. diff --git a/app/controllers/customer_appointments_controller.rb b/app/controllers/customer_appointments_controller.rb index 617b629..be7da5b 100644 --- a/app/controllers/customer_appointments_controller.rb +++ b/app/controllers/customer_appointments_controller.rb @@ -24,7 +24,7 @@ class CustomerAppointmentsController < ApplicationController } end - # The estimate's labor hours (redmine_qbo's item codes), so the form can make sure the + # The estimate's labor hours (redmine_qbo's labor products/services), so the form can make sure the # appointment's hours aren't less def estimate_hours estimate = Estimate.find_by(id: params[:estimate_id]) diff --git a/app/models/customer_appointment.rb b/app/models/customer_appointment.rb index b9a171e..6583378 100644 --- a/app/models/customer_appointment.rb +++ b/app/models/customer_appointment.rb @@ -81,7 +81,7 @@ class CustomerAppointment < ActiveRecord::Base end # The estimate's labor hours rounded up to whole hours (appointment hours are whole numbers): the - # quantities of its lines whose item matches redmine_qbo's item codes (e.g. Labor). 0 if the + # quantities of its lines with redmine_qbo's labor products/services (e.g. Labor). 0 if the # estimate can't be read from QuickBooks. def self.estimate_labor_hours(estimate) return 0 if estimate.nil? diff --git a/app/views/settings/_qbo_calendar_settings.html.erb b/app/views/settings/_qbo_calendar_settings.html.erb deleted file mode 100644 index 2216f17..0000000 --- a/app/views/settings/_qbo_calendar_settings.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -<%# The issues-from-estimate settings moved to redmine_qbo %> -

- <%= l(:text_estimate_issue_settings_moved) %> - <%= link_to l(:label_redmine_qbo_settings), plugin_settings_path(id: 'redmine_qbo') %> -

diff --git a/config/locales/en.yml b/config/locales/en.yml index 7363372..5c7af1a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -88,5 +88,3 @@ en: title_customer_appointments: Customer Appointments error_hours_less_than_estimate: "The hours can't be less than the %{hours} labor hours on estimate #%{estimate}" label_estimate_issues: "Issues for estimate #%{estimate}" - label_redmine_qbo_settings: "Redmine QBO settings (Billing)" - text_estimate_issue_settings_moved: "Creating issues from estimates moved to redmine_qbo: the item codes, default project and default tracker are set there." diff --git a/init.rb b/init.rb index d189eb4..98cd12f 100644 --- a/init.rb +++ b/init.rb @@ -19,11 +19,8 @@ Redmine::Plugin.register :redmine_qbo_calendar do author_url 'https://barrettefabrication.com' requires_redmine version_or_higher: '7.0.0' - # Item codes: which QBO estimate items can become issues (e.g. Labor, Alignments) - # The issues-from-estimate settings moved to redmine_qbo, which reads these old values until its - # own are saved, so they're still registered here - settings default: { 'item_codes' => "Labor", 'default_tracker_id' => '', 'default_project_id' => '' }, - partial: 'settings/qbo_calendar_settings' + # No settings of its own: labor products/services and the issues-from-estimates defaults are set in + # redmine_qbo's plugin settings # Add Holidays index to the Redmine Administration Menu menu :admin_menu, :holidays, { controller: 'holidays', action: 'index' }, caption: :label_holiday_plural, html: { class: 'icon icon-list' }