mirror of
https://github.com/rickbarrette/redmine_qbo_vehicles.git
synced 2026-11-17 18:40:36 -05:00
- Mileage for invoices (the Mileage issue custom field) now comes from this plugin's qbo_billing_issue_values answer, alongside the VIN. - qbo_billing_vin_options: the customer's vehicles as VIN suggestions in the estimate/invoice editor. - qbo_billing_build_issue: issues created from an estimate get the appointment's vehicle, or the customer's vehicle whose VIN is on the estimate. - Vehicle checkboxes on the customer page say which New issue field they fill (data-new-issue-param). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
52 lines
1.4 KiB
ERB
52 lines
1.4 KiB
ERB
<% if vehicles.present? %>
|
|
|
|
<% vehicles.each do |vehicle| %>
|
|
<div class="row">
|
|
|
|
<div class="container">
|
|
|
|
<% if show_checkbox %>
|
|
<%= check_box_tag "vehicle_ids[]", vehicle.id, false, onchange: "updateLink()", data: { url: vehicle_path(vehicle).html_safe, text: vehicle.to_s, new_issue_param: 'issue[vehicle_id]' }, class: "vehicle-checkbox appointment checkbox" %>
|
|
<% else %>
|
|
<div class='checkbox'>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class='label-main'>
|
|
<%= link_to vehicle.to_s, vehicle_path(vehicle) %>
|
|
</div>
|
|
|
|
<div class="label-sub">
|
|
<%= render partial: 'vehicles/vin', locals: { vin: vehicle.vin } %>
|
|
<% if show_customer %>
|
|
<%= vehicle.customer %>
|
|
<% end %>
|
|
|
|
<%
|
|
mileage = vehicle.last_service_mileage
|
|
%>
|
|
|
|
<% if mileage %>
|
|
<br/>
|
|
<b><%= t(:label_last_service) %></b> <%= vehicle.last_service_date %>
|
|
at <%= mileage %> <%= t(:label_miles) %>
|
|
<% end %>
|
|
|
|
</div>
|
|
<br/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="actions">
|
|
<%= will_paginate vehicles, param_name: (local_assigns[:page_param] || :page) %>
|
|
</div>
|
|
|
|
<%=t(:label_matching)%> <%= vehicles.respond_to?(:total_entries) ? vehicles.total_entries : vehicles.size %> <%=t(:field_vehicles) %>
|
|
|
|
<% else %>
|
|
<p><%=t(:label_no_vehicles)%> <%= params[:search] %>.</p>
|
|
<% end %>
|