@if($companyAddress){!! $companyAddress->address !!}@endif
Employee Name : {{$salaryDetails->first_name}} {{$salaryDetails->last_name}}
Department : {{$salaryDetails->department_name}}
Designation : {{$salaryDetails->designation_name}}
Pay Grade : {{$salaryDetails->pay_grade_name}} (Monthly)
Payment Method : {{$salaryDetails->payment_method}}
@php $monthAndYear = explode('-',$salaryDetails->month_of_salary); $month = $monthAndYear[1]; $dateObj = DateTime::createFromFormat('!m', $month); $monthName = $dateObj->format('F'); $year = $monthAndYear[0]; $monthAndYearName = $monthName." ".$year ; @endphp

Payslip {{$monthAndYearName}}

{{--Allowance and basic salary --}} @php $totalAllowanceAndBasicSalary = 0; $totalDeduction = 0; @endphp @php $allowance = 1 @endphp @if(count($salaryDetailsToAllowance) > 0) @foreach($salaryDetailsToAllowance as $allowanceValue) @php $totalAllowanceAndBasicSalary += $allowanceValue->amount_of_allowance; @endphp @endforeach @endif @if($salaryDetails->total_overtime_amount !=0) @php $totalAllowanceAndBasicSalary += $salaryDetails->total_overtime_amount; @endphp @endif {{--Deduction--}} @php $deduction = 0 @endphp @if(count($salaryDetailsToDeduction) > 0) @foreach($salaryDetailsToDeduction as $deductionValue) @php $totalDeduction += $deductionValue->amount_of_deduction @endphp @endforeach @endif @if($salaryDetails->total_late_amount !=0) @php $totalDeduction += $salaryDetails->total_late_amount @endphp @endif @if($salaryDetails->total_absence_amount !=0) @php $totalDeduction += $salaryDetails->total_absence_amount @endphp @endif @if($salaryDetails->tax !=0) @php $totalDeduction += $salaryDetails->tax @endphp @endif
# Description Amount
Allowance
1 Basic Salary @php $totalAllowanceAndBasicSalary += $salaryDetails->basic_salary; @endphp {{number_format($salaryDetails->basic_salary)}}
{{++$allowance}} {{$allowanceValue->allowance_name}} {{number_format($allowanceValue->amount_of_allowance)}}
{{++$allowance}} Over Time {{number_format($salaryDetails->total_overtime_amount)}}
Total Basic Salary and Allowance : {{number_format($totalAllowanceAndBasicSalary)}}
Deduction
{{++$deduction}} {{$deductionValue->deduction_name}} {{number_format($deductionValue->amount_of_deduction)}}
{{++$deduction}} Late {{number_format($salaryDetails->total_late_amount)}}
{{++$deduction}} Absence {{number_format($salaryDetails->total_absence_amount)}}
{{++$deduction}} Tax {{number_format($salaryDetails->tax)}}
Total Deduction : {{number_format($totalDeduction)}}
Gross Salary : {{ number_format($totalAllowanceAndBasicSalary - $totalDeduction)}}
@php $numberToWordConvert =New \App\Lib\NumberToWordConvert(); echo $numberToWordConvert->convert_number($totalAllowanceAndBasicSalary -$totalDeduction ); @endphp
Date :
Signature of Employee :
Director :