@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}}
| # |
Description |
Amount |
{{--Allowance and basic salary --}}
@php
$totalAllowanceAndBasicSalary = 0;
$totalDeduction = 0;
@endphp
| Allowance |
| 1 |
Basic Salary |
@php
$totalAllowanceAndBasicSalary += $salaryDetails->basic_salary;
@endphp
{{number_format($salaryDetails->basic_salary)}}
|
@php $allowance = 1 @endphp
@if(count($salaryDetailsToAllowance) > 0)
@foreach($salaryDetailsToAllowance as $allowanceValue)
@php
$totalAllowanceAndBasicSalary += $allowanceValue->amount_of_allowance;
@endphp
| {{++$allowance}} |
{{$allowanceValue->allowance_name}} |
{{number_format($allowanceValue->amount_of_allowance)}}
|
@endforeach
@endif
@if($salaryDetails->total_overtime_amount !=0)
@php
$totalAllowanceAndBasicSalary += $salaryDetails->total_overtime_amount;
@endphp
| {{++$allowance}} |
Over Time |
{{number_format($salaryDetails->total_overtime_amount)}}
|
@endif
| Total Basic Salary and Allowance : |
{{number_format($totalAllowanceAndBasicSalary)}}
|
{{--Deduction--}}
| Deduction |
@php $deduction = 0 @endphp
@if(count($salaryDetailsToDeduction) > 0)
@foreach($salaryDetailsToDeduction as $deductionValue)
@php $totalDeduction += $deductionValue->amount_of_deduction @endphp
| {{++$deduction}} |
{{$deductionValue->deduction_name}} |
{{number_format($deductionValue->amount_of_deduction)}}
|
@endforeach
@endif
@if($salaryDetails->total_late_amount !=0)
@php $totalDeduction += $salaryDetails->total_late_amount @endphp
| {{++$deduction}} |
Late |
{{number_format($salaryDetails->total_late_amount)}}
|
@endif
@if($salaryDetails->total_absence_amount !=0)
@php $totalDeduction += $salaryDetails->total_absence_amount @endphp
| {{++$deduction}} |
Absence |
{{number_format($salaryDetails->total_absence_amount)}}
|
@endif
@if($salaryDetails->tax !=0)
@php $totalDeduction += $salaryDetails->tax @endphp
| {{++$deduction}} |
Tax |
{{number_format($salaryDetails->tax)}}
|
@endif
| 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 :