@lang('base/employee_payroll.document_title')

@include('flash::message') @if (!$errors->isEmpty()) @endif

@lang('general.text_add')

{!! Form::open(['route' => 'employee-payrolls.store','method' => 'POST','class' => '','role' => 'form','id'=>'form']) !!} {!! Form::hidden('amount_total_tmp', old('amount_total_tmp',0)) !!}
@if($tax_regimens->isNotEmpty())
{!! html_entity_decode(Form::label('tax_regimen_id', __('base/employee_payroll.entry_tax_regimen_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('tax_regimen_id', $tax_regimens,old('tax_regimen_id',($duplicate_ep->employee_id ?? \App\Helpers\Helper::defaultCompany()->tax_regimen_id)), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('tax_regimen_id')) {{ $errors->first('tax_regimen_id') }} @endif
@endif
@php $tmp_employees = []; if(!empty(old('employee_id', ($duplicate_ep->employee_id ?? '')))){ $tmp_employees = \App\Models\Base\Employee::where('id','=',old('employee_id', ($duplicate_ep->employee_id ?? '')))->get()->pluck('text_select2','id'); } @endphp {!! html_entity_decode(Form::label('employee_id', __('base/employee_payroll.entry_employee_id') . ' *', ['class' => 'control-label'])) !!}
{!! Form::select('employee_id', $tmp_employees, old('employee_id', ($duplicate_ep->employee_id ?? '')), ['class' => 'form-control', 'placeholder' => __('general.text_select'),'required','autofocus']) !!}
@if ($errors->has('employee_id')) {{ $errors->first('employee_id') }} @endif
{!! html_entity_decode(Form::label('tax_regimen_employee_id', __('base/employee_payroll.entry_tax_regimen_employee_id') . '', ['class' => 'control-label'])) !!} {!! Form::select('tax_regimen_employee_id', $tax_regimen_employees,old('tax_regimen_employee_id', ($duplicate_ep->tax_regimen_employee_id ?? '')), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('tax_regimen_employee_id')) {{ $errors->first('tax_regimen_employee_id') }} @endif
{!! html_entity_decode(Form::label('payroll_type_id', __('base/employee_payroll.entry_payroll_type_id') . ' *', ['class' => 'control-label'])) !!} {!! Form::select('payroll_type_id', $payroll_types,old('payroll_type_id', ($duplicate_ep->payroll_type_id ?? '')), ['class' => 'form-control', 'placeholder' => __('general.text_select'),'required']) !!} @if ($errors->has('payroll_type_id')) {{ $errors->first('payroll_type_id') }} @endif
{!! html_entity_decode(Form::label('branch_office_id', __('base/employee_payroll.entry_branch_office_id') . ' *', ['class' => 'control-label'])) !!} {!! Form::select('branch_office_id', $branch_offices,old('branch_office_id',($duplicate_ep->branch_office_id ?? \App\Models\Base\BranchOffice::where('company_id','=',\App\Helpers\Helper::defaultCompany()->id)->get()->first()->id)), ['class' => 'form-control', 'placeholder' => __('general.text_select'),'required']) !!} @if ($errors->has('branch_office_id')) {{ $errors->first('branch_office_id') }} @endif
{!! html_entity_decode(Form::label('date_payment', __('base/employee_payroll.entry_date_payment') . ' *', ['class' => 'control-label'])) !!}
{!! Form::text('date_payment', old('date_payment',\App\Helpers\Helper::date(Date::now())), ['class' => 'form-control', 'placeholder' => __('base/employee_payroll.entry_date_payment'),'required','autocomplete'=>'off']) !!}
@if ($errors->has('date_payment')) {{ $errors->first('date_payment') }} @endif
{!! html_entity_decode(Form::label('date_start_payment', __('base/employee_payroll.entry_date_start_payment') . ' *', ['class' => 'control-label'])) !!}
{!! Form::text('date_start_payment', old('date_start_payment'), ['class' => 'form-control', 'placeholder' => __('base/employee_payroll.entry_date_start_payment'),'required','autocomplete'=>'off']) !!}
@if ($errors->has('date_start_payment')) {{ $errors->first('date_start_payment') }} @endif
{!! html_entity_decode(Form::label('date_end_payment', __('base/employee_payroll.entry_date_end_payment') . ' *', ['class' => 'control-label'])) !!}
{!! Form::text('date_end_payment', old('date_end_payment'), ['class' => 'form-control', 'placeholder' => __('base/employee_payroll.entry_date_end_payment'),'required','autocomplete'=>'off']) !!}
@if ($errors->has('date_end_payment')) {{ $errors->first('date_end_payment') }} @endif
{!! html_entity_decode(Form::label('payment_days', __('base/employee_payroll.entry_payment_days') . ' *', ['class' => 'control-label'])) !!} {!! Form::number('payment_days', old('payment_days'), ['class' => 'form-control text-center', 'placeholder' => __('base/employee_payroll.entry_payment_days'),'required']) !!} @if ($errors->has('payment_days')) {{ $errors->first('payment_days') }} @endif
{!! html_entity_decode(Form::label('taxid_origin', __('base/employee_payroll.entry_taxid_origin') . '', ['class' => 'control-label'])) !!} {!! Form::text('taxid_origin', old('taxid_origin', ($duplicate_ep->taxid_origin ?? '')), ['class' => 'form-control', 'placeholder' => __('base/employee_payroll.entry_taxid_origin')]) !!}
{!! html_entity_decode(Form::label('reference', __('base/employee_payroll.entry_reference') . '', ['class' => 'control-label'])) !!} {!! Form::text('reference', old('reference',($duplicate_ep->reference ?? __('base/employee_payroll.text_reference'))), ['class' => 'form-control', 'placeholder' => __('base/employee_payroll.entry_reference')]) !!}

@lang('base/employee_payroll.entry_amount_untaxed'):     @lang('base/employee_payroll.entry_amount_discount'):     @lang('base/employee_payroll.entry_amount_isr'):     @lang('base/employee_payroll.entry_amount_total'):

@if ($errors->has('item')) {{ $errors->first('item') }} @endif
@php $item_perception_row = 1; $items_perception = old('item_perception',($duplicate_ep->employeeActivePerceptionsPayrollLines ?? [])); @endphp @foreach ($items_perception as $item_perception_row => $item) @php $item = !empty(old('item_perception.' . $item_perception_row . '')) ? (object) old('item_perception.' . $item_perception_row) : $item; $tmp_perceptions = []; $perception_code = ''; if(!empty(old('item_perception.' . $item_perception_row . '.perception_id',$item->perception_id))){ $tmp_perceptions = \App\Models\Catalogs\Perception::where('id','=',old('item_perception.' . $item_perception_row . '.perception_id',$item->perception_id))->get(); $perception_code = !empty($tmp_perceptions->first()) ? $tmp_perceptions->first()->code : ''; $tmp_perceptions = $tmp_perceptions->pluck('description_select2','id'); } $tmp_overtimes_type_1 = \App\Models\Catalogs\OvertimesType::where('code', '=', '01')->first(); $tmp_overtimes_type_2 = \App\Models\Catalogs\OvertimesType::where('code', '=', '02')->first(); $tmp_overtimes_type_3 = \App\Models\Catalogs\OvertimesType::where('code', '=', '03')->first(); @endphp @endforeach @php $item_perception_row++; @endphp
@lang('general.column_actions') @lang('base/employee_payroll.column_line_perception_id') @lang('base/employee_payroll.column_line_code') @lang('base/employee_payroll.column_line_amount_taxed') @lang('base/employee_payroll.column_line_amount_exempt')
{!! Form::select('item_perception[' . $item_perception_row . '][perception_id]', $tmp_perceptions,old('item_perception.' . $item_perception_row . '.perception_id',$item->perception_id), ['class' => 'form-control input-sm col-perception-id', 'placeholder' => __('general.text_select'),'required','id' => 'item_perception_perception_id_' . $item_perception_row]) !!}
@if ($errors->has('item_perception.'.$item_perception_row.'.perception_id')) {{ $errors->first('item_perception.'.$item_perception_row.'.perception_id') }} @endif
{!! Form::number('item_perception[' . $item_perception_row . '][ac_market_value]', old('item_perception.' . $item_perception_row . '.ac_market_value',round($item->ac_market_value,2)), ['class' => 'form-control input-sm text-right col-ac-market-value','id' => 'item_perception_ac_market_value_' . $item_perception_row, 'placeholder' => __('base/employee_payroll.column_line_ac_market_value'), 'step' => 'any']) !!} @if ($errors->has('item_perception.'.$item_perception_row.'.ac_market_value')) {{ $errors->first('item_perception.'.$item_perception_row.'.ac_market_value') }} @endif
{!! Form::number('item_perception[' . $item_perception_row . '][ac_price_when_granted]', old('item_perception.' . $item_perception_row . '.ac_price_when_granted',round($item->ac_price_when_granted,2)), ['class' => 'form-control input-sm text-right col-ac-price-when-granted','id' => 'item_perception_ac_price_when_granted_' . $item_perception_row, 'placeholder' => __('base/employee_payroll.column_line_ac_price_when_granted'), 'step' => 'any']) !!} @if ($errors->has('item_perception.'.$item_perception_row.'.ac_price_when_granted')) {{ $errors->first('item_perception.'.$item_perception_row.'.ac_price_when_granted') }} @endif
{!! Form::number('item_perception[' . $item_perception_row . '][hr_days_1]', old('item_perception.' . $item_perception_row . '.hr_days_1',round($item->hr_days_1,2)), ['class' => 'form-control input-sm text-center col-hr-days-1','id' => 'item_perception_hr_days_1_' . $item_perception_row, 'placeholder' => __('base/employee_payroll.column_line_hr_days')]) !!} @if ($errors->has('item_perception.'.$item_perception_row.'.hr_days_1')) {{ $errors->first('item_perception.'.$item_perception_row.'.hr_days_1') }} @endif
{!! Form::hidden('item_perception[' . $item_perception_row . '][hr_overtimes_type_id_1]', $tmp_overtimes_type_1->id, ['class' => 'form-control input-sm text-center col-hr-overtimes-type-id-1','id' => 'item_perception_hr_overtimes_type_id_1_' . $item_perception_row, 'placeholder' => __('base/employee_payroll.column_line_hr_overtimes_type_id')]) !!} @if ($errors->has('item_perception.'.$item_perception_row.'.hr_overtimes_type_id_1')) {{ $errors->first('item_perception.'.$item_perception_row.'.hr_overtimes_type_id_1') }} @endif
{!! Form::text('item_perception[' . $item_perception_row . '][hr_overtimes_type_1]', $tmp_overtimes_type_1->code . '-' . $tmp_overtimes_type_1->name, ['class' => 'form-control input-sm text-center col-hr-overtimes-type-1','id' => 'item_perception_hr_overtimes_type_1_' . $item_perception_row, 'placeholder' => __('base/employee_payroll.column_line_hr_overtimes_type_id'), 'readonly' => 'readonly']) !!} @if ($errors->has('item_perception.'.$item_perception_row.'.hr_overtimes_type_1')) {{ $errors->first('item_perception.'.$item_perception_row.'.hr_overtimes_type_1') }} @endif
{!! Form::number('item_perception[' . $item_perception_row . '][hr_hours_1]', old('item_perception.' . $item_perception_row . '.hr_hours_1',round($item->hr_hours_1,2)), ['class' => 'form-control input-sm text-center col-hr-hours-1','id' => 'item_perception_hr_hours_1_' . $item_perception_row, 'placeholder' => __('base/employee_payroll.column_line_hr_hours')]) !!} @if ($errors->has('item_perception.'.$item_perception_row.'.hr_hours_1')) {{ $errors->first('item_perception.'.$item_perception_row.'.hr_hours_1') }} @endif
{!! Form::number('item_perception[' . $item_perception_row . '][hr_amount_paid_1]', old('item_perception.' . $item_perception_row . '.hr_amount_paid_1',round($item->hr_amount_paid_1,2)), ['class' => 'form-control input-sm text-right col-hr-amount-paid-1','id' => 'item_perception_hr_amount_paid_1_' . $item_perception_row, 'placeholder' => __('base/employee_payroll.column_line_hr_amount_paid'), 'step' => 'any']) !!} @if ($errors->has('item_perception.'.$item_perception_row.'.hr_amount_paid_1')) {{ $errors->first('item_perception.'.$item_perception_row.'.hr_amount_paid_1') }} @endif
{!! Form::number('item_perception[' . $item_perception_row . '][hr_days_2]', old('item_perception.' . $item_perception_row . '.hr_days_2',round($item->hr_days_2,2)), ['class' => 'form-control input-sm text-center col-hr-days-2','id' => 'item_perception_hr_days_2_' . $item_perception_row, 'placeholder' => __('base/employee_payroll.column_line_hr_days')]) !!} @if ($errors->has('item_perception.'.$item_perception_row.'.hr_days_2')) {{ $errors->first('item_perception.'.$item_perception_row.'.hr_days_2') }} @endif
{!! Form::hidden('item_perception[' . $item_perception_row . '][hr_overtimes_type_id_2]', $tmp_overtimes_type_2->id, ['class' => 'form-control input-sm text-center col-hr-overtimes-type-id-2','id' => 'item_perception_hr_overtimes_type_id_2_' . $item_perception_row, 'placeholder' => __('base/employee_payroll.column_line_hr_overtimes_type_id')]) !!} @if ($errors->has('item_perception.'.$item_perception_row.'.hr_overtimes_type_id_2')) {{ $errors->first('item_perception.'.$item_perception_row.'.hr_overtimes_type_id_2') }} @endif
{!! Form::text('item_perception[' . $item_perception_row . '][hr_overtimes_type_2]', $tmp_overtimes_type_2->code . '-' . $tmp_overtimes_type_2->name, ['class' => 'form-control input-sm text-center col-hr-overtimes-type-2','id' => 'item_perception_hr_overtimes_type_2_' . $item_perception_row, 'placeholder' => __('base/employee_payroll.column_line_hr_overtimes_type_id'), 'readonly' => 'readonly']) !!} @if ($errors->has('item_perception.'.$item_perception_row.'.hr_overtimes_type_2')) {{ $errors->first('item_perception.'.$item_perception_row.'.hr_overtimes_type_2') }} @endif
{!! Form::number('item_perception[' . $item_perception_row . '][hr_hours_2]', old('item_perception.' . $item_perception_row . '.hr_hours_2',round($item->hr_hours_2,2)), ['class' => 'form-control input-sm text-center col-hr-hours-2','id' => 'item_perception_hr_hours_2_' . $item_perception_row, 'placeholder' => __('base/employee_payroll.column_line_hr_hours')]) !!} @if ($errors->has('item_perception.'.$item_perception_row.'.hr_hours_2')) {{ $errors->first('item_perception.'.$item_perception_row.'.hr_hours_2') }} @endif
{!! Form::number('item_perception[' . $item_perception_row . '][hr_amount_paid_2]', old('item_perception.' . $item_perception_row . '.hr_amount_paid_2',round($item->hr_amount_paid_2,2)), ['class' => 'form-control input-sm text-right col-hr-amount-paid-2','id' => 'item_perception_hr_amount_paid_2_' . $item_perception_row, 'placeholder' => __('base/employee_payroll.column_line_hr_amount_paid'), 'step' => 'any']) !!} @if ($errors->has('item_perception.'.$item_perception_row.'.hr_amount_paid_2')) {{ $errors->first('item_perception.'.$item_perception_row.'.hr_amount_paid_2') }} @endif
{!! Form::number('item_perception[' . $item_perception_row . '][hr_days_3]', old('item_perception.' . $item_perception_row . '.hr_days_3',round($item->hr_days_3,2)), ['class' => 'form-control input-sm text-center col-hr-days-3','id' => 'item_perception_hr_days_3_' . $item_perception_row, 'placeholder' => __('base/employee_payroll.column_line_hr_days')]) !!} @if ($errors->has('item_perception.'.$item_perception_row.'.hr_days_3')) {{ $errors->first('item_perception.'.$item_perception_row.'.hr_days_3') }} @endif
{!! Form::hidden('item_perception[' . $item_perception_row . '][hr_overtimes_type_id_3]', $tmp_overtimes_type_3->id, ['class' => 'form-control input-sm text-center col-hr-overtimes-type-id-3','id' => 'item_perception_hr_overtimes_type_id_3_' . $item_perception_row, 'placeholder' => __('base/employee_payroll.column_line_hr_overtimes_type_id')]) !!} @if ($errors->has('item_perception.'.$item_perception_row.'.hr_overtimes_type_id_3')) {{ $errors->first('item_perception.'.$item_perception_row.'.hr_overtimes_type_id_3') }} @endif
{!! Form::text('item_perception[' . $item_perception_row . '][hr_overtimes_type_3]', $tmp_overtimes_type_3->code . '-' . $tmp_overtimes_type_3->name, ['class' => 'form-control input-sm text-center col-hr-overtimes-type-3','id' => 'item_perception_hr_overtimes_type_3_' . $item_perception_row, 'placeholder' => __('base/employee_payroll.column_line_hr_overtimes_type_id'), 'readonly' => 'readonly']) !!} @if ($errors->has('item_perception.'.$item_perception_row.'.hr_overtimes_type_3')) {{ $errors->first('item_perception.'.$item_perception_row.'.hr_overtimes_type_3') }} @endif
{!! Form::number('item_perception[' . $item_perception_row . '][hr_hours_3]', old('item_perception.' . $item_perception_row . '.hr_hours_3',round($item->hr_hours_3,2)), ['class' => 'form-control input-sm text-center col-hr-hours-3','id' => 'item_perception_hr_hours_3_' . $item_perception_row, 'placeholder' => __('base/employee_payroll.column_line_hr_hours')]) !!} @if ($errors->has('item_perception.'.$item_perception_row.'.hr_hours_3')) {{ $errors->first('item_perception.'.$item_perception_row.'.hr_hours_3') }} @endif
{!! Form::number('item_perception[' . $item_perception_row . '][hr_amount_paid_3]', old('item_perception.' . $item_perception_row . '.hr_amount_paid_3',round($item->hr_amount_paid_3,2)), ['class' => 'form-control input-sm text-right col-hr-amount-paid-3','id' => 'item_perception_hr_amount_paid_3_' . $item_perception_row, 'placeholder' => __('base/employee_payroll.column_line_hr_amount_paid'), 'step' => 'any']) !!} @if ($errors->has('item_perception.'.$item_perception_row.'.hr_amount_paid_3')) {{ $errors->first('item_perception.'.$item_perception_row.'.hr_amount_paid_3') }} @endif
{!! Form::text('item_perception[' . $item_perception_row . '][code]', old('item_perception.' . $item_perception_row . '.code',$item->code), ['class' => 'form-control input-sm text-center col-code','id' => 'item_perception_code_' . $item_perception_row, 'placeholder' => __('base/employee_payroll.column_line_code')]) !!} @if ($errors->has('item_perception.'.$item_perception_row.'.code')) {{ $errors->first('item_perception.'.$item_perception_row.'.code') }} @endif
{!! Form::number('item_perception[' . $item_perception_row . '][amount_taxed]', old('item_perception.' . $item_perception_row . '.amount_taxed',round($item->amount_taxed,2)), ['class' => 'form-control input-sm text-right col-amount-taxed','id' => 'item_perception_amount_taxed_' . $item_perception_row, 'step' => 'any']) !!} @if ($errors->has('item_perception.'.$item_perception_row.'.amount_taxed')) {{ $errors->first('item_perception.'.$item_perception_row.'.amount_taxed') }} @endif
{!! Form::number('item_perception[' . $item_perception_row . '][amount_exempt]', old('item_perception.' . $item_perception_row . '.amount_exempt',round($item->amount_exempt,2)), ['class' => 'form-control input-sm text-right col-amount-exempt','id' => 'item_perception_amount_exempt_' . $item_perception_row, 'step' => 'any']) !!} @if ($errors->has('item_perception.'.$item_perception_row.'.amount_exempt')) {{ $errors->first('item_perception.'.$item_perception_row.'.amount_exempt') }} @endif
@php $item_deduction_row = 1; $items_deduction = old('item_deduction',($duplicate_ep->employeeActiveDeductionsPayrollLines ?? [])); @endphp @foreach ($items_deduction as $item_deduction_row => $item) @php $item = !empty(old('item_deduction.' . $item_deduction_row . '')) ? (object) old('item_deduction.' . $item_deduction_row) : $item; $tmp_deductions = []; if(!empty(old('item_deduction.' . $item_deduction_row . '.deduction_id',$item->deduction_id))){ $tmp_deductions = \App\Models\Catalogs\Deduction::where('id','=',old('item_deduction.' . $item_deduction_row . '.deduction_id',$item->deduction_id))->get()->pluck('description_select2','id'); } @endphp @endforeach @php $item_deduction_row++; @endphp
@lang('general.column_actions') @lang('base/employee_payroll.column_line_deduction_id') @lang('base/employee_payroll.column_line_code') @lang('base/employee_payroll.column_line_amount_total')
{!! Form::select('item_deduction[' . $item_deduction_row . '][deduction_id]', $tmp_deductions,old('item_deduction.' . $item_deduction_row . '.deduction_id',$item->deduction_id), ['class' => 'form-control input-sm col-deduction-id', 'placeholder' => __('general.text_select'),'required','id' => 'item_deduction_deduction_id_' . $item_deduction_row]) !!}
@if ($errors->has('item_deduction.'.$item_deduction_row.'.deduction_id')) {{ $errors->first('item_deduction.'.$item_deduction_row.'.deduction_id') }} @endif
{!! Form::text('item_deduction[' . $item_deduction_row . '][code]', old('item_deduction.' . $item_deduction_row . '.code',$item->code), ['class' => 'form-control input-sm text-center col-code','id' => 'item_deduction_code_' . $item_deduction_row, 'placeholder' => __('base/employee_payroll.column_line_code')]) !!} @if ($errors->has('item_deduction.'.$item_deduction_row.'.code')) {{ $errors->first('item_deduction.'.$item_deduction_row.'.code') }} @endif
{!! Form::number('item_deduction[' . $item_deduction_row . '][amount_total]', old('item_deduction.' . $item_deduction_row . '.amount_total', round($item->amount_total,2)), ['class' => 'form-control input-sm text-right col-amount-total','id' => 'item_deduction_amount_total_' . $item_deduction_row, 'step' => 'any']) !!} @if ($errors->has('item_deduction.'.$item_deduction_row.'.amount_total')) {{ $errors->first('item_deduction.'.$item_deduction_row.'.amount_total') }} @endif
@php $item_other_payment_type_row = 1; $items_other_payment_type = old('item_other_payment_type',($duplicate_ep->employeeActiveOtherPaymentTypesPayrollLines ?? [])); @endphp @foreach ($items_other_payment_type as $item_other_payment_type_row => $item) @php $item = !empty(old('item_other_payment_type.' . $item_other_payment_type_row . '')) ? (object) old('item_other_payment_type.' . $item_other_payment_type_row) : $item; $tmp_other_payment_types = []; $other_payment_type_code = ''; if(!empty(old('item_other_payment_type.' . $item_other_payment_type_row . '.other_payment_type_id',$item->other_payment_type_id))){ $tmp_other_payment_types = \App\Models\Catalogs\OtherPaymentType::where('id','=',old('item_other_payment_type.' . $item_other_payment_type_row . '.other_payment_type_id',$item->other_payment_type_id))->get(); $other_payment_type_code = !empty($tmp_other_payment_types->first()) ? $tmp_other_payment_types->first()->code : ''; $tmp_other_payment_types = $tmp_other_payment_types->pluck('description_select2','id'); } @endphp @endforeach @php $item_other_payment_type_row++; @endphp
@lang('general.column_actions') @lang('base/employee_payroll.column_line_other_payment_type_id') @lang('base/employee_payroll.column_line_code') @lang('base/employee_payroll.column_line_amount_total') @lang('base/employee_payroll.column_line_amount_caused')
{!! Form::select('item_other_payment_type[' . $item_other_payment_type_row . '][other_payment_type_id]', $tmp_other_payment_types,old('item_other_payment_type.' . $item_other_payment_type_row . '.other_payment_type_id',$item->other_payment_type_id), ['class' => 'form-control input-sm col-other-payment-type-id', 'placeholder' => __('general.text_select'),'required','id' => 'item_other_payment_type_other_payment_type_id_' . $item_other_payment_type_row]) !!}
@if ($errors->has('item_other_payment_type.'.$item_other_payment_type_row.'.other_payment_type_id')) {{ $errors->first('item_other_payment_type.'.$item_other_payment_type_row.'.other_payment_type_id') }} @endif
{!! Form::number('item_other_payment_type[' . $item_other_payment_type_row . '][cm_positive_balance]', old('item_other_payment_type.' . $item_other_payment_type_row . '.cm_positive_balance',$item->cm_positive_balance ?? ''), ['class' => 'form-control input-sm text-right col-cm-positive-balance','id' => 'item_other_payment_type_cm_positive_balance_' . $item_other_payment_type_row, 'placeholder' => __('base/employee_payroll.column_line_cm_positive_balance'), 'step' => 'any']) !!} @if ($errors->has('item_other_payment_type.'.$item_other_payment_type_row.'.cm_positive_balance')) {{ $errors->first('item_other_payment_type.'.$item_other_payment_type_row.'.cm_positive_balance') }} @endif
{!! Form::number('item_other_payment_type[' . $item_other_payment_type_row . '][cm_year]', old('item_other_payment_type.' . $item_other_payment_type_row . '.cm_year',$item->cm_year ?? ''), ['class' => 'form-control input-sm text-center col-cm-year','id' => 'item_other_payment_type_cm_year_' . $item_other_payment_type_row, 'placeholder' => __('base/employee_payroll.column_line_cm_year')]) !!} @if ($errors->has('item_other_payment_type.'.$item_other_payment_type_row.'.cm_year')) {{ $errors->first('item_other_payment_type.'.$item_other_payment_type_row.'.cm_year') }} @endif
{!! Form::number('item_other_payment_type[' . $item_other_payment_type_row . '][cm_remainder]', old('item_other_payment_type.' . $item_other_payment_type_row . '.cm_remainder',$item->cm_remainder ?? ''), ['class' => 'form-control input-sm text-right col-cm-remainder','id' => 'item_other_payment_type_cm_remainder_' . $item_other_payment_type_row, 'placeholder' => __('base/employee_payroll.column_line_cm_remainder'), 'step' => 'any']) !!} @if ($errors->has('item_other_payment_type.'.$item_other_payment_type_row.'.cm_remainder')) {{ $errors->first('item_other_payment_type.'.$item_other_payment_type_row.'.cm_remainder') }} @endif
{!! Form::text('item_other_payment_type[' . $item_other_payment_type_row . '][code]', old('item_other_payment_type.' . $item_other_payment_type_row . '.code',$item->code), ['class' => 'form-control input-sm text-center col-code','id' => 'item_other_payment_type_code_' . $item_other_payment_type_row, 'placeholder' => __('base/employee_payroll.column_line_code')]) !!} @if ($errors->has('item_other_payment_type.'.$item_other_payment_type_row.'.code')) {{ $errors->first('item_other_payment_type.'.$item_other_payment_type_row.'.code') }} @endif
{!! Form::number('item_other_payment_type[' . $item_other_payment_type_row . '][amount_total]', old('item_other_payment_type.' . $item_other_payment_type_row . '.amount_total',round($item->amount_total,2)), ['class' => 'form-control input-sm text-right col-amount-total','id' => 'item_other_payment_type_amount_total_' . $item_other_payment_type_row, 'step' => 'any']) !!} @if ($errors->has('item_other_payment_type.'.$item_other_payment_type_row.'.amount_total')) {{ $errors->first('item_other_payment_type.'.$item_other_payment_type_row.'.amount_total') }} @endif
{!! Form::number('item_other_payment_type[' . $item_other_payment_type_row . '][amount_caused]', old('item_other_payment_type.' . $item_other_payment_type_row . '.amount_caused',round($item->amount_caused,2)), ['class' => 'form-control input-sm text-right col-amount-caused','id' => 'item_other_payment_type_amount_caused_' . $item_other_payment_type_row, 'step' => 'any']) !!} @if ($errors->has('item_other_payment_type.'.$item_other_payment_type_row.'.amount_caused')) {{ $errors->first('item_other_payment_type.'.$item_other_payment_type_row.'.amount_caused') }} @endif
@php $item_outsourcing_row = 1; $items_outsourcing = old('item_outsourcing',($duplicate_ep->employeeActivePayrollOutsourcings ?? [])); @endphp @foreach ($items_outsourcing as $item_outsourcing_row => $item) @php $item = !empty(old('item_outsourcing.' . $item_outsourcing_row . '')) ? (object) old('item_outsourcing.' . $item_outsourcing_row) : $item; @endphp @endforeach @php $item_outsourcing_row++; @endphp
@lang('general.column_actions') @lang('base/employee_payroll.column_line_taxid') @lang('base/employee_payroll.column_line_percent_time')
{!! Form::text('item_outsourcing[' . $item_outsourcing_row . '][taxid]', old('item_outsourcing.' . $item_outsourcing_row . '.taxid',$item->taxid), ['class' => 'form-control input-sm text-center col-taxid-id','id' => 'item_outsourcing_taxid_' . $item_outsourcing_row, 'placeholder' => __('base/employee_payroll.column_line_taxid')]) !!} @if ($errors->has('item_outsourcing.'.$item_outsourcing_row.'.taxid')) {{ $errors->first('item_outsourcing.'.$item_outsourcing_row.'.taxid') }} @endif
{!! Form::number('item_outsourcing[' . $item_outsourcing_row . '][percent_time]', old('item_outsourcing.' . $item_outsourcing_row . '.percent_time',round($item->percent_time,2)), ['class' => 'form-control input-sm text-right col-percent-time','id' => 'item_outsourcing_percent_time_' . $item_outsourcing_row, 'step' => 'any']) !!} @if ($errors->has('item_outsourcing.'.$item_outsourcing_row.'.percent_time')) {{ $errors->first('item_outsourcing.'.$item_outsourcing_row.'.percent_time') }} @endif
{!! html_entity_decode(Form::label('rt_amount_an_exhibition', __('base/employee_payroll.entry_rt_amount_an_exhibition') . '', ['class' => 'control-label'])) !!} {!! Form::number('rt_amount_an_exhibition', old('rt_amount_an_exhibition', (!empty($duplicate_ep->rt_amount_an_exhibition) ? round($duplicate_ep->rt_amount_an_exhibition,2): '')), ['class' => 'form-control text-right', 'placeholder' => __('base/employee_payroll.entry_rt_amount_an_exhibition'), 'step' => 'any']) !!} @if ($errors->has('rt_amount_an_exhibition')) {{ $errors->first('rt_amount_an_exhibition') }} @endif
{!! html_entity_decode(Form::label('rt_partiality_amount', __('base/employee_payroll.entry_rt_partiality_amount') . '', ['class' => 'control-label'])) !!} {!! Form::number('rt_partiality_amount', old('rt_partiality_amount', (!empty($duplicate_ep->rt_partiality_amount) ? round($duplicate_ep->rt_partiality_amount,2): '')), ['class' => 'form-control text-right', 'placeholder' => __('base/employee_payroll.entry_rt_partiality_amount'), 'step' => 'any']) !!} @if ($errors->has('rt_partiality_amount')) {{ $errors->first('rt_partiality_amount') }} @endif
{!! html_entity_decode(Form::label('rt_daily_amount', __('base/employee_payroll.entry_rt_daily_amount') . '', ['class' => 'control-label'])) !!} {!! Form::number('rt_daily_amount', old('rt_daily_amount', (!empty($duplicate_ep->rt_daily_amount) ? round($duplicate_ep->rt_daily_amount,2): '')), ['class' => 'form-control text-right', 'placeholder' => __('base/employee_payroll.entry_rt_daily_amount'), 'step' => 'any']) !!} @if ($errors->has('rt_daily_amount')) {{ $errors->first('rt_daily_amount') }} @endif
{!! html_entity_decode(Form::label('rt_cumulative_income', __('base/employee_payroll.entry_rt_cumulative_income') . '', ['class' => 'control-label'])) !!} {!! Form::number('rt_cumulative_income', old('rt_cumulative_income', (!empty($duplicate_ep->rt_cumulative_income) ? round($duplicate_ep->rt_cumulative_income,2): '')), ['class' => 'form-control text-right', 'placeholder' => __('base/employee_payroll.entry_rt_cumulative_income'), 'step' => 'any']) !!} @if ($errors->has('rt_cumulative_income')) {{ $errors->first('rt_cumulative_income') }} @endif
{!! html_entity_decode(Form::label('rt_non_cumulative_income', __('base/employee_payroll.entry_rt_non_cumulative_income') . '', ['class' => 'control-label'])) !!} {!! Form::number('rt_non_cumulative_income', old('rt_non_cumulative_income', (!empty($duplicate_ep->rt_non_cumulative_income) ? round($duplicate_ep->rt_non_cumulative_income,2): '')), ['class' => 'form-control text-right', 'placeholder' => __('base/employee_payroll.entry_rt_non_cumulative_income'), 'step' => 'any']) !!} @if ($errors->has('rt_non_cumulative_income')) {{ $errors->first('rt_non_cumulative_income') }} @endif
{!! html_entity_decode(Form::label('sp_total_amount', __('base/employee_payroll.entry_sp_total_amount') . '', ['class' => 'control-label'])) !!} {!! Form::number('sp_total_amount', old('sp_total_amount', (!empty($duplicate_ep->sp_total_amount) ? round($duplicate_ep->sp_total_amount,2): '')), ['class' => 'form-control text-right', 'placeholder' => __('base/employee_payroll.entry_sp_total_amount'), 'step' => 'any']) !!} @if ($errors->has('sp_total_amount')) {{ $errors->first('sp_total_amount') }} @endif
{!! html_entity_decode(Form::label('sp_years_of_service', __('base/employee_payroll.entry_sp_years_of_service') . '', ['class' => 'control-label'])) !!} {!! Form::number('sp_years_of_service', old('sp_years_of_service', (!empty($duplicate_ep->sp_years_of_service) ? round($duplicate_ep->sp_years_of_service,0): '')), ['class' => 'form-control text-right', 'placeholder' => __('base/employee_payroll.entry_sp_years_of_service')]) !!} @if ($errors->has('sp_years_of_service')) {{ $errors->first('sp_years_of_service') }} @endif
{!! html_entity_decode(Form::label('sp_last_salary', __('base/employee_payroll.entry_sp_last_salary') . '', ['class' => 'control-label'])) !!} {!! Form::number('sp_last_salary', old('sp_last_salary', (!empty($duplicate_ep->sp_last_salary) ? round($duplicate_ep->sp_last_salary,2): '')), ['class' => 'form-control text-right', 'placeholder' => __('base/employee_payroll.entry_sp_last_salary'), 'step' => 'any']) !!} @if ($errors->has('sp_last_salary')) {{ $errors->first('sp_last_salary') }} @endif
{!! html_entity_decode(Form::label('sp_cumulative_income', __('base/employee_payroll.entry_sp_cumulative_income') . '', ['class' => 'control-label'])) !!} {!! Form::number('sp_cumulative_income', old('sp_cumulative_income', (!empty($duplicate_ep->sp_cumulative_income) ? round($duplicate_ep->sp_cumulative_income,2): '')), ['class' => 'form-control text-right', 'placeholder' => __('base/employee_payroll.entry_sp_cumulative_income'), 'step' => 'any']) !!} @if ($errors->has('sp_cumulative_income')) {{ $errors->first('sp_cumulative_income') }} @endif
{!! html_entity_decode(Form::label('sp_non_cumulative_income', __('base/employee_payroll.entry_sp_non_cumulative_income') . '', ['class' => 'control-label'])) !!} {!! Form::number('sp_non_cumulative_income', old('sp_non_cumulative_income', (!empty($duplicate_ep->sp_non_cumulative_income) ? round($duplicate_ep->sp_non_cumulative_income,2): '')), ['class' => 'form-control text-right', 'placeholder' => __('base/employee_payroll.entry_sp_non_cumulative_income'), 'step' => 'any']) !!} @if ($errors->has('sp_non_cumulative_income')) {{ $errors->first('sp_non_cumulative_income') }} @endif
@php $item_disability_row = 1; $items_disability = old('item_disability',($duplicate_ep->employeeActiveDisabilitiesPayrollLines ?? [])); @endphp @foreach ($items_disability as $item_disability_row => $item) @php $item = !empty(old('item_disability.' . $item_disability_row . '')) ? (object) old('item_disability.' . $item_disability_row) : $item; $tmp_disability_types = []; if(!empty(old('item_disability.' . $item_disability_row . '.disability_type_id',$item->disability_type_id))){ $tmp_disability_types = \App\Models\Catalogs\DisabilityType::where('id','=',old('item_disability.' . $item_disability_row . '.disability_type_id',$item->disability_type_id))->get()->pluck('description_select2','id'); } @endphp @endforeach @php $item_disability_row++; @endphp
@lang('general.column_actions') @lang('base/employee_payroll.column_line_disability_type_id') @lang('base/employee_payroll.column_line_disability_days') @lang('base/employee_payroll.column_line_disability_amount')
{!! Form::select('item_disability[' . $item_disability_row . '][disability_type_id]', $tmp_disability_types,old('item_disability.' . $item_disability_row . '.disability_type_id',$item->disability_type_id), ['class' => 'form-control input-sm col-disability-type-id', 'placeholder' => __('general.text_select'),'required','id' => 'item_disability_disability_type_id_' . $item_disability_row]) !!}
@if ($errors->has('item_disability.'.$item_disability_row.'.disability_type_id')) {{ $errors->first('item_disability.'.$item_disability_row.'.disability_type_id') }} @endif
{!! Form::number('item_disability[' . $item_disability_row . '][disability_days]', old('item_disability.' . $item_disability_row . '.disability_days', round($item->disability_days,0)), ['class' => 'form-control input-sm text-center col-disability-days','id' => 'item_disability_disability_days_' . $item_disability_row]) !!} @if ($errors->has('item_disability.'.$item_disability_row.'.disability_days')) {{ $errors->first('item_disability.'.$item_disability_row.'.disability_days') }} @endif
{!! Form::number('item_disability[' . $item_disability_row . '][disability_amount]', old('item_disability.' . $item_disability_row . '.disability_amount', round($item->disability_amount,2)), ['class' => 'form-control input-sm text-right col-disability-amount','id' => 'item_disability_disability_amount_' . $item_disability_row, 'step' => 'any']) !!} @if ($errors->has('item_disability.'.$item_disability_row.'.disability_amount')) {{ $errors->first('item_disability.'.$item_disability_row.'.disability_amount') }} @endif
{!! html_entity_decode(Form::label('source_resource_id', __('base/employee_payroll.entry_source_resource_id') . ' ', ['class' => 'control-label'])) !!} {!! Form::select('source_resource_id', $source_resources,old('source_resource_id'), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('source_resource_id')) {{ $errors->first('source_resource_id') }} @endif
{!! html_entity_decode(Form::label('sncf_amount_source_resource', __('base/employee_payroll.entry_sncf_amount_source_resource') . '', ['class' => 'control-label'])) !!} {!! Form::number('sncf_amount_source_resource', old('sncf_amount_source_resource', ''), ['class' => 'form-control text-right', 'placeholder' => __('base/employee_payroll.entry_sncf_amount_source_resource'), 'step' => 'any']) !!} @if ($errors->has('sncf_amount_source_resource')) {{ $errors->first('sncf_amount_source_resource') }} @endif
{!! html_entity_decode(Form::label('cfdi_relation_id', __('base/employee_payroll.entry_cfdi_relation_id') . ' ', ['class' => 'control-label'])) !!} {!! Form::select('cfdi_relation_id', $cfdi_relations,old('cfdi_relation_id'), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('cfdi_relation_id')) {{ $errors->first('cfdi_relation_id') }} @endif
@php $item_relation_row = 1; $items_relation = old('item_relation',[]); @endphp @foreach ($items_relation as $item_relation_row => $item) @php $tmp_uuid = ''; $tmp_employee_payroll_relations = []; if(!empty(old('item_relation.' . $item_relation_row . '.relation_id'))){ $tmp = \App\Models\Base\EmployeePayroll::find(old('item_relation.' . $item_relation_row . '.relation_id')); $tmp_employee_payroll_relations = $tmp->get()->pluck('text_select2','id'); $tmp_uuid = !empty($tmp) ? $tmp->employeePayrollCfdi->uuid : ''; } @endphp @endforeach @php $item_relation_row++; @endphp
@lang('general.column_actions') @lang('base/employee_payroll.column_relation_relation_id') @lang('base/employee_payroll.column_relation_uuid')
{!! Form::select('item_relation[' . $item_relation_row . '][relation_id]', $tmp_employee_payroll_relations,old('item_relation.' . $item_relation_row . '.relation_id'), ['class' => 'form-control input-sm col-relation-id', 'placeholder' => __('general.text_select'),'required','id' => 'item_relation_relation_id_' . $item_relation_row,'data-row' => $item_relation_row]) !!} @if ($errors->has('item_relation.'.$item_relation_row.'.relation_id')) {{ $errors->first('item_relation.'.$item_relation_row.'.relation_id') }} @endif
{{$tmp_uuid}}
{!! Form::close() !!}