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/Services/RecurringRuleService.php +8 -1 3.0.9 → 3.0.16 View file →
@@ -170,9 +170,16 @@
170 170 * Build date information array from rule
171 171 */
172 172 private function buildDateInfo(string $date, RecurringRule $rule): array
173 173 {
174 - $cap = (int) ($rule->capacity_value ?? 0);
174 + // Mirror CapacityService's precedence: the rule editor writes the seat cap
175 + // to `seats_total` and leaves `capacity_value` NULL, so reading
176 + // capacity_value alone reported 0 seats for every rule created in the UI
177 + // (a date that shows no capacity yet is not marked full).
178 + $cap = (int) ($rule->seats_total ?? 0);
179 + if ($cap <= 0) {
180 + $cap = (int) ($rule->capacity_value ?? 0);
181 + }
175 182
176 183 return [
177 184 'date' => $date,
178 185 'max_capacity' => $cap,