How Vehicle Sales and For-Sale Pipeline Works
Source: `vehicles_controller.rb`
- The for-sale search uses the tax-appropriate price field based on the company's tax settings (inclusive or exclusive)
- The for-sale vehicle index requires the vehicle to have either an acquisition invoice or a trade-in invoice before it can appear
- For-sale status filter options:
for_sale(currently listed),sold(not_for_sale with a date_of_sale set), or both combined - Vehicles acquired through the acquisition workflow are assigned to the internal (dealership) customer with a pending status
- Acquisition automatically creates a
DealershipAdvertisingVehiclerecord for the vehicle, preparing it for advertising - Vehicles with pending status are hidden from the customer's vehicle list view to avoid confusion
- When viewing an archived customer's vehicles, only archived vehicles are displayed
Support scenarios
- "A vehicle isn't showing in the for-sale list" → The vehicle must have either an acquisition or trade-in invoice to appear in the for-sale index. Also check that the status is set to for_sale and the vehicle isn't archived or deleted.
- "I acquired a vehicle but it's not showing under the customer" → Acquired vehicles are assigned to the internal customer with pending status. Pending vehicles are hidden from the customer vehicle list. The vehicle will appear once the status changes from pending.
- "The for-sale price search isn't matching" → The search uses the tax-appropriate price field. If the company uses tax-inclusive pricing, the search matches against the inclusive price and vice versa.
- "I can only see archived vehicles for this customer" → If the customer is archived, the system only shows their archived vehicles. Unarchive the customer to see the full vehicle list.