mirror of
https://github.com/rickbarrette/redmine_qbo_lineitems.git
synced 2026-11-17 19:20:36 -05:00
Move items, accounts and estimate writing to redmine_qbo_billing
The QuickBooks product/service list and income accounts (models, syncs, admin pages, routes, settings) now live in redmine_qbo_billing, which this plugin requires. The closing-an-issue estimate is written through RedmineQboBilling::EstimateWriter.create_estimate, so estimate building isn't duplicated; it now also gets the customer email, VIN, default message and expiration date. Migrations: 002 now only links line items to items (skipped where the column exists). 003 and 004 are removed; billing's migrations find the existing items and accounts tables and leave them alone, so nothing is dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
This commit is contained in:
24 files changed
+43
-748
No files matched your search
@@ -18,7 +18,6 @@ Redmine::Plugin.register :redmine_qbo_lineitems do
|
||||
url 'https://github.com/rickbarrette/redmine_qbo_lineitems'
|
||||
author_url 'https://barrettefabrication.com'
|
||||
requires_redmine version_or_higher: '6.1.0'
|
||||
settings partial: 'line_items/settings'
|
||||
|
||||
# Ensure redmine_qbo is installed
|
||||
begin
|
||||
@@ -26,6 +25,14 @@ Redmine::Plugin.register :redmine_qbo_lineitems do
|
||||
rescue Redmine::PluginNotFound
|
||||
raise 'Please install the redmine_qbo plugin (https://github.com/rickbarrette/redmine_qbo)'
|
||||
end
|
||||
|
||||
# The QuickBooks product/service list, accounts and estimate writing live in redmine_qbo_billing
|
||||
# (it sorts before this plugin, so Redmine has already loaded it)
|
||||
begin
|
||||
requires_redmine_plugin :redmine_qbo_billing, version_or_higher: '2026.10.0'
|
||||
rescue Redmine::PluginNotFound
|
||||
raise 'Please install the redmine_qbo_billing plugin (https://github.com/rickbarrette/redmine_qbo_billing)'
|
||||
end
|
||||
|
||||
# Line items can be submitted with an issue only by users who may add, edit or delete them.
|
||||
# Which changes are applied is checked per line in Issue#line_items_attributes= (see IssuePatch).
|
||||
@@ -34,7 +41,7 @@ Redmine::Plugin.register :redmine_qbo_lineitems do
|
||||
}
|
||||
|
||||
# Global Permissions. Line items live on issues; these control what users can do with them there.
|
||||
# Managing the QBO item catalog, accounts and syncs is admin-only.
|
||||
# The item search (redmine_qbo_billing's items#autocomplete) feeds the line item form.
|
||||
permission :view_line_items, {}, global: true
|
||||
permission :add_line_items, { items: [:autocomplete] }, global: true
|
||||
permission :edit_line_items, { items: [:autocomplete] }, global: true
|
||||
|
||||
Reference in new issue
Block a user