| @@ -30,9 +30,11 @@ | ||
| 30 | 30 | // Check if Dynamic Form Field module is enabled (Pro feature) |
| 31 | 31 | $is_dynamic_form_enabled = apply_filters('yatra_dynamic_form_field_enabled', false); |
| 32 | 32 | |
| 33 | 33 | // Get form configuration - returns default config if module disabled, custom config if enabled |
| 34 | -$form_config = yatra_get_booking_form_config(); | |
| 34 | +// Scoped to the trip being booked, so a field or section limited to certain | |
| 35 | +// trips (Pro) is neither rendered nor required here. | |
| 36 | +$form_config = yatra_get_booking_form_config(!empty($trip_id) ? (int) $trip_id : null); | |
| 35 | 37 | |
| 36 | 38 | |
| 37 | 39 | // Country list — pulls from the canonical FormatHelper source so every |
| 38 | 40 | // dropdown (admin, public booking, Pro modules) shows the same full |
| @@ -688,8 +690,11 @@ | ||
| 688 | 690 | 'deposit_required' => $deposit_required, |
| 689 | 691 | 'deposit_percentage' => $deposit_percentage, |
| 690 | 692 | 'partial_payment' => $partial_payment, |
| 691 | 693 | 'partial_payment_percentage' => $partial_payment_percentage, |
| 694 | + // Tour start (when a date is already chosen) → Pro hides deposit/partial for | |
| 695 | + // tour-anchored payments when the tour is inside the balance-due window. | |
| 696 | + 'travel_date' => isset($booking->travel_date) ? (string) $booking->travel_date : '', | |
| 692 | 697 | ]); |
| 693 | 698 | |
| 694 | 699 | $has_flexible_options = $flexible_payments_enabled && !empty($payment_method_options); |
| 695 | 700 | ?> |