In Umrah and Hajj registration the companion (mahram) requirement depends on the passenger's age and sex. The rule itself follows Saudi regulation and has changed several times in recent years. On the software side two mistakes are common, and both are costly.
First mistake: hard-coding the rule
Writing age thresholds and companion conditions into code leaves the agency waiting for a software release whenever regulation changes. For a change arriving mid-season, that means weeks of manual tracking.
The right approach is to manage the rule as configuration: age thresholds and the conditions under which a companion is required should be adjustable per agency.
Second mistake: calculating age from today
This one is subtler. A passenger who is seventeen at registration may have turned eighteen by the time the departure leaves. Or the reverse: someone who looks eighteen today may still be seventeen on the travel date.
Age must be calculated from the DEPARTURE date. The same rule applies to pricing: child and infant fares are determined by the travel date, not the registration date. A system that misses this produces the wrong price for every passenger near a threshold.
The same logic for passport validity
The same reasoning applies to passport validity, where the consequences are heavier. The six-month rule is calculated from the RETURN date, not from today.
A passport that looks sufficient today may be short on the return leg three months from now. A passport problem discovered at the airport is among the most expensive mistakes an agency can make.
How it should appear in operations
Once the rule is set up correctly, the software's job is to warn: passengers who need a mahram but have none selected should appear in a list ordered by days remaining to departure.
Timing matters. A list produced two days before departure is not information, it is panic. A useful warning is one that arrives while there is still time to fix things.