mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-02-13 01:03:59 -05:00
Compare commits
9 Commits
2026-1.0-n
...
2026.1.2
| Author | SHA1 | Date | |
|---|---|---|---|
| 241dd594d0 | |||
| b603cb634a | |||
| 1308a05011 | |||
| 334ed60bf7 | |||
| d63bf809f2 | |||
| 31406af681 | |||
| 479be461a6 | |||
| c1af031d22 | |||
| a741cd0217 |
@@ -1,4 +1,4 @@
|
||||
<h2><%=t(:field_customer)%> #<%= @customer.id %> - <%= link_to @customer.to_s, "https://app.qbo.intuit.com/app/customerdetail?nameId=#{@customer.id}", target: :_blank %> </h2>
|
||||
<h2><%=t(:field_customer)%> #<%= @customer.id %> - <%= link_to @customer.to_s, "https://#{Setting.plugin_redmine_qbo['sandbox'] ? "sandbox" : "app"}.qbo.intuit.com/app/customerdetail?nameId=#{@customer.id}", target: :_blank %> </h2>
|
||||
<div class="issue">
|
||||
|
||||
<div class="splitcontent">
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<label for="issue_customer"><%= t(:customer) %></label>
|
||||
<%= search_customer %>
|
||||
<%= customer_id %>
|
||||
<%= link_to t(:label_load_customer), '#', onclick: "#{js_link}; return false;" %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
||||
2
init.rb
2
init.rb
@@ -14,7 +14,7 @@ Redmine::Plugin.register :redmine_qbo do
|
||||
name 'Redmine QBO DEVELOPMENT 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.0'
|
||||
version '2026.1.2'
|
||||
url 'https://github.com/rickbarrette/redmine_qbo'
|
||||
author_url 'https://barrettefabrication.com'
|
||||
settings :default => {'empty' => true}, :partial => 'qbo/settings'
|
||||
|
||||
@@ -12,6 +12,8 @@ module Hooks
|
||||
|
||||
class IssuesFormHookListener < Redmine::Hook::ViewListener
|
||||
|
||||
include IssuesHelper
|
||||
|
||||
# Edit Issue Form
|
||||
# Here we build the required form components before passing them to a partial view formatting.
|
||||
def view_issues_form_details_bottom(context={})
|
||||
@@ -29,7 +31,7 @@ module Hooks
|
||||
selected_estimate = issue.estimate ? issue.estimate.id : nil
|
||||
|
||||
# Gernerate edit.js link
|
||||
js_link = issue.new_record? ? "updateIssueFrom('/projects/rmt/issues/new.js', this)" : "updateIssueFrom('/issues/#{issue.id}/edit.js', this)"
|
||||
js_link = "updateIssueFrom('#{escape_javascript update_issue_form_path(issue.project, issue)}', this)"
|
||||
|
||||
# Load customer information
|
||||
customer = Customer.find_by_id(selected_customer) if selected_customer
|
||||
@@ -65,8 +67,7 @@ module Hooks
|
||||
locals: {
|
||||
search_customer: search_customer,
|
||||
customer_id: customer_id,
|
||||
js_link: js_link,
|
||||
select_estimate: select_estimate,
|
||||
select_estimate: select_estimate
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@@ -59,8 +59,12 @@ module Patches
|
||||
#left << [l(:field_fixed_version), issue.fixed_version] unless issue.disabled_core_fields.include?('fixed_version_id')
|
||||
|
||||
logger.debug "Calling :pdf_left hook"
|
||||
context = Redmine::Hook.call_hook :pdf_left, { array: left, issue: issue }
|
||||
left << context.first unless context.nil?
|
||||
left_hook_output = Redmine::Hook.call_hook :pdf_left, { issue: issue }
|
||||
unless left_hook_output.nil?
|
||||
left_hook_output.each do |l|
|
||||
left.concat l unless l.nil?
|
||||
end
|
||||
end
|
||||
|
||||
right = []
|
||||
right << [l(:field_start_date), format_date(issue.start_date)] unless issue.disabled_core_fields.include?('start_date')
|
||||
@@ -70,8 +74,12 @@ module Patches
|
||||
right << [l(:label_spent_time), l_hours(issue.total_spent_hours)] if User.current.allowed_to?(:view_time_entries, issue.project)
|
||||
|
||||
logger.debug "Calling :pdf_right hook"
|
||||
context = Redmine::Hook.call_hook :pdf_right, { array: right, issue: issue }
|
||||
right << context.first unless context.nil?
|
||||
right_hook_output = Redmine::Hook.call_hook :pdf_right, { issue: issue }
|
||||
unless right_hook_output.nil?
|
||||
right_hook_output.each do |r|
|
||||
right.concat r unless r.nil?
|
||||
end
|
||||
end
|
||||
|
||||
rows = left.size > right.size ? left.size : right.size
|
||||
while left.size < rows
|
||||
|
||||
Reference in New Issue
Block a user