@extends('crm.master') @section('title', 'Edit Custom Rate') @section('content')

Edit Custom Rate

{{ $rate->name }}

Back
@include('crm.components.alerts')
@csrf @method('PUT')
Rate Details
@error('name')
{{ $message }}
@enderror
Per Booking
@error('rate_type')
{{ $message }}
@enderror
@error('start_date')
{{ $message }}
@enderror
@php $hasEndDate = old('end_date', $rate->end_date?->format('Y-m-d')); @endphp
@error('end_date')
{{ $message }}
@enderror
Duration Tiers

Define pricing adjustments based on booking duration (in hours). Leave Upper empty on the last tier to mean "Max" (no upper limit).

@php $editTiers = old('tiers'); if (!$editTiers) { $editTiers = $rate->tiers->map(fn($t) => [ 'lower' => $t->lower_threshold, 'upper' => $t->upper_threshold, 'adjustment_type' => $t->adjustment_type, 'amount' => $t->adjustment_amount, ])->toArray(); } if (empty($editTiers)) { $editTiers = [['lower'=>1,'upper'=>'','adjustment_type'=>'fixed','amount'=>0]]; } @endphp @foreach($editTiers as $i => $tier)
@endforeach
Product Scope
apply_to_all_products ? '1' : '0') == '1' ? 'checked' : '' }} onchange="toggleProductList()">
@php $selectedIds = old('product_ids', $rate->products->pluck('id')->toArray()); @endphp
@include('crm.components.product-selector')
Status

Current status: @if($rate->status === 'active') Active @else Archived @endif

@csrf @method('PUT')
Cancel
@endsection