9 Commits

23 changed files with 434 additions and 30 deletions

View File

@@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2016 - 2026 Rick Barrette
Copyright (c) 2026 Rick Barrette
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@@ -108,7 +108,7 @@ Before using this plugin:
> The MIT License (MIT)
>
> Copyright (c) 2016 - 2026 Rick Barrette
> Copyright (c) 2026 Rick Barrette
>
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
>

View File

@@ -0,0 +1,22 @@
#The MIT License (MIT)
#
#Copyright (c) 2026 rick barrette
#
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
#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.
class ItemsController < ApplicationController
before_action :require_login
def autocomplete
term = params[:q].to_s
items = Item.where("description LIKE ?", "%#{ActiveRecord::Base.sanitize_sql_like(term)}%").where(active: true).order(:description).limit(20)
render json: items.map { |i|
{ id: i.id, text: i.description, price: i.unit_price }
}
end
end

View File

@@ -1,6 +1,6 @@
#The MIT License (MIT)
#
#Copyright (c) 2016 - 2026 rick barrette
#Copyright (c) 2026 rick barrette
#
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
@@ -46,7 +46,7 @@ class BillLineItemsJob < ActiveJob::Base
estimate = Quickbooks::Model::Estimate.new(customer_id: issue.customer.id)
estimate_service = Quickbooks::Service::Estimate.new( company_id: qbo.realm_id, access_token: access_token)
estimate.line_items << Quickbooks::Model::InvoiceLineItem.new(description: "Added from issue ##{issue.id} #{issue.subject}", detail_type: 'DescriptionOnly' )
estimate.line_items << Quickbooks::Model::InvoiceLineItem.new(description: "#{I18n.t(:notice_added_from)}#{issue.id} #{issue.subject}", detail_type: 'DescriptionOnly' )
unbilled_entries.each do |item|
log "Creating Line Item for #{item.description}"

36
app/jobs/item_sync_job.rb Normal file
View File

@@ -0,0 +1,36 @@
#The MIT License (MIT)
#
#Copyright (c) 2026 rick barrette
#
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
#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.
class ItemSyncJob < ApplicationJob
queue_as :default
retry_on StandardError, wait: 5.minutes, attempts: 5
# Performs a sync of items from QuickBooks Online.
def perform(full_sync: false, id: nil)
qbo = QboConnectionService.current!
raise "No QBO configuration found" unless qbo
log "Starting #{full_sync ? 'full' : 'incremental'} sync for item ##{id || 'all'}..."
service = ItemSyncService.new(qbo: qbo)
if id.present?
service.sync_by_id(id)
else
service.sync(full_sync: full_sync)
end
end
private
def log(msg)
Rails.logger.info "[ItemSyncJob] #{msg}"
end
end

34
app/models/item.rb Normal file
View File

@@ -0,0 +1,34 @@
#The MIT License (MIT)
#
#Copyright (c) 2026 rick barrette
#
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
#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.
class Item < ApplicationRecord
belongs_to :issue
validates_presence_of :id, :description
validates :unit_price, numericality: { greater_than_or_equal_to: 0 }
self.primary_key = :id
# Sync all employees, typically triggered by a scheduled task or manual sync request
def self.sync
ItemSyncJob.perform_later(full_sync: true)
end
# Sync a single employee by ID, typically triggered by a webhook notification or manual sync request
def self.sync_by_id(id)
ItemSyncJob.perform_later(id: id)
end
private
def log(msg)
Rails.logger.info "[LineItem] #{msg}"
end
end

View File

@@ -1,6 +1,6 @@
#The MIT License (MIT)
#
#Copyright (c) 2016 - 2026 rick barrette
#Copyright (c) 2026 rick barrette
#
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
@@ -10,6 +10,7 @@
class LineItem < ApplicationRecord
belongs_to :issue
belongs_to :item, optional: true
validates :description, presence: true
validates :quantity, numericality: { greater_than: 0 }

View File

@@ -0,0 +1,28 @@
#The MIT License (MIT)
#
#Copyright (c) 2026 rick barrette
#
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
#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.
class ItemSyncService < SyncServiceBase
private
# Specify the local model this service syncs
def self.model_class
Item
end
# Map relevant attributes from the QBO Employee to the local Employee model
def process_attributes(local, remote)
local.id = remote.id
local.description = remote.description
local.unit_price = remote.unit_price
local.active = remote.active?
end
end

View File

@@ -6,14 +6,15 @@
data-nested-form
data-wrapper-selector=".line-item">
<p><strong><%= t :label_line_items %></strong></p>
<strong><%= t :label_line_items %></strong>
<table class="list line-items-table">
<thead>
<tr>
<th><%= t :label_description %></th>
<th style="width:120px;"><%= t :label_qty %></th>
<th style="width:150px;"><%= t :label_price %></th>
<th style="width:60%;"><%= t :label_description %></th>
<th style="width:10%;"><%= t :label_qty %></th>
<th style="width:10%;"><%= t :label_price %></th>
<th style="width:10%;"><%= t :label_total %></th>
<% unless readonly %>
<th style="width:80px;"></th>
<% end %>
@@ -29,6 +30,11 @@
</tbody>
</table>
<p class="line-items-grand-total">
<strong><%= t :label_total %>:</strong>
<span id="line-items-grand-total">0.00</span>
</p>
<% unless readonly %>
<template data-nested-form-template>
<%= f.fields_for :line_items, LineItem.new, child_index: "NEW_RECORD" do |item_form| %>

View File

@@ -6,10 +6,10 @@
<table class="list line-items-table">
<thead>
<tr>
<th><%= t :label_description %></th>
<th style="width:120px;"><%= t :label_qty %></th>
<th style="width:150px;"><%= t :label_price %></th>
<th style="width:150px;"><%= t :label_total %></th>
<th style="width:70%;"><%= t :label_description %></th>
<th style="width:10%;"><%= t :label_qty %></th>
<th style="width:10%;"><%= t :label_price %></th>
<th style="width:10%;"><%= t :label_total %></th>
</tr>
</thead>

View File

@@ -1,37 +1,43 @@
<tr class="line-item">
<%= f.hidden_field :id %>
<%= f.hidden_field :_destroy %>
<%= f.hidden_field :item_id, class: "item-id-field" %>
<td>
<td data-label="<%= t :label_description %>">
<%= f.text_field :description,
size: 50,
placeholder: l(:label_description),
class: "line-item-description",
autocomplete: "off",
no_label: true,
disabled: readonly %>
</td>
<td>
<td data-label="<%= t :label_qty %>">
<%= f.number_field :quantity,
step: 1,
min: 0,
style: "width:90px;",
class: "qty-field",
no_label: true,
disabled: readonly %>
</td>
<td>
<td data-label="<%= t :label_price %>">
<%= f.number_field :unit_price,
step: 0.01,
style: "width:120px;",
class: "price-field",
no_label: true,
disabled: readonly %>
</td>
<td class="line-total" data-label="<%= t :label_total %>">
0.00
</td>
<% unless readonly %>
<td style="text-align:center;">
<td class="actions">
<button type="button"
class="icon-only icon-del"
title="<%=l(:label_remove)%>"
title="<%= l(:label_remove) %>"
data-nested-form-remove>
</button>
</td>

View File

@@ -0,0 +1,67 @@
(function () {
window.initLineItemAutocomplete = function(context) {
let scope = context || document;
$(scope).find(".line-item-description").each(function() {
if ($(this).data("autocomplete-initialized")) return;
$(this).data("autocomplete-initialized", true);
$(this).autocomplete({
appendTo: "body",
minLength: 2,
source: function(request, response) {
$.getJSON("/items/autocomplete", { q: request.term })
.done(function(data) {
response(data.map(function(item) {
return {
label: item.text,
value: item.text,
id: item.id,
price: item.price || 0
};
}));
})
.fail(function(err){
console.error("Autocomplete error:", err);
response([]);
});
},
select: function(event, ui) {
let $input = $(this);
let row = $input.closest(".line-item");
$input.val(ui.item.value); // <-- set description
row.find(".item-id-field").val(ui.item.id);
if (ui.item.price !== undefined && row.find(".price-field").length) {
row.find(".price-field").val(ui.item.price);
}
updateLineItemTotals();
return false; // still prevent default to avoid double entry
},
change: function(event, ui) {
if (!ui.item) {
let row = $(this).closest(".line-item");
row.find(".item-id-field").val("");
}
}
});
});
};
// Clear item_id when user types manually
$(document).on("input", ".line-item-description", function(){
let row = $(this).closest(".line-item");
row.find(".item-id-field").val("");
});
function initializeAutocomplete() {
window.initLineItemAutocomplete(document);
}
$(document).ready(initializeAutocomplete);
document.addEventListener("turbo:load", initializeAutocomplete);
})();

View File

@@ -0,0 +1,58 @@
function updateLineItemTotals() {
let grandTotal = 0;
document.querySelectorAll(".line-item").forEach(function(row){
// 1. Look for the Rails _destroy hidden field
let destroyInput = row.querySelector("input[name*='[_destroy]']");
let isDestroyed = destroyInput && (destroyInput.value === "1" || destroyInput.value === "true");
// 2. Safely check if the row is hidden via CSS, without relying on physical layout
let isHidden = row.style.display === "none" || window.getComputedStyle(row).display === "none";
// If it's deleted or explicitly hidden, skip calculating it
if (isDestroyed || isHidden) {
return;
}
let qty = parseFloat(row.querySelector(".qty-field")?.value || 0);
let price = parseFloat(row.querySelector(".price-field")?.value || 0);
let total = qty * price;
row.querySelector(".line-total").textContent =
total.toLocaleString(undefined,{minimumFractionDigits:2,maximumFractionDigits:2});
grandTotal += total;
});
let grand = document.getElementById("line-items-grand-total");
if(grand){
grand.textContent =
grandTotal.toLocaleString(undefined,{minimumFractionDigits:2,maximumFractionDigits:2});
}
}
// Recalculate on input changes
document.addEventListener("input", function(e){
if(e.target.classList.contains("qty-field") ||
e.target.classList.contains("price-field")){
updateLineItemTotals();
}
});
// Recalculate when the remove button is clicked
document.addEventListener("click", function(e){
let removeBtn = e.target.closest("[data-nested-form-remove]");
if(removeBtn){
setTimeout(updateLineItemTotals, 10);
}
});
// Initial calculation on load
document.addEventListener("DOMContentLoaded", function(){
updateLineItemTotals();
});

View File

@@ -22,7 +22,11 @@
Date.now().toString()
);
//container.insertAdjacentHTML("beforeend", content);
container.insertAdjacentHTML("beforeend", content);
// initialize autocomplete on the new row
initLineItemAutocomplete(container.lastElementChild);
}
// REMOVE
@@ -50,4 +54,11 @@
// Works for Turbo navigation
document.addEventListener("turbo:load", initNestedForms);
})();
})();
$(document).on("input", ".line-item-description", function(){
let row = $(this).closest(".line-item");
row.find(".item-id-field").val("");
});

View File

@@ -0,0 +1,58 @@
.line-items-table {
width: 100%;
}
.line-items-table input {
width: 100%;
box-sizing: border-box;
}
.qty-field {
max-width: 90px;
}
.price-field {
max-width: 120px;
}
/* MOBILE MODE */
@media screen and (max-width: 700px) {
.line-items-table thead {
display: none;
}
.line-items-table,
.line-items-table tbody,
.line-items-table tr,
.line-items-table td {
display: block;
width: 100%;
}
.line-items-table tr {
border: 1px solid #ddd;
border-radius: 6px;
padding: 10px;
margin-bottom: 10px;
background: #fff;
}
.line-items-table td {
display: flex;
justify-content: space-between;
align-items: center;
padding: 6px 0;
}
.line-items-table td::before {
content: attr(data-label);
font-weight: bold;
margin-right: 10px;
}
.line-items-table td.actions {
justify-content: flex-end;
}
}

View File

@@ -1,6 +1,6 @@
#The MIT License (MIT)
#
#Copyright (c) 2016 - 2026 rick barrette
#Copyright (c) 2026 rick barrette
#
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
@@ -18,4 +18,5 @@ en:
label_qty: "Quantity"
label_remove: "Remove"
label_total: "Total"
notice_added_from: "Added from issue #"

11
config/routes.rb Normal file
View File

@@ -0,0 +1,11 @@
#The MIT License (MIT)
#
#Copyright (c) 2026 rick barrette
#
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
#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.
get 'items/autocomplete', to: 'items#autocomplete'

View File

@@ -1,6 +1,6 @@
#The MIT License (MIT)
#
#Copyright (c) 2016 - 2026 rick barrette
#Copyright (c) 2026 rick barrette
#
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#

View File

@@ -0,0 +1,26 @@
#The MIT License (MIT)
#
#Copyright (c) 2026 rick barrette
#
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
#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.
class CreateItems < ActiveRecord::Migration[7.0]
def change
create_table :items do |t|
t.text :description, null: false
t.decimal :unit_price,
precision: 15,
scale: 4,
null: false,
default: 0
t.boolean :active, default: true, null: false
t.timestamps
end
add_reference :line_items, :item, foreign_key: true
end
end

View File

@@ -1,6 +1,6 @@
#The MIT License (MIT)
#
#Copyright (c) 2016 - 2026 rick barrette
#Copyright (c) 2026 rick barrette
#
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
@@ -14,7 +14,7 @@ Redmine::Plugin.register :redmine_qbo_lineitems do
name 'Redmine QBO Line Items plugin'
author 'Rick Barrette'
description 'A plugin for Redmine to extend the capabilitys of the Redmine QuickBooks Online plugin to attach billable line items to an isuue'
version '2026.3.0'
version '2026.3.1'
url 'https://github.com/rickbarrette/redmine_qbo'
author_url 'https://barrettefabrication.com'
requires_redmine version_or_higher: '6.1.0'

View File

@@ -0,0 +1,36 @@
#The MIT License (MIT)
#
#Copyright (c) 2026 rick barrette
#
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
#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.
module RedmineQboLineItems
module Hooks
class QboHookListener < Redmine::Hook::ViewListener
# Called by WebhookProcessJob
def qbo_additional_entities(context={})
log "Added QBO Item to allowed webook entities"
return "Item"
end
# Called by the QboSyncDispatcher
def qbo_full_sync (context={})
log "Adding ItemSyncJob to QBO sync dispatcher"
return ItemSyncJob
end
private
def log(msg)
Rails.logger.info "[QboHookListener] #{msg}"
end
end
end
end

View File

@@ -1,6 +1,6 @@
#The MIT License (MIT)
#
#Copyright (c) 2016 - 2026 rick barrette
#Copyright (c) 2026 rick barrette
#
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
@@ -16,11 +16,14 @@ module RedmineQboLineItems
# Load the javascript to support the autocomplete forms
def view_layouts_base_html_head(context = {})
safe_join([
javascript_include_tag( 'nested_form_controller.js', plugin: :redmine_qbo_lineitems)
javascript_include_tag( 'nested_form_controller', plugin: :redmine_qbo_lineitems),
javascript_include_tag("line_items", plugin: :redmine_qbo_lineitems),
javascript_include_tag("autocomplete", plugin: :redmine_qbo_lineitems),
stylesheet_link_tag("line_items", plugin: :redmine_qbo_lineitems)
])
end
def view_issues_form_details_bottom(context = {})
def view_issues_edit_notes_bottom(context = {})
context[:controller].send(:render_to_string, {
partial: 'line_items/issue_form',
locals: {

View File

@@ -1,6 +1,6 @@
#The MIT License (MIT)
#
#Copyright (c) 2016 - 2026 rick barrette
#Copyright (c) 2026 rick barrette
#
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#