@extends('layouts.admin') @section('css') @endsection @section('content')
{{ Form::open(['route' => $route, 'method' => 'POST', 'id' => 'ajaxSave']) }}
{!! Form::label('stores[]', __('payroll_setting.stores'), ['class' => 'control-label']) !!} {!! Form::select('stores[]', $stores, explode(',', $data->store_ids), [ 'class' => 'form-control select2', 'multiple' => true, 'data-actions-box' => 'true', 'data-width' => '100%' ]) !!}
{{ Form::label('title', __('payroll_setting.payroll_title'), ['class' => 'control-label']) }} {{ Form::text('title', $data->title, ['class' => 'form-control']) }}
{!! Form::label('wage_type', __('payroll_setting.wage_type'), ['class' => 'control-label']) !!} {!! Form::select('wage_type', wageType(), $data->wage_type, ['class' => 'form-control select2', 'id' => 'wage_type']) !!}
{{ Form::label('hour_salary', __('payroll_setting.hour_salary'), ['class' => 'control-label']) }} {{ Form::text('hour_salary', $data->hour_salary, ['class' => 'form-control']) }}
{{ Form::label('evening_overtime_after', __('payroll_setting.evening_ot'), ['class' => 'control-label']) }} {{ Form::text('evening_overtime_after', $data->evening_overtime_after, ['class' => 'form-control t-picker']) }}
{{--
{{ Form::label('saturday_overtime_after', __('payroll_setting.sat_ot'), ['class' => 'control-label']) }} {{ Form::text('saturday_overtime_after', $data->saturday_overtime_after, ['class' => 'form-control t-picker']) }}
--}}
{{ Form::label('over', __('payroll_setting.over'), ['class' => 'control-label']) }} {{ Form::radio('over_salary_type', '1', ($data->over_salary_type == 1 || !isset($data->over_salary_type)) ? true : false) }} {{ Form::label('s_flat', __('payroll_setting.flat')) }} {{ Form::radio('over_salary_type', '2', $data->over_salary_type == 2 ? true : false) }} {{ Form::label('s_flat', __('payroll_setting.percentage')) }} {{ Form::text('over_hour_salary_per', $data->over_hour_salary_per, ['class' => 'form-control']) }}
{{--
{{ Form::label('sunday_working', __('payroll_setting.sunday_working'), ['class' => 'control-label']) }} {{ Form::radio('sunday_salary_type', '1', ($data->sunday_salary_type == 1 || !isset($data->sunday_salary_type)) ? true : false) }} {{ Form::label('s_flat', __('payroll_setting.flat')) }} {{ Form::radio('sunday_salary_type', '2', $data->sunday_salary_type == 2 ? true : false) }} {{ Form::label('s_flat', __('payroll_setting.percentage')) }} {{ Form::text('sunday_salary_per', $data->sunday_salary_per, ['class' => 'form-control']) }}
--}} {{--
{{ Form::label('red_over_salary', __('payroll_setting.red_over_salary'), ['class' => 'control-label']) }} {{ Form::radio('red_day_salary_type', '1', ($data->red_day_salary_type == 1 || !isset($data->red_day_salary_type)) ? true : false) }} {{ Form::label('s_flat', __('payroll_setting.flat')) }} {{ Form::radio('red_day_salary_type', '2', $data->red_day_salary_type == 2 ? true : false) }} {{ Form::label('s_flat', __('payroll_setting.percentage')) }} {{ Form::text('red_day_salary_per', $data->red_day_salary_per, ['class' => 'form-control']) }}
--}}
{{ Form::label('employee_tax', __('payroll_setting.employee_tax'), ['class' => 'control-label']) }} {{ Form::text('employee_tax', $data->employee_tax, ['class' => 'form-control']) }}
{{ Form::label('holiday_pay', __('payroll_setting.holiday_pay'), ['class' => 'control-label']) }} {{ Form::text('holiday_pay', $data->holiday_pay, ['class' => 'form-control']) }}
{{ Form::label('otp_tax', __('payroll_setting.otp_tax'), ['class' => 'control-label']) }} {{ Form::text('otp_tax', $data->otp_tax, ['class' => 'form-control']) }}
{{ Form::label('red_days', __('payroll_setting.red_days'), ['class' => 'control-label']) }} @if ($data->red_day_dates != '') @php $redDates = json_decode($data->red_day_dates, true); @endphp @foreach ($redDates as $key => $redDt)
{{ Form::text('red_day_dates[]', dateFormat($redDt, SHOW_DATE), ['class' => 'form-control datepicker-input', 'placeholder' => 'Date']) }}
@endforeach @else
{{ Form::text('red_day_dates[]', null, ['class' => 'form-control datepicker-input', 'placeholder' => 'Date']) }}
@endif
{!! Form::label('ot_rules', __('payroll_setting.ot_rules'),['class' => 'pl-2 ml-2 control-label' ,'style' => 'font-weight: 500']) !!}
@php $otRules = []; if($data->ot_rules_json != ''){ $otRules = json_decode($data->ot_rules_json); } @endphp @if(count($otRules) > 0) @foreach($otRules as $key => $otRule)
{{ Form::radio("ot_type[$key]",'1',$otRule->ot_type == 1 ? 1 : 0, ['class' => 'mb-2 __ot_type']) }} {{ Form::label("ot_type[$key]", __('payroll_setting.single')) }} {{ Form::radio("ot_type[$key]",'2',$otRule->ot_type == 2 ? 1 : 0, ['class' => 'mb-2 __ot_type']) }} {{ Form::label("ot_type[$key]", __('payroll_setting.range')) }}
{!! Form::select("ot_start_day[$key]",getWeekDayFullNames(),$otRule->ot_start_day ?? '',['class' => 'form-control']) !!}
{{ Form::text("ot_start_time[$key]",$otRule->ot_start_time ?? '', ['class' => 'form-control t-picker','placeholder' => 'Start Time']) }}
ot_type != 2) style="display: none" @endif> {!! Form::select("ot_end_day[$key]",getWeekDayFullNames(),$otRule->ot_end_day ?? '',['class' => 'form-control ']) !!}
{{ Form::text("ot_end_time[$key]",$otRule->ot_end_time ?? '', ['class' => 'form-control t-picker' ,'placeholder' => 'End Time']) }}
{{ Form::radio("ot_salary_type[$key]",'1',$otRule->ot_salary_type == 1 ? 1:0, ['class' => 'mb-2 ']) }} {{ Form::label("ot_salary_type[$key]", __('payroll_setting.flat') , ['style' => 'padding: 0px 3px;']) }} {{ Form::radio("ot_salary_type[$key]",'2',$otRule->ot_salary_type == 2 ? 1:0, ['class' => 'mb-2 ']) }} {{ Form::label("ot_salary_type[$key]", __('payroll_setting.percentage'), ['style' => 'padding: 0px 3px;']) }}
{{ Form::text("ot_salary[$key]",$otRule->ot_salary ?? '', ['class' => 'form-control']) }}
@endforeach @endif
  • {{ Form::submit(__('common.save'), ['class' => 'btn btn-primary width80']) }}
{{ Form::close() }}
{{ Form::label('', '', ['class' => 'control-label']) }}
{{ Form::text('red_day_dates[]', '', ['class' => 'form-control dp', 'placeholder' => 'Date']) }}
{{ Form::radio("ot_type[index]", '1',1, ['class' => 'mb-2 __ot_type']) }} {{ Form::label('ot_type[index]', __('payroll_setting.single')) }} {{ Form::radio("ot_type[index]", '2',0, ['class' => 'mb-2 __ot_type']) }} {{ Form::label('ot_type[index]', __('payroll_setting.range')) }}
{!! Form::select('ot_start_day[index]',getWeekDayFullNames(),'',['class' => 'form-control']) !!}
{{ Form::text("ot_start_time[index]", '', ['class' => 'form-control t-picker','placeholder' => 'Start Time']) }}
{{ Form::text("ot_end_time[index]", '', ['class' => 'form-control t-picker' ,'placeholder' => 'End Time']) }}
{{ Form::radio("ot_salary_type[index]", '1',1, ['class' => 'mb-2 ']) }} {{ Form::label('ot_salary_type[index]', __('payroll_setting.flat') , ['style' => 'padding: 0px 3px;']) }} {{ Form::radio("ot_salary_type[index]", '2',0, ['class' => 'mb-2 ']) }} {{ Form::label('ot_salary_type[index]', __('payroll_setting.percentage'), ['style' => 'padding: 0px 3px;']) }}
{{ Form::text("ot_salary[index]", '', ['class' => 'form-control']) }}
@endsection @section('script') @endsection