@extends('layouts.template') @section('content')
{!! Form::model($workshop_breakdown, [ 'method' => 'PATCH', 'url' => ['/store/workshop-breakdown', $workshop_breakdown->id], 'class' => 'form-horizontal', 'id' => 'breakdownform', 'files' => true ]) !!}

Workshop Breakdown

@if(Session::has('flash_message'))

{{ Session::get('flash_message') }}

@endif

Workshop Breakdown

{!! Form::label('date', 'Date') !!} * {!! Form::text('date', null, ['id'=>'datepicker','class' => 'form-control calander-icon']) !!} {!! $errors->first('date', '

:message

') !!}
{!! Form::label('job_number', 'Job Number') !!} * {!! Form::text('job_number', null, ['class' => 'form-control']) !!} {!! $errors->first('job_number', '

:message

') !!}
@if(!empty($workshop_breakdown->trip_number))
{!! Form::label('trip_number', 'Trip Number') !!} * {!! Form::select('trip_number', [''=>'Select Trip Number'] + $page_data['trip_number']->toArray(),null, ['class' => 'form-control']) !!} {!! $errors->first('trip_number', '

:message

') !!}
@else
{!! Form::label('trip_number', 'Registration Number') !!} * {!! Form::select('registration_number', [''=>'Select Registration Number'] + $page_data['registration_number']->toArray(),null, ['class' => 'form-control','id'=>'registration_number']) !!} {!! $errors->first('registration_number', '

:message

') !!}
@endif
* {!! Form::text('current_km',str_replace('.00', '',number_format($workshop_breakdown->current_km, 2, '.', ',')), ['class' => 'form-control','id'=>'current_km']) !!} {!! $errors->first('current_km', '

:message

') !!}
{!! 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', null, ['class' => 'form-control']) !!} {!! $errors->first('mechanic', '

:message

') !!}
{!! Form::label('location', 'Location') !!} * {!! Form::text('location', null, ['class' => 'form-control']) !!} {!! $errors->first('location', '

:message

') !!}
@if(!empty($workshop_breakdown->trip_number))

Truck Maintenance

Job Number Trip Number Driver Truck Status
{!! Form::text('truck_job_number',$workshop_breakdown->job_number, ['id'=>'truck_job_number','class' => 'form-control','readonly'=>true]) !!} {!! $errors->first('truck_job_number', '

:message

') !!}
{!! Form::text('truck_trip_number',$workshop_breakdown->trip_number, ['id'=>'truck_trip_number','class' => 'form-control','readonly'=>true]) !!} {!! $errors->first('truck_trip_number', '

:message

') !!}
{!! Form::text('truck_driver',$truck_maintainance ? $truck_maintainance->driver : '', ['id'=>'truck_driver','class' => 'form-control']) !!} {!! $errors->first('driver', '

:message

') !!}
{!! Form::text('truck',$truck_maintainance ? $truck_maintainance->truck : '', ['id'=>'truck','class' => 'form-control']) !!} {!! $errors->first('truck', '

:message

') !!}
{!! $errors->first('truck_status', '

:message

') !!}
@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 $key => $trp) {!! Form::hidden('truck_trigger[]', $trp->trigger, ['class' => 'form-control trigger']) !!} @endforeach
Check/Change Frequency({{(isset($tunit->equipment->unit)) ? $tunit->equipment->unit : 'Units'}}) Serviced @ Serviced @ Next 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 datepicker1 p1_change_date']) !!}
@if (count($truck_preventative) != 0) {!! Form::textarea('truck_workshop_report',$truck_preventative ? $truck_preventative[0]->workshop_report : '', ['class' => 'form-control inp_textarea']) !!} @else {!! Form::textarea('truck_workshop_report', '', ['class' => 'form-control inp_textarea']) !!} @endif {!! $errors->first('truck_workshop_report', '

:message

') !!}
@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, ['id'=>'trailer_job_number','class' => 'form-control','readonly'=>true]) !!} {!! $errors->first('truck_job_number', '

:message

') !!}
{!! Form::text('trailer_trip_number',$workshop_breakdown->trip_number, ['id'=>'trailer_trip_number','class' => 'form-control','readonly'=>true]) !!} {!! $errors->first('truck_trip_number', '

:message

') !!}
{!! Form::text('trailer_driver',$trailer_maintainance ? $trailer_maintainance->driver : '', ['id'=>'trailer_driver','class' => 'form-control']) !!} {!! $errors->first('driver', '

:message

') !!}
{!! Form::text('trailer',$trailer_maintainance ? $trailer_maintainance->trailer : '', ['id'=>'trailer','class' => 'form-control']) !!} {!! $errors->first('trailer', '

:message

') !!}
{!! $errors->first('trailer_status', '

:message

') !!}
@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
@if(isset($truck_maintainance->status)) @if($truck_maintainance->status != 'job_completed')
@if(count($stock_out) >= 1) @foreach($stock_out as $data) @endforeach @endif
Part ID Part Name Part Make Part Nr Qty
{{!empty($data['part']) ? $data['part'][0]['part_id'] : '-'}} {{$data['part_name']}} {{$data['make']}} {{$data['part_number']}} {{$data['quantity']}}
@endif @else
@if(count($stock_out) >= 1) @foreach($stock_out as $data) @endforeach @endif
Part ID Part Name Part Make Part Nr Qty
{{!empty($data['part']) ? $data['part'][0]['part_id'] : '-'}} {{$data['part_name']}} {{$data['make']}} {{$data['part_number']}} {{$data['quantity']}}
@endif

Preventative Maintenance

@foreach($trailer_preventative as $key => $tlp) {!! Form::hidden('trailer_trigger[]',$tlp->trigger, ['class' => 'form-control trigger']) !!} @endforeach
Check/Change Frequency({{(isset($trunit->equipment->unit)) ? $trunit->equipment->unit : 'Units'}}) Serviced @ Serviced @ Next 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 datepicker1 p2_change_date']) !!}
@if (count($trailer_preventative) != 0) {!! Form::textarea('trailer_workshop_report', $trailer_preventative ? $trailer_preventative[0]->workshop_report : '', ['class' => 'form-control inp_textarea']) !!} @else {!! Form::textarea('trailer_workshop_report', '', ['class' => 'form-control inp_textarea']) !!} @endif {!! $errors->first('trailer_workshop_report', '

:message

') !!}
@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) {!! Form::hidden('other_trigger[]',$trp->trigger, ['class' => 'form-control trigger']) !!} @endforeach @else @endif
Check/Change Frequency({{isset($prevent->equipment->unit) ? $prevent->equipment->unit :'Unit'}}) Serviced @ Serviced @ Next 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 other_change_date']) !!}
{!! 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"]) !!}
@if(count($stock_out) >= 1) @foreach($stock_out as $data) @endforeach @endif
Part ID Part Name Part Make Part Nr Qty
{{!empty($data['part']) ? $data['part'][0]['part_id'] : '-'}} {{$data['part_name']}} {{$data['make']}} {{$data['part_number']}} {{$data['quantity']}}
@endif
{!! Form::close() !!}
@endsection