@extends('layouts.master') @section('title') {{translate('edit asset')}} @endsection @section('content')
{{translate('edit asset')}}
{!! Form::open(array('url' => url('asset/'.$asset->id.'/update'), 'method' => 'post','class'=>'', 'name' => 'form',"enctype"=>"multipart/form-data")) !!}
{!! Form::label('asset_type_id',translate('asset').' '.translate('type'),array('class'=>' control-label')) !!} {!! Form::select('asset_type_id',$types,$asset->asset_type_id, array('class' => 'form-control','required'=>'required')) !!}
{!! Form::label('current_value',translate('current').' '.translate('value'),array('class'=>'')) !!}
@foreach($asset->valuations as $valuation) @endforeach
# {{translate('date of valuation')}} {{translate('value amount')}}
{{$count}}

{{translate('add_asset_msg')}}

{{translate('optional field')}}

{{translate('add_asset_msg2')}}

{!! Form::label('purchase_date',translate('purchase').' '.translate('date'),array('class'=>'')) !!} {!! Form::text('purchase_date',$asset->purchase_date, array('class' => 'form-control date-picker', 'placeholder'=>"",)) !!}
{!! Form::label('purchase_price',translate('purchase').' '.translate('price'),array('class'=>'')) !!} {!! Form::text('purchase_price',$asset->purchase_price, array('class' => 'form-control touchspin', 'placeholder'=>"",)) !!}
{!! Form::label('replacement_value',translate('replacement').' '.translate('value'),array('class'=>'')) !!} {!! Form::text('replacement_value',$asset->replacement_value, array('class' => 'form-control touchspin', 'placeholder'=>"",)) !!}
{!! Form::label('serial_number',translate('serial_number'),array('class'=>'')) !!} {!! Form::textarea('serial_number',$asset->serial_number, array('class' => 'form-control')) !!}
{!! Form::label('notes',translate('description'),array('class'=>'')) !!} {!! Form::textarea('notes',$asset->notes, array('class' => 'form-control')) !!}
{!! Form::label('files',translate('file').'('.translate('borrower_file_types').')',array('class'=>'')) !!} {!! Form::file('files[]', array('class' => 'form-control', 'multiple'=>"",'rows'=>'3')) !!}
@foreach(unserialize($asset->files) as $key=>$value) {!! $value!!}
@endforeach

{{translate('custom_field')}}

@foreach($custom_fields as $key)
{!! Form::label($key->id,$key->name,array('class'=>'')) !!} @if($key->field_type=="number") required==1) required @endif value="@if(!empty(\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$asset->id)->where('category','assets')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$asset->id)->where('category','assets')->first()->name}} @endif"> @endif @if($key->field_type=="textfield") required==1) required @endif value="@if(!empty(\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$asset->id)->where('category','assets')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$asset->id)->where('category','assets')->first()->name}} @endif"> @endif @if($key->field_type=="date") required==1) required @endif value="@if(!empty(\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$asset->id)->where('category','assets')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$asset->id)->where('category','assets')->first()->name}} @endif"> @endif @if($key->field_type=="textarea") @endif @if($key->field_type=="decimal") required==1) required @endif value="@if(!empty(\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$asset->id)->where('category','assets')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$asset->id)->where('category','assets')->first()->name}} @endif"> @endif
@endforeach

Click here to add custom fields on this page

{!! Form::close() !!}
@endsection @section('footer-scripts') @endsection