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/FilterService.php +7 -3 3.0.6 → 3.0.16 View file →
@@ -28,11 +28,15 @@
28 28 // Get price range from TripRepository
29 29 $tripRepository = new \Yatra\Repositories\TripRepository();
30 30 $price_stats = $tripRepository->getPriceRangeStats();
31 31
32 - $min_price = $options['min_price'] ?? ($price_stats->min_price ?? 100);
33 - $max_price = $options['max_price'] ?? ($price_stats->max_price ?? 5000);
34 - $step = $options['step'] ?? max(1, ($max_price - $min_price) / 100);
32 + $min_price = (int) floor((float) ($options['min_price'] ?? ($price_stats->min_price ?? 100)));
33 + $max_price = (int) ceil((float) ($options['max_price'] ?? ($price_stats->max_price ?? 5000)));
34 + // Step 1 so the range slider can reach the true max exactly. A coarser
35 + // step only lets the thumb stop on min + N*step, capping the slider
36 + // short of the real maximum when (max - min) isn't a whole multiple of
37 + // that step (e.g. min 9 / max 10000 / step 100 stops at 9909).
38 + $step = $options['step'] ?? 1;
35 39
36 40 ob_start();
37 41 ?>
38 42 <div class="yatra-filter-section">