Fleet Management
Fleet Management
Vehicle maintenance, fuel logging, and inspection workflows for service fleets.
Vehicle Registry
VIN, Plate, Year/Make/Model
Every fleet vehicle has a complete profile: VIN, license plate, year, make, model, color, and assigned branch.
Vehicle Tag Auto-Numbering
Each vehicle receives a unique VEH-XXXXXX tag from an auto-sequence for cross-document referencing.
Driver Assignment
Optional primary driver assignment per vehicle. Branch-aware queries scope each driver and manager to the records relevant to their branch.
Status Lifecycle
Vehicles move through ACTIVE / IN_SERVICE / RETIRED / SOLD states with a documented audit trail.
Fuel & Mileage
Fuel Log Per Vehicle
Record every fill-up: date, odometer, gallons, cost, vendor. The fuel log is the source of truth for per-vehicle MPG.
Mileage Tracking
Odometer readings tie into service-due triggers (oil change every 5,000 miles, tire rotation every 7,500, etc.).
MPG Calculation
fn_vehicle_mpg() computes rolling MPG over the last N fuel events for fleet-efficiency dashboards.
Cost Per Mile
Fuel + service expenses divided by miles driven, surfaced per vehicle for ROI and replacement-decision analysis.
Service Records
Full Maintenance History
Every oil change, tire rotation, brake job, repair — with vendor, parts, labor, and cost — recorded against the vehicle.
Service Due by Mileage or Date
Set service intervals by mileage (every 5,000 mi) or calendar (every 6 months). Dashboard surfaces what is due now.
Document Attachment
Repair invoices, inspection certificates, and warranty paperwork attach to the service record via the polymorphic document table.
Inspections
Pre-Trip & Post-Trip Inspections
Driver completes a digital inspection checklist at start and end of shift. Failed items create work orders automatically.
DOT Inspection Log
Annual DOT inspection records with inspector name, certificate number, and expiration. Alert fires 30 days before expiration.
Defect Tracking
Inspection defects flow into a defect queue. A defective vehicle cannot be released for service until cleared.
Reporting
Fleet Summary
v_vehicle_summary surfaces every vehicle with current odometer, last fuel-up, last service, and next service due in one query.
Branch Cost Rollups
fn_report_vehicles() returns fleet size, total miles driven, fuel cost, service cost, and average MPG per branch.
Service & Inspection Alerts
VEHICLE_SERVICE_DUE, VEHICLE_INSPECTION_DUE, and VEHICLE_DOT_EXPIRING alert types are built into the system.