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

Employee Salary

@if(count($salary_info) >0)
@include('payroll.includes.printAndExcel')
@endif
@if(count($salary_info) >0)
@csrf @php $total_employee = count($salary_info); $i=0; @endphp @php $total_deduction_amount = 0; $conveyance_amount=0; $total_conveyance_amount =0; $total_income_tax =0 ; $income_tax_amount =0; $grand_total_increment = 0; $grand_total_basic = 0; $grand_total_gross = 0; $grand_total_attendance_amount = 0 ; $grand_total_ot_amount = 0 ; $total_leave_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; $grand_total_absent_amount = 0; $grand_total_late_early_amount = 0; $grand_total_bonus = 0; $grand_total_earn_leave = 0; @endphp @foreach(collect($salary_info)->chunk(20) as $chunked_salary ) @php $total_employee -=count($chunked_salary); @endphp

{{$salary_report_design->is_show_store_name ==1 ? store_info()->name_eng : null}}

@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
@php $total_col_span = '35'; if (!empty($all_other_allowance)) { $total_col_span += count($all_other_allowance); } @endphp @if($salary_report_design->card_no==1) @endif @if($salary_report_design->emp_no==1) @endif @if($salary_report_design->joining_date==1) @endif {{-- Allowance --}} @if (!empty($allowances)) @foreach($allowances as $allowance) @endforeach @endif @foreach($all_other_allowance as $data) @endforeach {{-- Leave --}} @foreach($all_leave_type as $leave_type_val) @endforeach {{-- @dd($salary_info)--}} @if(!empty($salary_info)) @php $k = 0; $total_deduction_amount = 0; $conveyance_amount=0; $total_conveyance_amount =0; $total_income_tax =0 ;$income_tax_amount =0; $salary_allowance = array();$salary_other_allowance = array();$allowance_amount = 0; //Page Total $page_total_increment = 0; $page_total_basic = 0; $page_total_gross = 0; $page_total_ot_amount = 0; $page_total_ot_shift_amount = 0; $page_total_leave_amount = 0; $page_total_salary = 0; $page_total_loan_amount = 0; $page_total_advance_amount = 0; $page_total_bank_amount = 0; $page_total_net_payable = 0; @endphp @foreach($chunked_salary as $val) @php ++$i; $ot_hour = 0;$ot_day = 0; $per_day_salary = 0;$per_hour_salary = 0; $ot_hour_amount = 0;$total_ot_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 @if($salary_report_design->card_no==1) @endif @if($salary_report_design->emp_no==1) @endif @if($salary_report_design->joining_date==1) @endif {{-- Allowance --}} @if(!empty($allowances)) @php $total_allowance_amount = 0; @endphp @foreach($allowances as $allowance) @php $k++; $allowance_amount = count($val['allowance']) > 0 ? calculate_roster_allowance($allowance,$val['schedule_id'],$val['allowance'],$total_absent,$val['present'],$val['total_night_shift']) : 0 ; $salary_allowance[$k][$allowance->id] = $allowance_amount; $total_allowance_amount += $allowance_amount; @endphp {{-- @dd($val['allowance'],$allowance_amount); --}} @endforeach @php $total_gross_salary = round($val['basic'] + $total_allowance_amount); $page_total_gross += $total_gross_salary; $grand_total_gross += $total_gross_salary; @endphp @endif @if(!empty($all_other_allowance)) @foreach($all_other_allowance as $data) @php $other_allowance_amount = count($val['other_allowance']) > 0 ? calculate_roster_other_allowance($data,$val['schedule_id'],$val['other_allowance'],$total_absent,$val['present'],$val['leave'],$val['total_night_shift'],$val['total_ot_shift']) : null; @endphp @php $salary_other_allowance[$k][$data->id] = $other_allowance_amount; @endphp @endforeach @endif @foreach($all_leave_type as $leave_type_val) @endforeach @if($salary_report_design->loan_balance == 1) @endif {{-- DN/PN --}} {{-- Suspense/Advance --}} {{----}} @endforeach {{-- Page Total Start--}} {{-- @include('payroll.salary.salary_page_total') --}} {{-- Page Total End--}} @endif {{-- Grand Total Salary Start--}} @if($total_employee == 0 ) @php $total_salary_allowance = collect($salary_allowance); $total_other_allowance = collect($salary_other_allowance); @endphp @if($salary_report_design->card_no==1) @endif @if($salary_report_design->emp_no==1) @endif @if($salary_report_design->joining_date==1) @endif {{-- Allowance --}} @if(count($allowances)> 0) @foreach($allowances as $allowance) {{-- @dd($total_salary_allowance) --}} @endforeach @endif {{-- W.Days --}} @if(!empty($all_other_allowance)) @foreach($all_other_allowance as $data) @endforeach @endif @if(count($all_leave_type)>0) @foreach($all_leave_type as $leave_type_val) @endforeach @endif @if($salary_report_design->loan_balance == 1) @endif @endif {{-- Grand Total Salary End--}}
#SLCardCodeName DesignationJoiningIncrement Basic{{$allowance->name}}Gross Salary W.Days Total Amount OT Day{{$data->name}}Leave Bonus EL Pay Total Salary Loan Adjustment Net Payable Signature
Day Tk{{$leave_type_val->print_name ? $leave_type_val->print_name : $leave_type_val->name}}Bank Add/Ded. Advance
{{$i}}{{$val['emp_card']}}{{$val['code']}} {{$val['name'] }} {{$val['designation']}}{{$val['joining_date']}} @php $increment = round($val['increment']); $page_total_increment += $increment; $grand_total_increment += $increment; @endphp {{number_format($increment)}} @php $basic_salary = round($val['basic']); $page_total_basic += $basic_salary; $grand_total_basic += $basic_salary; @endphp {{number_format($basic_salary)}} {{number_format($allowance_amount)}} {{number_format($total_gross_salary)}} {{$val['working_days']}} @php $total_attendance_amount = ($total_gross_salary/count($current_month_days))*$val['working_days']; $grand_total_attendance_amount += $total_attendance_amount; @endphp {{ number_format($total_attendance_amount)}} {{$val['total_ot_shift']}} {{number_format($val['total_ot_shift_amount'])}} @php $page_total_ot_shift_amount += $val['total_ot_shift_amount']; $total_ot_amount += $val['total_ot_shift_amount']; $grand_total_ot_amount += $val['total_ot_shift_amount']; @endphp @php $total_other_allowance_amount += $other_allowance_amount; @endphp {{abs($other_allowance_amount)}} {{number_format($val['bonus'])}} {{number_format($val['earn_leave_amount'])}} @php $grand_total_bonus += $val['bonus']; $grand_total_earn_leave += $val['earn_leave_amount']; $total_salary = ($total_gross_salary + $total_ot_amount + $add_allowance + $total_other_allowance_amount+ $val['earn_leave_amount'] + $val['bonus']) - ($absent_amount + $late_amount + $leave_amount + $deduct_allowance); $page_total_salary += $total_salary; $grand_total_salary += $total_salary; @endphp {{number_format($total_salary)}} {{number_format($val['loan_balance'])}} @php $loan_info = $val['loan_amount']; $loan_amount = array_sum(array_column($loan_info, 'amount')); $page_total_loan_amount += $loan_amount; $grand_loan_total += $loan_amount; @endphp {{number_format($loan_amount)}} @foreach($loan_info as $loan_val) @endforeach @php $bank_amount = $val['bank_amount']; $page_total_bank_amount += $bank_amount; $grand_bank_total += $bank_amount; @endphp {{number_format($bank_amount)}} @php $add_deduct_amount=$val['add_deduct_amount']; $total_add_deduct_amount += $add_deduct_amount; @endphp {{round(abs($add_deduct_amount))}} @php $advance_info = $val['advance_amount']; $advance_amount = array_sum(array_column($advance_info, 'amount')); $page_total_advance_amount += $advance_amount; $grand_advance_total += $advance_amount; @endphp {{number_format($advance_amount)}} @foreach($advance_info as $advance) @endforeach 0 @php $net_payable = $total_salary + $conveyance_amount + $add_deduct_amount - ($loan_amount + $bank_amount + $advance_amount + $income_tax_amount); $page_total_net_payable += $net_payable; $grand_net_payable += $net_payable; @endphp {{number_format($net_payable)}}  
Grand Total{{number_format($grand_total_increment)}} {{number_format($grand_total_basic)}}{{number_format($total_salary_allowance->sum($allowance->id))}}{{number_format($grand_total_gross)}} {{number_format($grand_total_attendance_amount)}} {{number_format($grand_total_ot_amount)}}  {{number_format($grand_total_bonus)}} {{number_format($grand_total_earn_leave)}} {{number_format($grand_total_salary)}} {{number_format($salary_info->sum('loan_balance'))}}{{number_format($grand_loan_total)}} {{number_format($grand_bank_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 Taka Only
{{$company_policy}}
@endif {{-- @include('payroll.signature') --}}
@include('payroll.signature')
@endforeach @if(count($salary_info) >0)
@endif
@endif @endsection @section('script') @endsection