Skip to main content

Create and edit vehicles

Use this page when you need to register a new vehicle or update an existing one. The form has 7 sections.

Assumes: you have vehicle-create or vehicle-edit.

Create a new vehicle

  1. Go to /assets/vehicle
  2. Click Create / Add new → opens /assets/vehicle/create
  3. Fill in the sections below
  4. Save

On success the system generates a code automatically and shows the vehicle detail.

Edit a vehicle

  1. Open the detail page or use ⋮ → Edit
  2. Go to /assets/vehicle/$vehicleId/edit
  3. Change the fields you need and save
Changing registration_number or tank_number

Changing these values may trigger a confirmation because they can affect code regeneration (Code regeneration warning).

Section 1 — Basic info

Basic info

FieldRequiredNotes
asset_type_idYesSelect first — resets category/brand/model
category_idYesDepends on asset type
brand_idYesDepends on asset type
model_idYesDepends on brand
color_idYes
registration_numberYes3–50 chars; uniqueness checked via API
tank_numberYes3–50 chars; uniqueness checked via API
strengthNoMax 20 chars
steering_wheelYesleft or right

Section 2 — Specifications

FieldNotes
year_using4 digits (e.g. 2024)
year_manufactured4 digits
country_of_manufactureCountry of manufacture
reference_noReference number
dateRegistration date
detailAdditional detail

Section 3 — Organization

Organization

Uses OrganizerForm with:

  • levelCENTER / PROVINCE / DISTRICT
  • ministry_id, maindepart_id, depart_id
  • province_id, district_id

Required/visible fields depend on permissions and the selected level.

Section 4 — Financial

Financial

FieldNotes
currency_codeLAK / USD / THB
costCost (≥ 0)
introductory_priceIntroductory price (≥ 0)
vehicle_kindSwitch: off = government, on = government_project

When government

  • Shows funding_source (legacy funding-source dropdown)
  • Shows funding_source_name (optional)

When government_project

Financial — project

  • Requires funding_source_type_id
  • Requires funding_source_name
  • Clears funding_source

Section 5 — User assignment

FieldNotes
user_using_typeperson or using_type
user_using_namePerson name or government usage type
user_using_positionPosition (free text)
positionMINISTER / VICE_MINISTER / GOVERNOR / VICE_GOVERNOR

When user_using_type = using_type, choose one of:

  • Administrative vehicle (ລົດບໍລິຫານ)
  • Specialized vehicle (ລົດວິຊາສະເພາະຈຳເພາະ)
  • Leadership vehicle (ລົດການນຳລະດັບສູງ)

Section 6 — Plate registration

Plate registration

FieldRequiredNotes
plate_province_idYesSelecting a province sets plate_address automatically
plate_textYesMax 2 characters
plate_noYesMax 4 characters
plate_used_atNoWhere the plate is used

The system checks the combination (plate_text + plate_no + plate_province_id) for uniqueness. If taken, an error is shown and save is blocked.

Section 7 — Attachments

  • file_url / file_s3_key — upload a reference document to S3
  • Gallery images are managed on the detail page (not on the create form)

Verify it worked

Create:

  • Success message appears
  • A new code exists
  • You can open the detail page

Edit:

  • Detail page shows the saved values
  • If you changed the plate — confirm it is not duplicated on another vehicle

Common problems

SymptomCauseFix
Cannot save — registration takenDuplicate registration_numberUse a different number
Cannot save — plate takenDuplicate plateChange plate_text / plate_no / province
Funding source type not shownStill governmentTurn on the government_project switch
Organization fields missingPermission / level limitsCheck the account accessScope

Next steps