@extends('admin.layout.master') @section('content') @php use App\Models\Payroll\Common\Settings\CommonSettingsTypes; @endphp
@if (count($errors) > 0)
@endif

{{__('obs.employee_generated_salary')}}

@if(count($generated_info) >0)
@include('payroll.includes.printAndExcel')
@endif
@php $total_employee = count($generated_info); $i=0; @endphp @php $total_gross = 0;$total_basic = 0; $total_ot_hour_amount = 0; $grand_net_payable = 0; $grand_total_salary = 0;$grand_advance_total = 0;$grand_bank_total = 0; $total_add_deduct_amount = 0; $grand_loan_total = 0; @endphp @foreach (collect($generated_info)->chunk(33) as $chunked_salary ) @php $total_employee -=count($chunked_salary); @endphp
@if(count($generated_info) >0)

{{store_info()->name_eng}}

@if(!empty($emp_department)){{$emp_department->name}}@endif
Salary sheet for the month of @if(!empty($end_date)){{date('F\'Y',strtotime($end_date))}}@endif
@endif
@php $total_col_span = '35'; if (!empty($all_other_allowance)) { $total_col_span += count($all_other_allowance); } @endphp {{-- Allowance --}} @if (!empty($allowances)) @foreach($allowances as $allowance) {{-- --}} @endforeach @endif @foreach($all_other_allowance as $data) @endforeach {{-- conveyance --}} {{-- --}} {{-- --}} {{-- Late --}} {{-- Absent --}} {{-- Leave --}} @foreach($all_leave_type as $leave_type_val) @endforeach @if($generated_info) @php $k = 0; $total_ot_day_amount = 0;$total_leave_amount = 0;$total_deduction_amount = 0; $conveyance_amount=0; $total_conveyance_amount =0; $total_income_tax =0 ;$income_tax_amount =0; $salary_allowance = [];$salary_other_allowance = [];$allowance_amount = 0; @endphp @foreach($chunked_salary as $salary) @php $gross_salary = 0;$basic_salary = 0; // OT Variable Initialize $ot_hour = 0;$ot_day = 0;$total_ot_amount = 0; $per_day_salary = 0;$per_hour_salary = 0; $ot_hour_amount = 0;$ot_day_amount = 0; $total_joining_absent = 0;$total_resign_absent=0;$total_absent = 0; $ot_hour_salary = 0;$ot_day_salary = 0; $joining_deduction = 0;$resign_deduction=0; $absent_amount = 0;$late_amount = 0;$leave_amount = 0;$add_allowance = 0; $deduct_allowance = 0; $other_allowance_amount = 0; $total_other_allowance_amount = 0; @endphp {{-- --}} {{-- Allowance --}} {{-- @foreach($allowances as $allowance) @php $allowance_data = $generated_allowance_info->where('emp_id', $salary->get_emp_info->id)->where('allowance_id', $allowance->id)->first(); @endphp @if(!empty($allowance_data->allowance_amount)) @else @endif @endforeach --}} @foreach($all_leave_type as $leave_type_val) @endforeach @foreach($all_other_allowance as $other_allowance) @php $generated_other_allowance = $generated_other_allowance_info->where('emp_id', $salary->emp_id)->where('allowance_id', $other_allowance->id)->first(); @endphp @endforeach {{-- Add/Ded--}} {{-- Suspense/Advance --}} @endforeach @endif @if($total_employee ==0 ) @php $total_salary_allowance = collect($salary_allowance); $total_other_allowance = collect($salary_other_allowance); @endphp {{-- Allowance --}} @if(count($allowances)> 0) @foreach($allowances as $allowance) {{-- @dd($total_salary_allowance) --}} {{-- --}} @endforeach @endif @if(count($all_leave_type)>0) @foreach($all_leave_type as $leave_type_val) @endforeach @endif @foreach($all_other_allowance as $data) @endforeach {{-- conveyance --}} {{-- --}} {{-- Tax --}} {{-- --}} @endif
{{__('obs.sl')}} {{__('obs.card_number')}} {{__('obs.name')}} {{__('obs.designation')}} {{__('obs.joining')}} {{__('obs.basic')}}{{$allowance->name}}{{__('obs.gross_salary')}} {{__('obs.hour')}} {{__('obs.overtime_day')}} {{__('obs.late')}}|{{__('obs.early')}} {{__('obs.absent')}} Leave{{$data->name}}{{__('obs.total_salary')}}Conv.Tax{{__('obs.adjustment')}} {{__('obs.net_payable')}} {{__('obs.signature')}}
{{__('obs.hour')}} {{__('obs.taka')}} {{__('obs.day')}} {{__('obs.adjustment')}} {{__('obs.taka')}}{{__('obs.day')}} {{__('obs.taka')}}{{__('obs.day')}} {{__('obs.taka')}}{{$leave_type_val->print_name ? $leave_type_val->print_name : $leave_type_val->name}}{{__('obs.taka')}} {{__('obs.bank')}} {{__('obs.loan')}} {{__('obs.add')}}/{{__('obs.deduct')}} {{__('obs.advance')}}
{{++$i}} {{$salary->get_emp_info->emp_card}} {{$salary->get_emp_info->emp_name}} - {{$salary->get_emp_info->emp_code}} {{$salary->get_emp_info ? $salary->get_emp_info->fetch_designation ? $salary->get_emp_info->fetch_designation->name : null : null}} {{$salary->get_emp_info ? $salary->get_emp_info->joining_date ? $salary->get_emp_info->joining_date : null : null}}{{$val['station_vehicle_no']}}{{number_format($salary->basic_salary)}} @php $basic_salary = $salary->basic_salary; $total_basic += $basic_salary; @endphp {{abs($allowance_data->allowance_amount)}} 0 {{number_format($salary->gross_salary)}} @php $total_gross += $salary->gross_salary; @endphp {{$salary->ot_hour}} {{number_format($salary->ot_hour_amount)}} @php $total_ot_hour_amount += $salary->ot_hour_amount; @endphp {{$salary->ot_day}} {{$salary->ot_day_replace}} {{number_format( $salary->ot_day_amount)}} @php $total_ot_amount += $salary->ot_day_amount;@endphp {{ $salary->late}}|0 @php $late_amount = $salary->late_amount; $early_amount = $salary->early_leave_amount; $absent_amount = $salary->absent_amount; @endphp {{number_format($late_amount)}} @php $total_absent =$salary->absent; @endphp {{$total_absent}} {{number_format( $absent_amount)}} @if(!empty($total_leave_info) && count($total_leave_info)>0) @foreach($total_leave_info as $leave_key=>$leave_val) @if($leave_key==$leave_type_val['id']) {{$leave_val}} @endif @endforeach @else 0 @endif {{number_format($salary->leave_amount)}} @php $total_leave_amount += $salary->leave_amount; @endphp {{$generated_other_allowance->allowance_amount ?? null}} @php $total_salary = $salary->total_salary; $grand_total_salary += $total_salary @endphp {{number_format($total_salary)}} @php $bank_amount = $salary->bank_amount; $grand_bank_total += $bank_amount; @endphp {{number_format($bank_amount)}} @php $loan_amount = $salary->loan_amount; $grand_loan_total += $loan_amount @endphp {{number_format($loan_amount)}} @php $add_deduct_amount= $salary->add_deduct_amount; $total_add_deduct_amount += $add_deduct_amount; @endphp {{number_format(abs($add_deduct_amount))}} @php $advance_amount =$salary->advance_amount; $grand_advance_total += $advance_amount @endphp {{number_format($advance_amount)}} @php $net_payable = $salary->net_amount; $grand_net_payable += $net_payable @endphp {{number_format($net_payable)}}  
{{__('obs.total')}} {{number_format($total_basic)}}{{number_format($total_salary_allowance->sum($allowance->id))}}{{number_format($total_gross)}} {{number_format($total_ot_day_amount)}}  {{number_format($total_leave_amount)}}{{number_format($grand_total_salary)}} {{$total_conveyance_amount}} {{$total_income_tax}}{{number_format($grand_bank_total)}} {{number_format($grand_loan_total)}} {{number_format(abs($total_add_deduct_amount))}} {{number_format($grand_advance_total)}} {{number_format($grand_net_payable)}}  
@if($grand_net_payable > 0)
@php $total_pay_in_word = number_format(round($grand_net_payable)); $converted_amount_in_text = convert_number($grand_net_payable); @endphp In Words : @php echo $converted_amount_in_text; @endphp {{__('obs.taka_only')}}
{{$company_policy}}
@endif {{-- @include('payroll.signature') --}}
@include('payroll.signature')
@endforeach
@endsection @section('script') @endsection