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
| # | Field | Type | Linked Form | Role |
|---|---|---|---|---|
| 1 | Vehicle_Status | picklist | — | Drives which branch of the logic applies |
| 2 | Vehicle_Location_Type (displayname "Vehicle Location Type") | lookup | Locations | Location type, entered on Add Car |
| 3 | Vehicle_Sub_location (displayname "Vehicle Sub Location") | lookup | Location_Sub_Location_V1 | Sub-location, entered on Add Car |
| 4 | Rental_Vehicle_Location (displayname "Rental Vehicle Location") | single line, read-only | — | Auto-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, andVehicle_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_locationfields. - 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 HireIITR On HireFree Hire
then:
Vehicle_Location_TypeandVehicle_Sub_locationvalues are ignored — not used when computingRental_Vehicle_Location.- Both fields are hidden from the Add Car form.
- The mandatory check is removed from both fields.
Rental_Vehicle_Locationinstead 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_locationdirectly
Related
- Fleet — full Add Car form field schema