mirror of
https://github.com/rickbarrette/redmine_qbo_vehicles.git
synced 2026-08-19 13:30:43 -04:00
Add fallback for last service date and introduce 'unknown' label
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user