Compare commits

...

6 Commits

Author SHA1 Message Date
a8af180de2 2026.1.7 2026-01-30 17:09:34 -05:00
e621dc9e3a nil not nill 2026-01-30 17:00:29 -05:00
defeec7f8e 2026.1.6 2026-01-30 07:53:51 -05:00
37c302e274 use symbol keys 2026-01-30 07:53:29 -05:00
006e907b35 need to supply selected id 2026-01-30 07:53:14 -05:00
f1f77a8022 use locale 2026-01-30 07:42:09 -05:00
3 changed files with 9 additions and 9 deletions

14
init.rb
View File

@@ -14,18 +14,18 @@ Redmine::Plugin.register :redmine_qbo do
name 'Redmine QBO plugin'
author 'Rick Barrette'
description 'This is a plugin for Redmine to intergrate with Quickbooks Online to allow for seamless intergration CRM and invoicing of completed issues'
version '2026.1.5'
version '2026.1.7'
url 'https://github.com/rickbarrette/redmine_qbo'
author_url 'https://barrettefabrication.com'
settings default: {'empty' => true}, partial: 'qbo/settings'
requires_redmine version_or_higher: '6.1.0'
# Add safe attributes for core models
Issue.safe_attributes 'customer_id'
Issue.safe_attributes 'estimate_id'
Issue.safe_attributes 'invoice_id'
User.safe_attributes 'employee_id'
TimeEntry.safe_attributes 'billed'
Issue.safe_attributes :customer_id
Issue.safe_attributes :estimate_id
Issue.safe_attributes :invoice_id
User.safe_attributes :employee_id
TimeEntry.safe_attributes :billed
# set per_page globally
WillPaginate.per_page = 20
@@ -35,7 +35,7 @@ Redmine::Plugin.register :redmine_qbo do
permission :add_customers, customers: :new, public: false
# Register top menu items
menu :top_menu, :customers, { controller: :customers, action: :index }, caption: 'Customers', if: Proc.new {User.current.logged?}
menu :top_menu, :customers, { controller: :customers, action: :index }, caption: :label_customers, if: Proc.new {User.current.logged?}
end

View File

@@ -39,7 +39,7 @@ module Hooks
# Generate the drop down list of quickbooks estimates owned by the selected customer
select_estimate = f.select :estimate_id,
issue.customer ? issue.customer.estimates.pluck(:doc_number, :id).sort! {|x, y| y <=> x} : [],
selected: issue.estimate,
selected: issue.estimate ? issue.estimate.id : nil,
include_blank: true
# Pass all prebuilt form components to our partial

View File

@@ -28,7 +28,7 @@ module Hooks
context[:controller].send(:render_to_string, {
partial: 'issues/show_details',
locals: {
customer: issue.customer ? link_to(issue.customer): nill,
customer: issue.customer ? link_to(issue.customer) : nil,
estimate_link: issue.estimate ? link_to(issue.estimate, issue.estimate, target: :_blank) : nil,
invoice_link: invoice_link.html_safe,
issue: issue