@php $disabled = ''; @endphp
{{-- Phase / Expense Selection --}} @if($invoice) {{ $invoice->uuid }} @else

No invoice found.

@endif
{{-- --}} {{-- ✅ Move wire:ignore to wrap the entire row or p-4 --}}
{{-- --}} {!! Form::select('allowablephases_id', // Load selected phase as the only option so Select2 sees it $selectedAllowablePhases ? [ $selectedAllowablePhases => optional(\App\Models\ContractPhase::find($selectedAllowablePhases))->name ?? 'Selected Phase' ] : [], $selectedAllowablePhases, [ 'class' => 'form-select', 'data-control' => 'select2', 'data-kt-select2' => 'true', 'data-placeholder' => __('Select Phases'), 'data-allow-clear' => 'true', 'data-kt-template-result' => 'phases', 'data-kt-template-selection' => 'phases', 'data-remote' => route('resource-select', ['contractAllowablePhase', 'dependent' => 'invoice_id']), 'data-dependent_id' => 'invoice_id', 'wire:model' => 'selectedAllowablePhases', 'data-set-prop-renderless' => 'selectedAllowablePhases', 'data-component-id' => $this->__id, 'id' => 'allowablephases_id-select' ] ) !!}
{{$selectedAllowablePhases }} {{-- Loading Spinner --}}
⏳ Loading item details...
{{-- Debug Info --}} @if($selectedAllowablePhases) @if($selectedPhase)
🔍 Selected Phase ID: {{ $selectedAllowablePhases }}
Phase Name: {{ $selectedPhase->name }}
@if($selectedPhase->stage)
Stage Name: {{ $selectedPhase->stage->name }}
@endif
Phase Total Amount @cMoney($selectedPhaseTotalCost, $selectedPhase->contract->currency, true)
Invoiced Amount @cMoney($selectedPhaseInvoiceableAmount, $invoice->currency, true)
Remaining Amount @cMoney($selectedPhaseRemainingAmount, $invoice->currency, true)
@endif @endif {{-- Item Name --}}
{{ Form::label('name', __('Item Name'), ['class' => 'col-form-label']) }}
{{-- Description --}}
{{ Form::label('description', __('Description'), ['class' => 'col-form-label']) }}
{{-- Quantity --}}
{{ Form::label('quantity', __('Quantity'), ['class' => 'col-form-label']) }} {!! Form::number('quantity', null, [ 'class' => 'form-control', 'wire:model.live' => 'quantity', // 🔁 this is the key $disabled, 'min' => 0, 'step' => 1, 'placeholder' => __('Quantity') ]) !!}
{{-- Price --}}
{{ Form::label('price', __('Price'), ['class' => 'col-form-label']) }} {!! Form::number('price', null, [ 'class' => 'form-control', 'wire:model.live' => 'price', // 🔁 this is the key $disabled, 'placeholder' => __('Price') ]) !!}
{{-- Subtotal --}} {{--
{{ Form::label('subtotal', __('Subtotal'), ['class' => 'col-form-label']) }} {!! Form::number('subtotal', null, [ 'class' => 'form-control', 'disabled', 'placeholder' => __('Subtotal') ]) !!}
--}} {{-- Subtotal --}}
Subtotal
{{-- Buttons --}}