mirror of
https://github.com/rickbarrette/redmine_qbo_vehicles.git
synced 2026-02-13 17:43:58 -05:00
Compare commits
4 Commits
88b0ffcd6b
...
d37933fe82
| Author | SHA1 | Date | |
|---|---|---|---|
| d37933fe82 | |||
| 3efc545f0a | |||
| adcc116841 | |||
| 8bb98d2408 |
@@ -72,6 +72,16 @@ class Vehicle < ActiveRecord::Base
|
|||||||
self.name = to_s
|
self.name = to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# reurns all invoices for this vehicle
|
||||||
|
def invoices
|
||||||
|
self.issues.flat_map(&:invoices).uniq.compact
|
||||||
|
end
|
||||||
|
|
||||||
|
# returns all estimates for this vehicle
|
||||||
|
def estimates
|
||||||
|
self.issues.flat_map(&:estimate).uniq.compact
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
# init method to pull JSON details from NHTSA
|
# init method to pull JSON details from NHTSA
|
||||||
|
|||||||
@@ -2,6 +2,18 @@
|
|||||||
|
|
||||||
<%= render partial: 'vehicles/details', locals: {vehicle: @vehicle} %>
|
<%= render partial: 'vehicles/details', locals: {vehicle: @vehicle} %>
|
||||||
|
|
||||||
|
<div class="splitcontent">
|
||||||
|
<div class="splitcontentleft">
|
||||||
|
<h4><%=t(:estimates)%>:</h4>
|
||||||
|
<%= render partial: 'estimates/list', locals: {estimates: @vehicle.estimates} %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="splitcontentleft">
|
||||||
|
<h4><%=t(:label_invoices)%>:</h4>
|
||||||
|
<%= render partial: 'invoices/list', locals: {invoices: @vehicle.invoices} %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h3><%=@issues.open.count%> <%=t(:label_open_issues)%></h3>
|
<h3><%=@issues.open.count%> <%=t(:label_open_issues)%></h3>
|
||||||
|
|
||||||
<%= render partial: 'issues/list_simple', locals: {issues: @issues.open} %>
|
<%= render partial: 'issues/list_simple', locals: {issues: @issues.open} %>
|
||||||
|
|||||||
2
init.rb
2
init.rb
@@ -14,7 +14,7 @@ Redmine::Plugin.register :redmine_qbo_vehicles do
|
|||||||
name 'Redmine QBO Vehicles plugin'
|
name 'Redmine QBO Vehicles plugin'
|
||||||
author 'Rick Barrette'
|
author 'Rick Barrette'
|
||||||
description 'This is a plugin for Redmine to intergrate with the redmine_qbo plugin to provide vehicle data tracking'
|
description 'This is a plugin for Redmine to intergrate with the redmine_qbo plugin to provide vehicle data tracking'
|
||||||
version '2026.1.6'
|
version '2026.1.7'
|
||||||
url 'https://github.com/rickbarrette/redmine_qbo_vehicles'
|
url 'https://github.com/rickbarrette/redmine_qbo_vehicles'
|
||||||
author_url 'https://barrettefabrication.com'
|
author_url 'https://barrettefabrication.com'
|
||||||
requires_redmine version_or_higher: '6.1.0'
|
requires_redmine version_or_higher: '6.1.0'
|
||||||
|
|||||||
Reference in New Issue
Block a user