{!! Form::hidden('currency_id', isset($user_salary) ? $user_salary->currency_id : 1) !!} {{--
{!! Form::label('currency_id',trans('messages.currency'),[]) !!} {!! Form::select('currency_id', $currencies, isset($user_salary) ? $user_salary->currency_id : 1,['class'=>'form-control input-xlarge show-tick','title' => trans('messages.select_one')]) !!}
--}}
{!! Form::label('payroll_type',trans('messages.payroll').' '.trans('messages.type'),[]) !!} {!! Form::select('payroll_type', ['eight_base'=>'8 Hrs Calculation','seven_base'=>'7.33 Hrs Calculation'], isset($user_salary) ? $user_salary->payroll_type : 'eight_base',['class'=>'form-control input-xlarge show-tick','title' => trans('messages.select_one')]) !!}
{!! Form::label('type',trans('messages.salary').' '.trans('messages.type'),['class' => ' control-label']) !!} @if (isset($user_salary)) {!! Form::select('type', [ 'monthly' => trans('messages.monthly').' '.trans('messages.salary').' ('.trans('messages.attendance').')', 'fixed' => trans('messages.monthly').' '.trans('messages.salary').' ('.trans('messages.fixed').')', // 'hourly' => trans('messages.hourly').' '.trans('messages.salary'), ],isset($user_salary) ? $user_salary->type : '',['class'=>'form-control show-tick','placeholder'=>trans('messages.select_one'),'disabled'=>true]) !!} @else {!! Form::select('type', [ 'monthly' => trans('messages.monthly').' '.trans('messages.salary').' ('.trans('messages.attendance').')', 'fixed' => trans('messages.monthly').' '.trans('messages.salary').' ('.trans('messages.fixed').')', // 'hourly' => trans('messages.hourly').' '.trans('messages.salary'), ],isset($user_salary) ? $user_salary->type : '',['class'=>'form-control show-tick','placeholder'=>trans('messages.select_one'),'id'=>'salary_type','onchange'=>'showSalaryHead()']) !!} @endif
{{trans('messages.to')}}
{!! Form::label('description',trans('messages.description'),[])!!} {!! Form::textarea('description',isset($user_salary) ? $user_salary->description : '',['size'=>'30x3', 'class'=>'form-control', 'placeholder'=>trans('messages.description'), "data-show-counter"=>1, "data-limit"=>config('config.textarea_limit'), 'data-autoresize'=>1])!!}
{{--
{{ getCustomFields('user-salary-form',isset($custom_user_salary_field_values) ? $custom_user_salary_field_values : []) }}
--}} @if (isset($user_salary)) @if ($user_salary->type == "monthly")

@foreach($earning_salary_heads as $earning_salary_head) @if ($earning_salary_head->category == "monthly" || $earning_salary_head->category == null)
{!! Form::label('salary_head['.$earning_salary_head->id.']',$earning_salary_head->name,[])!!} {!! Form::input('number','salary_head['.$earning_salary_head->id.']',(isset($user_salary) && array_key_exists($earning_salary_head->id,$salary)) ? $salary[$earning_salary_head->id] : '0', ['class'=>'form-control','placeholder'=> trans('messages.amount'),'min'=>'0','step'=>0.01,'id'=>'salary_'.$earning_salary_head->id]) !!}
@endif @endforeach
@foreach($deduction_salary_heads as $deduction_salary_head) @if ($deduction_salary_head->category == "monthly" || $deduction_salary_head->category == null)
{!! Form::label('salary_head['.$deduction_salary_head->id.']',$deduction_salary_head->name,[]) !!} {!! Form::input('number','salary_head['.$deduction_salary_head->id.']', (isset($user_salary) && array_key_exists($deduction_salary_head->id,$salary)) ? $salary[$deduction_salary_head->id] : '0', ['class'=>'form-control','placeholder'=> trans('messages.amount'),'min'=>'0','step'=>0.01]) !!}
@endif @endforeach
@elseif ($user_salary->type == "fixed")

@foreach($earning_salary_heads as $earning_salary_head) @if ($earning_salary_head->category == "fixed" || $earning_salary_head->category == null)
{!! Form::label('salary_head['.$earning_salary_head->id.']',$earning_salary_head->name,[]) !!} {!! Form::input('number','salary_head['.$earning_salary_head->id.']',(isset($user_salary) && array_key_exists($earning_salary_head->id,$salary)) ? $salary[$earning_salary_head->id] : '0', ['class'=>'form-control','placeholder'=> trans('messages.amount'),'min'=>'0','step'=>0.01,'id'=>'salary_'.$earning_salary_head->id]) !!}
@endif @endforeach
@foreach($deduction_salary_heads as $deduction_salary_head) @if ($deduction_salary_head->category == "fixed" || $deduction_salary_head->category == null)
{!! Form::label('salary_head['.$deduction_salary_head->id.']',$deduction_salary_head->name,[]) !!} {!! Form::input('number','salary_head['.$deduction_salary_head->id.']', (isset($user_salary) && array_key_exists($deduction_salary_head->id,$salary)) ? $salary[$deduction_salary_head->id] : '0', ['class'=>'form-control','placeholder'=> trans('messages.amount'),'min'=>'0','step'=>0.01]) !!}
@endif @endforeach
@endif {{-- @elseif ($user_salary->type == "hourly")

{!! Form::label('hourly_rate',trans('messages.hourly_rate'),[]) !!} {!! Form::input('number','hourly_rate',isset($user_salary) ? currency($user_salary->hourly_rate) : '0', ['class'=>'form-control','placeholder'=>trans('messages.hourly_rate'),'min'=>'0','step'=>0.01]) !!}

--}} @else

@foreach($earning_salary_heads as $earning_salary_head) @if ($earning_salary_head->category == "monthly" || $earning_salary_head->category == null)
{!! Form::label('salary_head['.$earning_salary_head->id.']',$earning_salary_head->name,[])!!} {!! Form::input('number','salary_head['.$earning_salary_head->id.']',(isset($user_salary) && array_key_exists($earning_salary_head->id,$salary)) ? $salary[$earning_salary_head->id] : '0',['min'=>'0','class'=>'form-control','placeholder'=> trans('messages.amount'),'step'=>0.01,'onchange'=>'computeSalary(this)','id'=>'salary_'.$earning_salary_head->id])!!}
@endif @endforeach
@foreach($deduction_salary_heads as $deduction_salary_head) @if ($deduction_salary_head->category == "monthly" || $deduction_salary_head->category == null)
{!! Form::label('salary_head['.$deduction_salary_head->id.']',$deduction_salary_head->name,[])!!} {!! Form::input('number','salary_head['.$deduction_salary_head->id.']', (isset($user_salary) && array_key_exists($deduction_salary_head->id,$salary)) ? $salary[$deduction_salary_head->id] : '0',['min'=>'0','class'=>'form-control','placeholder'=> trans('messages.amount'),'step'=>0.01])!!}
@endif @endforeach

@foreach($earning_salary_heads as $earning_salary_head) @if ($earning_salary_head->category == "fixed" || $earning_salary_head->category == null)
{!! Form::label('salary_head['.$earning_salary_head->id.']',$earning_salary_head->name,[]) !!} {!! Form::input('number','salary_head['.$earning_salary_head->id.']',(isset($user_salary) && array_key_exists($earning_salary_head->id,$salary)) ? $salary[$earning_salary_head->id] : '0', ['class'=>'form-control','placeholder'=> trans('messages.amount'),'min'=>'0','step'=>0.01,'id'=>'salary_'.$earning_salary_head->id]) !!}
@endif @endforeach
@foreach($deduction_salary_heads as $deduction_salary_head) @if ($deduction_salary_head->category == "fixed" || $deduction_salary_head->category == null)
{!! Form::label('salary_head['.$deduction_salary_head->id.']',$deduction_salary_head->name,[]) !!} {!! Form::input('number','salary_head['.$deduction_salary_head->id.']', (isset($user_salary) && array_key_exists($deduction_salary_head->id,$salary)) ? $salary[$deduction_salary_head->id] : '0', ['class'=>'form-control','placeholder'=> trans('messages.amount'),'min'=>'0','step'=>0.01,'id'=>'salary_'.$deduction_salary_head->id]) !!}
@endif @endforeach
{{--

{!! Form::label('hourly_rate',trans('messages.hourly_rate'),[]) !!} {!! Form::input('number','hourly_rate',isset($user_salary) ? currency($user_salary->hourly_rate) : '0', ['class'=>'form-control','placeholder'=>trans('messages.hourly_rate'),'min'=>'0','step'=>0.01]) !!}

--}} @endif {!! Form::submit(isset($buttonText) ? $buttonText : trans('messages.save'),['class' => 'btn btn-primary pull-right']) !!}