Task #126
Updated by Dana Basheer 14 days ago
The Enquiry module is used to capture and manage tour enquiries from both B2B agents and B2C direct customers.
**Table**
enquiry_master
* id (PK) INT Unique enquiry ID
* enterprise_id (FK) INT References enterprise_master
* enquiry_type ENUM('B2B','B2C') Enquiry type
* agent_id (FK) INT Required only for B2B
* guest_name VARCHAR(150) Customer name
* mobile VARCHAR(15) Customer mobile
* email VARCHAR(150) Customer email
* address TEXT Customer address
* arrival_location_id INT FK → geography table
* departure_location_id INT FK → geography table
* start_date DATE Tour start date
* end_date DATE Tour end date
* no_of_nights INT Number of nights
* no_of_double_room INT Number of double rooms
* no_of_single_room INT Number of single rooms
* no_of_extra_bed INT Number of extra beds
* no_of_nights INT Number of nights
* adults INT Number of adults
* child_with_bed INT Children with bed
* child_without_bed INT Children without bed
* total_pax INT Total passengers
* hotel_category_id INT FK → hotel_category_master
* meal_plan_id INT FK → meal_plan_master
* vehicle_required BOOLEAN Yes/No
* sightseeing_required BOOLEAN Yes/No
* enquiry_source VARCHAR(100) Email, Phone, Website, etc.
* gstin VARCHAR(20) GST number (optional)
* description TEXT Additional notes
* enquiry_status ENUM('New','Quoted','Confirmed','Cancelled')
* added_date DATETIME Created date
enquiry_vehicle
* id PK
* enquiry_id FK
* vehicle_type_id FK
* vehicle_count INT
* enterprise_id FK
enquiry_location
* id PK
* enquiry_id FK
* hub_location_id FK
* enterprise_id FK
**Validations**
Mandatory fields:
* Guest Name
* Mobile
* Arrival Location
* Departure Location
* Start Date
* End Date
* No of Nights
Date
* End Date must be greater than Start Date
* Nights must match date difference
Vehicle
* If Vehicle Required = Yes
* Then:
* At least one vehicle type must be selected
* Vehicle count must be > 0
Passenger
* Total Pax must equal:
* Adults + Child with bed + Child without bed
Sightseeing
* If Sightseeing Required = Yes
* Later sightseeing allocation required