@extends('layouts.template') @section('content')

Workshop Breakdown

Workshop Breakdown

{!! Form::label('date', 'Date') !!} {!! Form::text('date',$workshop_breakdown->date, ['id'=>'datepicker','class' => 'form-control calander-icon']) !!}
{!! Form::label('job_number', 'Job Number') !!} {!! Form::text('job_number', $workshop_breakdown->job_number, ['class' => 'form-control']) !!}
@if(!empty($workshop_breakdown->trip_number))
{!! Form::label('trip_number', 'Trip Number') !!} {!! Form::text('trip_number', $workshop_breakdown->trip_number, ['class' => 'form-control']) !!}
@else
{!! Form::label('registration_number', 'Registration Number') !!} {!! Form::text('registration_number', $workshop_breakdown->registration_number, ['class' => 'form-control']) !!}
@endif
{!! Form::label('current_km', 'Current Km') !!} {!! Form::text('current_km', str_replace('.00', '',number_format($workshop_breakdown->current_km, 2, '.', ',')), ['class' => 'form-control']) !!}
{!! Form::label('service_km', 'Service at KM') !!} {!! Form::text('service_km',($workshop_breakdown->service_km != "") ? str_replace('.00', '',number_format($workshop_breakdown->service_km, 2, '.', ',')) : null,['class' => 'form-control']) !!}
{!! Form::label('mechanic', 'Mechanic') !!} {!! Form::text('mechanic', $workshop_breakdown->mechanic, ['class' => 'form-control']) !!}
{!! Form::label('location', 'Location') !!} {!! Form::text('location', $workshop_breakdown->location, ['class' => 'form-control']) !!}
@if(!empty($workshop_breakdown->trip_number))

Truck Maintenance

Job Number Trip Number Driver Truck Status
{!! Form::text('truck_job_number',$workshop_breakdown->job_number, ['class' => 'form-control','readonly'=>true]) !!} {!! Form::text('truck_trip_number',$workshop_breakdown->trip_number,['class' =>'form-control','readonly'=>true]) !!} {!! Form::text('truck_driver', $truck_maintainance ? $truck_maintainance->driver : '', ['id'=>'truck_driver','class' => 'form-control']) !!} {!! Form::text('truck', $truck_maintainance ? $truck_maintainance->truck : '', ['id'=>'truck','class' => 'form-control']) !!} {!! Form::text('truck_status',$truck_maintainance ? $truck_maintainance->status : '', ['id'=>'truck_status','class' => 'form-control']) !!}
@if ($truck_defect_report != '') @foreach($truck_defect_report as $key => $truck) @endforeach @else @endif
Defects Report Code Saved
status != '' && $truck->status == 1) checked @endif> Yes    status != '' && $truck->status == 0) checked @endif> No

Preventative Maintenance

@foreach($truck_preventative as $trp) @endforeach
Check/Change Frequency Last Change(KM) Next Change Change Date
{!! Form::text('truck_check_change',$trp->check_change, ['class' => 'form-control','readonly'=>true]) !!} {!! Form::text('truck_frequency[]',str_replace('.00', '',number_format($trp->frequency, 2, '.', ',')), ['class' => 'form-control frequency','readonly'=>true]) !!} {!! Form::text('truck_last_change[]',str_replace('.00', '',number_format($trp->last_change, 2, '.', ',')), ['class' => 'form-control p1_last_change', 'id'=>'serviced', 'readonly'=>true]) !!} {!! Form::text('truck_next_change[]',str_replace('.00', '',number_format($trp->next_change, 2, '.', ',')), ['class' => 'form-control p1_next_change', 'readonly'=>true]) !!} {!! Form::text('truck_change_date',$trp->change_date, ['class' => 'form-control']) !!}
{!! Form::textarea('truck_workshop_report',$truck_preventative ? $truck_preventative[0]->workshop_report : '', ['class' => 'form-control inp_textarea']) !!}
@if($truck_tyre_report !='') @foreach($truck_tyre_report as $key =>$ttr) @if($key % 3 ==0)@endif @endforeach @else @endif
Tyre nos (Status) Tyre nos (Status) Tyre nos (Status)
{!! Form::text('truck_tyre_nos[]',$ttr->tyre_nos,['style'=>'width:90px;']) !!}{!! Form::select('truck_tyre_status[]',['good'=>'Good','damage'=>'Damage'],$ttr->status, ['placeholder'=>'Select Status']) !!}

Trailer Maintenance

Job Number Trip Number Driver Trailer Status
{!! Form::text('trailer_job_number',$workshop_breakdown->job_number, ['class' => 'form-control','readonly'=>true]) !!} {!! Form::text('trailer_trip_number',$workshop_breakdown->trip_number,['class'=>'form-control','readonly'=>true]) !!} {!! Form::text('trailer_driver',$trailer_maintainance ? $trailer_maintainance->driver : '', ['class' => 'form-control']) !!} {!! Form::text('trailer',$trailer_maintainance ? $trailer_maintainance->trailer : '', ['class' => 'form-control']) !!} {!! Form::text('trailer_status',$trailer_maintainance ? $trailer_maintainance->status : '', ['class' => 'form-control']) !!}
@if ($trailer_defect_report != '') @foreach($trailer_defect_report as $key => $trailer) @endforeach @else @endif
Defects Report Code Saved
status != '' && $trailer->status == 1) checked @endif> Yes    status != '' && $trailer->status == 0) checked @endif> No

Preventative Maintenance

@foreach($trailer_preventative as $tlp) @endforeach
Check/Change Frequency Last Change(KM) Next Change Change Date
{!! Form::text('trailer_check_change',$tlp->check_change, ['class' => 'form-control','readonly'=>true]) !!} {!! Form::text('trailer_frequency[]',str_replace('.00', '',number_format($tlp->frequency, 2, '.', ',')), ['class' => 'form-control frequency','readonly'=>true,]) !!} {!! Form::text('trailer_last_change[]',str_replace('.00', '',number_format($tlp->last_change, 2, '.', ',')), ['class' => 'form-control p2_last_change', 'id'=>'serviced', 'readonly'=>true]) !!} {!! Form::text('trailer_next_change[]',str_replace('.00', '',number_format($tlp->next_change, 2, '.', ',')), ['class' => 'form-control p2_next_change', 'readonly'=>true]) !!} {!! Form::text('trailer_change_date',$tlp->change_date, ['class' => 'form-control']) !!}
{!! Form::textarea('trailer_workshop_report', $trailer_preventative ? $trailer_preventative[0]->workshop_report : '', ['class' => 'form-control inp_textarea']) !!}
@if($trailer_tyre_report !='') @foreach($trailer_tyre_report as $key =>$ttr) @if($key % 3 == 0) @endif @endforeach @else @endif
Tyre nos (Status) Tyre nos (Status) Tyre nos (Status)
{!! Form::text('trailer_tyre_nos[]',$ttr->tyre_nos, ['style'=>'width:90px;']) !!}{!! Form::select('trailer_tyre_status[]',['good'=>'Good','damage'=>'Damage'],$ttr->status, ['placeholder'=>'Select Status']) !!}
@else

Preventative Maintenance

@if ($other_preventative != '') @foreach($other_preventative as $trp) !!} @endforeach @else @endif
Check/Change Frequency Last Change(KM) Next Change Change Date
{!! Form::text('other_check_change[]',$trp->check_change, ['class' => 'form-control','readonly'=>true]) !!} {!! Form::text('other_frequency[]',str_replace('.00', '',number_format($trp->frequency, 2, '.', ',')), ['class' => 'form-control frequency','readonly'=>true]) !!} {!! Form::text('other_last_change[]', str_replace('.00', '',number_format($trp->last_change, 2, '.', ',')), ['class' => 'form-control other_last_change','readonly'=>true]) !!} {!! Form::text('other_next_change[]', str_replace('.00', '',number_format($trp->next_change, 2, '.', ',')), ['class' => 'form-control other_next_change', 'readonly'=>true]) !!} {!! Form::text('other_change_date[]', $trp->change_date, ['class' => 'form-control datepicker1']) !!}
{!! Form::textarea('other_workshop_report', $other_preventative ? $other_preventative[0]->workshop_report : '', ['class' => 'form-control inp_textarea']) !!} {!! $errors->first('other_workshop_report', '

:message

') !!}
@if ($other_tyre_report != '') @foreach($other_tyre_report as $key => $ttr) @if ($key % 3 == 0) @endif @endforeach @else @endif
Tyre nos ( Status ) Tyre nos ( Status ) Tyre nos ( Status )
{!! Form::text('other_tyre_nos[]',$ttr->tyre_nos,['style'=>'width:90px;']) !!}{!! Form::select('other_tyre_status[]',['good'=>'Good','damage'=>'Damage'],$ttr->status, ["placeholder"=>"Select Status"]) !!}
@endif
@endsection