@extends('layouts.app') @section('title', 'Edit Works Order') @section('breadcrumb') Jobs {{ $job->job_number }} {{ $worksOrder->order_number }} Edit @endsection @section('content')
@csrf @method('PUT') @if($errors->any())
@endif

{{ $worksOrder->order_number }} — Edit

{{ $job->job_number }} · {{ $job->contact?->full_name ?? 'No client' }}
{{-- Work Order Details --}}

Work Order Details

drawings_attached) ? 'checked' : '' }}>
{{-- Scope of Works --}}

Scope of Works

{{-- Faults --}}

Faults

@php $existingFaults = $worksOrder->faults->keyBy('fault_number'); @endphp
@for($i = 1; $i <= 5; $i++) @php $ef = $existingFaults->get($i); @endphp @endfor
# Fault Type Cost ($)
Fault {{ $i }} cost ?? '0.00') }}" class="input w-full text-right text-sm fault-cost" placeholder="0.00">
Total Fault Cost $0.00
@php $threshold = \App\Models\AppSetting::get('work_order_fault_threshold', 300); @endphp

If total fault cost exceeds ${{ number_format($threshold, 0) }}, approval is required.

{{-- Notes --}}
Cancel
@endsection