@extends('layouts.master') @section('title') {{ translate('edit other_income') }} @endsection @section('content')
{{ translate('edit other_income') }}
{!! Form::open(array('url' => url('other_income/'.$other_income->id.'/update'), 'method' => 'post','class'=>'', 'name' => 'form',"enctype"=>"multipart/form-data")) !!}
{!! Form::label('other_income_type_id',translate('income').' '.translate('type'),array('class'=>' control-label')) !!} {!! Form::select('other_income_type_id',$types,$other_income->other_income_type_id, array('class' => 'form-control','required'=>'required')) !!}
{!! Form::label('amount',translate('income').' '.translate('amount'),array('class'=>'')) !!} {!! Form::text('amount',$other_income->amount, array('class' => 'form-control touchspin', 'placeholder'=>"",'required'=>'required')) !!}
{!! Form::label('account_id',translate('account to'),array('class'=>' control-label')) !!} {!! Form::select('account_id',$chart_assets,$other_income->account_id, array('class' => 'form-control select2','placeholder'=>"",'required'=>'required')) !!}
{!! Form::label('date',translate('date'),array('class'=>'')) !!} {!! Form::text('date',$other_income->date, array('class' => 'form-control date-picker', 'placeholder'=>"",'required'=>'required')) !!}
{!! Form::label('notes',translate('description'),array('class'=>'')) !!} {!! Form::textarea('notes',$other_income->notes, array('class' => 'form-control','rows'=>'3')) !!}

{{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',$other_income->id)->where('category','other_income')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$other_income->id)->where('category','other_income')->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',$other_income->id)->where('category','other_income')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$other_income->id)->where('category','other_income')->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',$other_income->id)->where('category','other_income')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$other_income->id)->where('category','other_income')->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',$other_income->id)->where('category','other_income')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$other_income->id)->where('category','other_income')->first()->name}} @endif"> @endif
@endforeach
{!! Form::close() !!}
@endsection @section('footer-scripts') @endsection