Actions
Task #124
openAgent Management
Start date:
02/18/2026
Due date:
02/18/2026 (15 days late)
% Done:
0%
Estimated time:
Description
The Agent Management module is used to create and manage agents under a specific enterprise and location.
Agents represent travel partners, sub-agents, or business representatives who operate in a particular state and location.
Each agent is linked to an enterprise and geography location, and their contact and GST details are stored for business and transaction purposes.
Table
agent_master
- id (PK) INT Unique agent ID
- enterprise_id (FK) INT References enterprise_master.enterprise_id
- agent_name VARCHAR(150) Agent full name
- agent_display_name VARCHAR(150) Display name used in UI/reports
- state_geog_id (FK) INT References khm_loc_mst_geography.geog_id (State level)
- location_geog_id (FK) INT References khm_loc_mst_geography.geog_id (City/Tourist Location level)
- sub_location VARCHAR(150) Sub-location or area name
- mobile_no VARCHAR(15) Agent contact number
- email VARCHAR(150) Agent email
- address TEXT Agent address
- gstin VARCHAR(20) GST number
- is_active BOOLEAN Active / Inactive status
- added_date DATETIME Record creation date
Validations
Add Agent
Mandatory Fields
- Agent Name is mandatory
- Agent State is mandatory
- Location is mandatory
- Mobile Number is mandatory
- Email is mandatory
Name
- Minimum 3 characters required
- Trim spaces before saving
Mobile
- Must be numeric
- Length must be 10–15 digits
- Must be unique under same enterprise
- Must be valid email format
- Must be unique under same enterprise
GSTIN
- Optional field
- If entered, must be valid GSTIN format
- Length must be 15 characters
Location
- State must be geo_level = State
- Location must be geo_level = City or Tourist Location
- Location must belong to selected State
Enterprise
- enterprise_id must be auto-assigned from logged-in enterprise
- User cannot create agent for another enterprise
Edit Agent
- Allow editing:
- Agent Name
- Display Name
- Mobile
- Address
- GSTIN
- Active / Inactive
Must still enforce duplicate validation.
Active / Inactive Rule
- is_active = TRUE → Agent usable
- is_active = FALSE → Agent disabled but not deleted
Never hard delete agent records.
Actions