Project

General

Profile

Task #129

Updated by Dana Basheer 14 days ago

This module allows admin to configure weekend days for a specific hotel within a defined date range. These configured weekend days will be used for: 

 * Weekend tariff calculation 
 * Special pricing logic 
 * Package and enquiry pricing 
 * Seasonal rate logic 

 Each hotel can have multiple weekend configurations for different date ranges. 

 **Table** 

 hotel_weekend_master 

 * id 	 Unique weekend config ID 
 * hotel_id 	 Hotel reference 
 * start_date 	 Weekend config start date 
 * end_date 	 Weekend config end date 
 * weekdays 	 Selected weekend days stored in JSON 
 * is_active 	 Active / inactive status 
 * enterprise_id 	 Enterprise reference 
 * created_at 	 Created timestamp 
 * updated_at 	 Updated timestamp 

 **Validations** 

 Add Weekend to Hotel 

 * Hotel ID is required 
 * Start Date is required 
 * End Date is required 
 * Weekend Days is required (at least one day must be selected) 
 * enterprise_id is required 

 Duplicate 

 * Prevent duplicate or overlapping records: 
      * Same hotel_id + enterprise_id + overlapping date range is NOT allowed 

 Date 

 Start Date: 

 * Must be valid date 
 * Cannot be empty 

 End Date: 

 * Must be valid date 
 * Cannot be empty 
 * Must be greater than or equal to Start Date 

 Weekend Days 

 * At least one day must be selected 
 * Multiple days allowed 
 * Only valid weekdays allowed: 
    * Monday 
    * Tuesday 
    * Wednesday 
    * Thursday 
    * Friday 
    * Saturday 
    * Sunday 
 * Cannot be empty 

 Enterprise 

 * enterprise_id must be provided 
 * enterprise_id must match hotel_master.enterprise_id 
 * Cannot assign weekend to hotel from another enterprise 

 Edit 

 Allow editing: 

 * Start Date 
 * End Date 
 * Weekend Days 
 * is_active 

 Do NOT allow editing: 

 * hotel_id 
 * enterprise_id 

 Active / Inactive 

 * is_active = TRUE → Weekend rule is active and applied 
 * is_active = FALSE → Weekend rule is inactive but not deleted 
 * Soft delete only

Back