Compare commits

..

7 Commits

6 changed files with 22 additions and 12 deletions

View File

@@ -93,6 +93,7 @@ To enable automatic Time Activity entries for an Issue, you simply need to assig
## TODO
* Separate Vehicles into a separate plugin (I use Redmine for my automotive shop management 😉)
* Checkout branch dev-6 for a stripped down version
* MORE Stuff as I make it up...

View File

@@ -37,8 +37,11 @@
</tr>
<tr>
<th><%=t(:field_notes)%></th>
<td>
<th colspan="2"><h4><%=t(:field_notes)%></hr></th>
</tr>
<tr>
<td colspan="2">
<pre id="note-display" style="text-align: left; white-space: pre-wrap; font-family: inherit;">
<%= customer.notes %>
</pre>

View File

@@ -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">
@@ -11,7 +11,7 @@
<div class="splitcontent">
<div class="splitcontentleft">
<h4><%=t(:label_customer)%>:</h4>
<h4><%=t(:field_customer)%>:</h4>
<%= render :partial => 'customers/details', locals: {customer: @customer} %>
</div>

View File

@@ -2,12 +2,14 @@
<%= form_with(url: invoice_path, method: :get) do |form| %>
<div class="form-check">
<%= check_box_tag "select-all-invoices", "1", false, id: "select-all-invoices" %>
<%= label_tag "select-all-invoices", t(:label_select_all) %>
</div>
<% if @customer.invoices.count > 1 %>
<div class="form-check">
<%= check_box_tag "select-all-invoices", "1", false, id: "select-all-invoices" %>
<%= label_tag "select-all-invoices", t(:label_select_all) %>
</div>
<hr>
<hr>
<% end %>
<% @customer.invoices.order(id: :desc).each do |invoice| %>
<div class="row">
@@ -16,7 +18,9 @@
</div>
<% end %>
<%= form.submit t(:button_bulk_pdf) %>
<% if @customer.invoices.count > 1 %>
<%= form.submit t(:button_bulk_pdf) %>
<% end %>
<% end %>
<% else %>

View File

@@ -14,7 +14,7 @@ Redmine::Plugin.register :redmine_qbo do
name 'Redmine Quickbooks Online 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.1'
url 'https://github.com/rickbarrette/redmine_qbo'
author_url 'https://barrettefabrication.com'
settings :default => {'empty' => true}, :partial => 'qbo/settings'

View File

@@ -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={})
@@ -31,7 +33,7 @@ module Hooks
selected_vehicle = issue.vehicles_id ? issue.vehicles_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