mirror of
https://github.com/rickbarrette/redmine_qbo_vehicles.git
synced 2026-10-03 17:10:43 -04:00
Add fallback for last service date and introduce 'unknown' label
This commit is contained in:
1 parent
bdfad0d020
commit
7158a8b02c
2 files changed
+2
-1
No files matched your search
@@ -54,7 +54,7 @@
|
||||
<% mileage = last.custom_values.find_by(custom_field_id: CustomField.find_by_name("Mileage").id) %>
|
||||
<% if mileage %>
|
||||
<p>
|
||||
<b><%=t(:label_last_service) %></b> <%= last.closed_on.to_date %>
|
||||
<b><%=t(:label_last_service) %></b> <%= last&.closed_on&.to_date || l(:label_unknown) %>
|
||||
at <%= mileage.value %>
|
||||
<%=t(:label_miles) %>
|
||||
</p>
|
||||
|
||||
@@ -31,6 +31,7 @@ en:
|
||||
label_new_vehicle: "New Customer Vehicle"
|
||||
label_no_vehicles: "There are no vehicles containing the term(s)"
|
||||
label_search_vehicles: "Search Vehicles"
|
||||
label_unknown: "Unknown"
|
||||
label_vehicle: "Vehicle"
|
||||
label_year: "Year"
|
||||
no_customer: "Customer no longer exists"
|
||||
|
||||
Reference in new issue
Block a user