Depend on redmine_qbo for items, accounts and estimates

Billing has been folded into redmine_qbo 2026.11.0.

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-30 23:48:55 -04:00
1 parent dec5b32165
commit ff25bba08e
4 files changed
+11 -20

No files matched your search

+3 -5
View File
@@ -12,8 +12,6 @@ This plugin allows **billable line items** to be attached to a Redmine issue. Wh
* **Parent Plugin:** [Redmine QuickBooks Online](https://github.com/rickbarrette/redmine_qbo) (must be installed and configured)
* **Billing Plugin:** [Redmine QuickBooks Billing](https://github.com/rickbarrette/redmine_qbo_billing). It holds the QuickBooks product/service list, the income accounts, and the estimate writing this plugin uses.
---
@@ -22,7 +20,7 @@ This plugin allows **billable line items** to be attached to a Redmine issue. Wh
| Plugin Version | Redmine Version | Parent Plugin Version |
| --- | --- | --- |
| 2026.3.8+ | 6.1.x | 2026.3.9+ |
| 2026.11.0+ | 7.0.x | 2026.10.1+, with redmine_qbo_billing 2026.10.0+ |
| 2026.11.0+ | 7.0.x | 2026.11.0+ (it holds the product/service list, accounts and estimate writing) |
---
@@ -89,11 +87,11 @@ Before using this plugin:
2. Ensure your **QuickBooks Online** company file is connected.
3. Install redmine_qbo_billing, then sync accounts and items and set the default income account for new items in its plugin settings
3. Sync accounts and items and set the default income account for new items in redmine_qbo's plugin settings
### Upgrading from a version that managed items and accounts
Items and accounts moved to redmine_qbo_billing. Install redmine_qbo_billing next to this plugin and run the plugin migrations as usual: billing finds the existing `items` and `accounts` tables and keeps using them, so no data is moved or lost. The Items and Accounts pages keep their URLs.
Items and accounts moved to redmine_qbo (2026.11.0). Update redmine_qbo and run the plugin migrations as usual: redmine_qbo finds the existing `items` and `accounts` tables and keeps using them, so no data is moved or lost. The Items and Accounts pages keep their URLs.
---
+2 -2
View File
@@ -39,9 +39,9 @@ class BillLineItemsJob < ActiveJob::Base
private
# Creates the QuickBooks estimate with redmine_qbo_billing, which writes every estimate: a first line
# Creates the QuickBooks estimate with redmine_qbo's estimate writer, which writes every estimate: a first line
# saying where the lines came from, then the unbilled line items. The VIN and mileage are the work order's,
# from redmine_qbo_billing's issue values hook (redmine_qbo_vehicles gives the VIN, the Mileage field the mileage).
# from redmine_qbo's issue values hook (redmine_qbo_vehicles gives the VIN, the Mileage field the mileage).
def create_estimate(issue, unbilled_entries)
log "Creating estimate in QBO for #{issue.customer.name} from issue ##{issue.id}"
memo = "Added from: #{issue.tracker} ##{issue.id}: #{issue.subject}"
+2 -2
View File
@@ -8,8 +8,8 @@
#
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Links each line item to a QuickBooks item. The items table itself now belongs to redmine_qbo_billing
# (which Redmine migrates first); databases that ran the old version of this migration already have both.
# Links each line item to a QuickBooks item. The items table itself now belongs to redmine_qbo (which Redmine
# migrates first); databases that ran the old version of this migration already have both.
class CreateItems < ActiveRecord::Migration[7.0]
def up
add_reference :line_items, :item, foreign_key: true unless column_exists?(:line_items, :item_id)
+4 -11
View File
@@ -19,20 +19,13 @@ Redmine::Plugin.register :redmine_qbo_lineitems do
author_url 'https://barrettefabrication.com'
requires_redmine version_or_higher: '6.1.0'
# Ensure redmine_qbo is installed
# Ensure redmine_qbo is installed: it has the QuickBooks product/service list, accounts and estimate
# writing this plugin uses (from 2026.11.0)
begin
requires_redmine_plugin :redmine_qbo, version_or_higher: '2026.3.9'
requires_redmine_plugin :redmine_qbo, version_or_higher: '2026.11.0'
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).
@@ -41,7 +34,7 @@ Redmine::Plugin.register :redmine_qbo_lineitems do
}
# Global Permissions. Line items live on issues; these control what users can do with them there.
# The item search (redmine_qbo_billing's items#autocomplete) feeds the line item form.
# The item search (redmine_qbo'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