@extends('layouts.app') @section('title', 'Edit Rate Plan') @section('nav_rates', 'bg-teal-50 text-teal-700 font-semibold') @section('page_title', 'Edit Rate Plan') @section('page_subtitle', '{{ $plan->name }}') @section('content') @php $existingRates = $plan->rates->pluck('rate', 'room_type')->toArray(); @endphp
@csrf @method('PATCH')

Plan Details

@if($errors->any())
    @foreach($errors->all() as $err)
  • {{ $err }}
  • @endforeach
@endif {{-- Name & Code --}}

Alphanumeric/dash/underscore, max 20 chars

{{-- Type --}}
@foreach(['percent_off' => ['% Off Rack Rate', 'Apply a percentage discount to the room\'s rack rate.'], 'amount_off' => ['₱ Off Rack Rate', 'Subtract a fixed peso amount from the rack rate.'], 'fixed' => ['Fixed Rate per Room Type', 'Specify exact rates for each room type.']] as $val => [$label, $desc]) @endforeach
{{-- Value --}}
{{-- Fixed rates grid --}}
@foreach($roomTypes as $type => $rackRate) @endforeach
Room Type Rack Rate Plan Rate
{{ $type }} ₱{{ number_format($rackRate, 0) }}

Leave blank to fall back to the rack rate for that type.

{{-- Description --}}
{{-- Constraints --}}
{{-- Active --}}
active ? '1' : '0') == '1' ? 'checked' : '' }}>
@csrf @method('DELETE')
Cancel
@endsection