@extends('layouts.app')
@section('title', __('repair::lang.add_estimate'))
@section('content')
@include('repair::layouts.nav')
{!! Form::open(['action' => '\Modules\Repair\Http\Controllers\RepairEstimateController@store', 'id' => 'estimate_form', 'method' => 'post']) !!}
@component('components.widget', ['title' => __('repair::lang.estimate_details')])
@if(count($business_locations) == 1)
@php $default_location = current(array_keys($business_locations->toArray())); @endphp
@else
@php $default_location = null; @endphp
@endif
{!! Form::label('location_id', __('business.business_location') . ':*') !!}
{!! Form::select('location_id', $business_locations, $default_location, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select'), 'required', 'style' => 'width: 100%;']); !!}
{!! Form::label('job_sheet_id', __('repair::lang.job_sheet_number') . ' (Optional):') !!}
{!! Form::select('job_sheet_id', $job_sheets, $job_sheet ? $job_sheet->id : null, ['class' => 'form-control select2', 'id' => 'job_sheet_id_select', 'placeholder' => __('messages.please_select'), 'style' => 'width: 100%;']); !!}
{!! Form::label('estimate_no', __('repair::lang.estimate_no') . ':*') !!}
{!! Form::text('estimate_no', $estimate_no, ['class' => 'form-control', 'required', 'placeholder' => __('repair::lang.estimate_no')]); !!}
{!! Form::label('insurance_company', __('repair::lang.insurance_company') . ':') !!}
{!! Form::text('insurance_company', null, ['class' => 'form-control', 'id' => 'insurance_company', 'placeholder' => 'e.g. SRI LANKA INSURANCE COMPANY']); !!}
{!! Form::label('policy_no', __('repair::lang.policy_no') . ':') !!}
{!! Form::text('policy_no', null, ['class' => 'form-control', 'placeholder' => 'Policy / Claim Number']); !!}
@endcomponent
@component('components.widget', ['title' => __('repair::lang.device_info') . ' / Vehicle Details'])
{!! Form::label('vehicle_reg_no', __('repair::lang.vehicle_reg_no') . ' / Serial No:*') !!}
{!! Form::text('vehicle_reg_no', $job_sheet ? $job_sheet->serial_no : null, ['class' => 'form-control', 'id' => 'vehicle_reg_no', 'required', 'placeholder' => 'e.g. LN-0635']); !!}
{!! Form::label('model_frame_no', __('repair::lang.model_frame_no') . ':') !!}
{!! Form::text('model_frame_no', $job_sheet && $job_sheet->deviceModel ? $job_sheet->deviceModel->name : null, ['class' => 'form-control', 'id' => 'model_frame_no', 'placeholder' => 'e.g. ELF 350/']); !!}
{!! Form::label('title', __('repair::lang.estimate_title') . ':') !!}
{!! Form::text('title', $estimate_settings['estimate_title'] ?? 'BODY & PAINT REPAIR ESTIMATE', ['class' => 'form-control font-weight-bold', 'required']); !!}
@endcomponent
@component('components.widget', ['title' => __('repair::lang.estimate') . ' Items'])
Add estimate items organized by repair category (e.g. REMOVING & REFITTING , REPAIRING , REPAINTING , REPLACEMENT ).
Items support numbers (e.g. 15000) or code text (e.g. SH for Second Hand, MR for Minor Repair).
@foreach($default_categories as $catIndex => $categoryName)
@endforeach
@lang('repair::lang.add_category')
Estimated Numeric Total:
0.00
@endcomponent
@component('components.widget')
{!! Form::label('notes', __('brand.note') . ' / Remarks:') !!}
{!! Form::textarea('notes', null, ['class' => 'form-control', 'rows' => 3, 'placeholder' => 'Internal remarks or customer notes...']); !!}
{!! Form::label('terms_and_conditions', __('repair::lang.repair_tc_conditions') . ':') !!}
{!! Form::textarea('terms_and_conditions', $estimate_settings['terms_and_conditions'] ?? null, ['class' => 'form-control', 'rows' => 3, 'placeholder' => 'Terms and conditions...']); !!}
@endcomponent
{!! Form::close() !!}
@include('contact.create', ['quick_add' => true])
@stop
@section('javascript')
@endsection