Own the QuickBooks VIN and Mileage fields

redmine_qbo now handles QuickBooks custom fields generically; this plugin claims the fields named like
VIN and Mileage (Vehicles::QboFields) and supplies their behaviour:

- qbo_billing_issue_values keyed by field id; qbo_billing_field_options (the customer's vehicles for the
  VIN box) and qbo_billing_field_defaults (the work orders' VIN and highest mileage) replace the VIN hooks.
- Editor script (view_qbo_estimate_form_bottom): VINs in capitals; importing time or estimates fills the
  VIN from the work orders' vehicle (or an estimate's own VIN), warns about several vehicles, and fills
  the highest mileage. The several-vehicle and missing-VIN-field texts moved here.
- qbo_calendar_appointment_params: an appointment added from an estimate gets the vehicle with its VIN.
- The estimate's VIN is read through redmine_qbo's generic custom_field_value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
This commit is contained in:
Claude committed 2026-10-31 11:34:28 -04:00
1 parent 1aa2fa9d5e
commit 70f4ce7e4a
7 files changed
+150 -19

No files matched your search

+3 -1
View File
@@ -18,9 +18,11 @@ The goal of this project is to enable vehicle tracking for customer vehicles wit
* **Asset Tracking:** Adds vehicles owned by customers to the system.
* **Issue Association:** Allows these vehicles to be attached directly to Redmine issues for better service tracking.
* **QuickBooks VIN and Mileage fields (redmine_qbo 2026.11.0+):** redmine_qbo shows every QuickBooks text custom field on its estimate/invoice editor; this plugin fills the one named like **VIN** and, if there is one, the one named like **Mileage** or **Odometer**. VINs are shown in capitals.
* **Invoices (redmine_qbo 2026.11.0+):** importing a work order's time or estimate fills the invoice's VIN box with its vehicle's VIN and the mileage box with the highest value of the work orders' **Mileage** issue custom field (Redmine's own custom field named "Mileage"), and an invoice whose work orders are for more than one vehicle isn't saved (one vehicle per invoice).
* **Estimates (redmine_qbo 2026.11.0+):** the VIN box suggests the customer's vehicles, and the Create issues from estimate page has a **Vehicle** for all the issues: preselected with the appointment's vehicle, or else the customer's vehicle whose VIN is on the estimate; when none matches it says so, so the team can pick one before creating the issues.
* **Estimates (redmine_qbo 2026.11.0+):** the VIN box suggests the customer's vehicles, an invoice made from an estimate without a VIN gets its work orders' vehicle, and the Create issues from estimate page has a **Vehicle** for all the issues: preselected with the appointment's vehicle, or else the customer's vehicle whose VIN is on the estimate; when none matches it says so, so the team can pick one before creating the issues.
* **Customer page:** ticking a vehicle adds it to the New issue link.
* **Appointments (redmine_qbo_calendar):** an appointment added from an estimate gets the customer's vehicle with the estimate's VIN.
## Installation