@php $planId = data_get($plan, 'id'); $formatPrice = function ($value) { if ($value === null || $value === '') { return ''; } $amount = (float) $value; return fmod($amount, 1.0) === 0.0 ? (string) (int) $amount : rtrim(rtrim(number_format($amount, 2, '.', ''), '0'), '.'); }; $localPrice = old("rateplans.{$index}.local_base_rate", data_get($plan, 'local_base_rate', '')); $intlPrice = old("rateplans.{$index}.base_rate", data_get($plan, 'base_rate', '')); @endphp @if(!empty($planId)) @endif @include('partials._meal-plan-select', [ 'name' => "rateplans[{$index}][meal_plan]", 'selected' => data_get($plan, 'meal_plan', 'EP'), 'class' => 'form-control-sm js-meal-plan-select', ]) @include('partials._currency-select', [ 'name' => "rateplans[{$index}][local_currency]", 'selected' => data_get($plan, 'local_currency', $hotel->currency ?? 'TZS'), 'class' => 'form-control-sm', ]) @include('partials._currency-select', [ 'name' => "rateplans[{$index}][international_currency]", 'selected' => data_get($plan, 'international_currency', 'USD'), 'class' => 'form-control-sm', ])