PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.16
Yatra – Travel Booking & Tour Operator Software v3.0.16
3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 All 84 releases
← All changes | app/Models/TravelerCategory.php +11 -0 3.0.3 → 3.0.16 View file →
@@ -55,8 +55,15 @@
55 55 */
56 56 public ?int $max_pax;
57 57
58 58 /**
59 + * @var string How a party larger than max_pax is handled when pricing per
60 + * group: 'block' (cap at max, default) or 'per_block' (charge
61 + * one flat price per block of max_pax people).
62 + */
63 + public string $group_overflow = 'block';
64 +
65 + /**
59 66 * @var array|null Icon data (type and value)
60 67 */
61 68 public ?array $icon;
62 69
@@ -102,8 +109,11 @@
102 109 ? $data['pricing_mode']
103 110 : 'per_person';
104 111 $category->min_pax = isset($data['min_pax']) && $data['min_pax'] !== '' ? (int) $data['min_pax'] : null;
105 112 $category->max_pax = isset($data['max_pax']) && $data['max_pax'] !== '' ? (int) $data['max_pax'] : null;
113 + $category->group_overflow = isset($data['group_overflow']) && in_array($data['group_overflow'], ['block', 'per_block'], true)
114 + ? $data['group_overflow']
115 + : 'block';
106 116 $category->icon = isset($data['icon']) ? (is_array($data['icon']) ? $data['icon'] : maybe_unserialize($data['icon'])) : null;
107 117 $category->status = $data['status'] ?? 'draft';
108 118 $category->created_at = $data['created_at'] ?? '';
109 119 $category->updated_at = $data['updated_at'] ?? '';
@@ -127,8 +137,9 @@
127 137 'age_max' => $this->age_max,
128 138 'pricing_mode' => $this->pricing_mode,
129 139 'min_pax' => $this->min_pax,
130 140 'max_pax' => $this->max_pax,
141 + 'group_overflow' => $this->group_overflow,
131 142 'icon' => $this->icon,
132 143 'status' => $this->status,
133 144 'created_at' => $this->created_at,
134 145 'updated_at' => $this->updated_at,