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/RecurringRule.php +7 -0 3.0.7 → 3.0.16 View file →
@@ -43,8 +43,12 @@
43 43 public ?array $exceptions = null;
44 44 public string $exception_type = 'exclude';
45 45 public string $capacity_type = 'fixed';
46 46 public ?int $capacity_value = null;
47 + // The rule editor persists the seat cap here; `capacity_value` is only written
48 + // by the legacy `/trips/{id}/recurring-rules` path. Both are read (seats_total
49 + // first) so rules created by either path resolve to the same capacity.
50 + public ?int $seats_total = null;
47 51 public float $pricing_adjustment = 0.00;
48 52 public string $pricing_adjustment_type = 'amount';
49 53 public ?int $cutoff_hours = null;
50 54 public ?int $cutoff_days = null;
@@ -80,8 +84,11 @@
80 84 $rule->recurrence_type = sanitize_text_field($data['recurrence_type'] ?? 'weekly');
81 85 $rule->start_date = !empty($data['start_date']) ? sanitize_text_field($data['start_date']) : null;
82 86 $rule->end_date = !empty($data['end_date']) ? sanitize_text_field($data['end_date']) : null;
83 87 $rule->capacity_value = (int) ($data['capacity_value'] ?? 0);
88 + $rule->seats_total = isset($data['seats_total']) && $data['seats_total'] !== null && $data['seats_total'] !== ''
89 + ? (int) $data['seats_total']
90 + : null;
84 91 $rule->price_override = !empty($data['price_override']) ? (float) $data['price_override'] : null;
85 92 $rule->created_at = $data['created_at'] ?? '';
86 93 $rule->updated_at = $data['updated_at'] ?? '';
87 94 $rule->availability_status = sanitize_text_field($data['availability_status'] ?? 'available');