Skip to main content

Fleet Vehicle Location Refactor

Where to Find It

  • App: KRATOS: Accident Management Portal
  • Form: Add Car (Add_Car) — see Fleet for the full field list.

Overview

Refactor of how a vehicle's location is captured and displayed on the Fleet (Add_Car) form. A new read-only field — Rental Vehicle Location — is auto-populated from Vehicle Status, Vehicle Location Type, and Vehicle Sub Location, and becomes the single field used everywhere else (HTML pages, report columns) instead of referencing the location fields individually. For vehicles that are out on hire, the two location input fields are hidden and no longer mandatory, since a vehicle out with a customer doesn't have an internal yard location to record.


Fields Involved

#FieldTypeLinked FormRole
1Vehicle_StatuspicklistDrives which branch of the logic applies
2Vehicle_Location_Type (displayname "Vehicle Location Type")lookupLocationsLocation type, entered on Add Car
3Vehicle_Sub_location (displayname "Vehicle Sub Location")lookupLocation_Sub_Location_V1Sub-location, entered on Add Car
4Rental_Vehicle_Location (displayname "Rental Vehicle Location")single line, read-onlyAuto-populated merge of the above; used in HTML and other report columns

Logic

1. Rental_Vehicle_Location — auto-populated, read-only

  • Not directly editable on the Add Car form.
  • Auto-populated based on Vehicle_Status, Vehicle_Location_Type, and Vehicle_Sub_location.
  • This is the field to reference in HTML pages and any other report columns going forward — not the individual Vehicle_Location_Type / Vehicle_Sub_location fields.
  • Also updates when the vehicle is dropped off at a location — e.g. CrashClaim HQ - Parramatta Road.

2. On Hire statuses — ignore and hide the location fields

When Vehicle_Status is one of:

  • On Hire
  • IITR On Hire
  • Free Hire

then:

  • Vehicle_Location_Type and Vehicle_Sub_location values are ignored — not used when computing Rental_Vehicle_Location.
  • Both fields are hidden from the Add Car form.
  • The mandatory check is removed from both fields.
  • Rental_Vehicle_Location instead takes the form <Status> - <Driver Name> — e.g. On Hire - John Smith.

3. All other statuses — location fields required

For any other Vehicle_Status value, Vehicle_Location_Type and Vehicle_Sub_location:

  • Are shown on the Add Car form.
  • Are user-editable.
  • Are mandatory.

Decision Flow

Add Car form — Vehicle_Status set/changed


Is Vehicle_Status "On Hire" / "IITR On Hire" / "Free Hire"?

├── Yes ──► Hide Vehicle_Location_Type & Vehicle_Sub_location
│ Remove mandatory check on both fields
│ Ignore their values when computing Rental_Vehicle_Location

└── No ──► Show Vehicle_Location_Type & Vehicle_Sub_location
Both fields mandatory, user-editable
Rental_Vehicle_Location auto-populated from
Vehicle_Status + Vehicle_Location_Type + Vehicle_Sub_location

Where Rental_Vehicle_Location Is Used

  • Add Car form HTML display
  • Vehicle Movement form
  • Any other report columns that previously referenced Vehicle_Location_Type / Vehicle_Sub_location directly

  • Fleet — full Add Car form field schema