diff --git a/README.md b/README.md index 7c5d934..b6a631f 100644 --- a/README.md +++ b/README.md @@ -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. --- diff --git a/app/jobs/bill_line_items_job.rb b/app/jobs/bill_line_items_job.rb index f1ec780..9f58b8c 100644 --- a/app/jobs/bill_line_items_job.rb +++ b/app/jobs/bill_line_items_job.rb @@ -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}" diff --git a/db/migrate/002_create_items.rb b/db/migrate/002_create_items.rb index 2d10235..bf86b57 100644 --- a/db/migrate/002_create_items.rb +++ b/db/migrate/002_create_items.rb @@ -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) diff --git a/init.rb b/init.rb index 328a25a..5bf6324 100644 --- a/init.rb +++ b/init.rb @@ -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