mirror of
https://github.com/rickbarrette/redmine_qbo_vehicles.git
synced 2026-07-02 16:41:09 -04:00
Compare commits
3 Commits
35bd41d289
...
2026.4.0
| Author | SHA1 | Date | |
|---|---|---|---|
| cc94401a1f | |||
| 6012434de2 | |||
| 83a5811a37 |
@@ -41,6 +41,11 @@ class Vehicle < ApplicationRecord
|
|||||||
super(val.to_s.strip)
|
super(val.to_s.strip)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def name
|
||||||
|
val = self[:name]
|
||||||
|
val.present? ? val : to_s
|
||||||
|
end
|
||||||
|
|
||||||
# Redmine compatibility shim
|
# Redmine compatibility shim
|
||||||
def project
|
def project
|
||||||
nil
|
nil
|
||||||
@@ -63,7 +68,9 @@ class Vehicle < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def to_s
|
def to_s
|
||||||
|
return self[:name] if self[:name].present?
|
||||||
return vin if year.blank? || make.blank? || model.blank?
|
return vin if year.blank? || make.blank? || model.blank?
|
||||||
|
|
||||||
suffix = vin.to_s[9..] || vin
|
suffix = vin.to_s[9..] || vin
|
||||||
"#{year} #{make} #{model} - #{suffix}"
|
"#{year} #{make} #{model} - #{suffix}"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -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.3.4'
|
version '2026.4.0'
|
||||||
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'
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ module RedmineQboVehicles
|
|||||||
Customer.prepend Vehicles::Patches::CustomerPatch
|
Customer.prepend Vehicles::Patches::CustomerPatch
|
||||||
|
|
||||||
Vehicles::Hooks::CustomerShowHookListener
|
Vehicles::Hooks::CustomerShowHookListener
|
||||||
Vehicles::Hooks::InvoiceHookListener
|
|
||||||
Vehicles::Hooks::IssuesFormHookListener
|
Vehicles::Hooks::IssuesFormHookListener
|
||||||
Vehicles::Hooks::IssuesShowHookListener
|
Vehicles::Hooks::IssuesShowHookListener
|
||||||
Vehicles::Hooks::PdfHookListener
|
Vehicles::Hooks::PdfHookListener
|
||||||
|
|||||||
Reference in New Issue
Block a user