| Income |
@php
$incomeComponents = [
'Basic Salary' => $payrollData['payslipData']->monthly_basic_salary,
'Allowance' => $payrollData['payslipData']->monthly_fixed_allowance,
'SSF Contribution' => $payrollData['payslipData']->ssf_contribution
];
$totalAnnualIncome = 0;
$monthlyTotal = 0;
@endphp
@foreach($incomeComponents as $name => $amount)
|
{{ $name }} |
@php
$annualAmount = $amount * 12;
$totalAnnualIncome += $annualAmount;
$monthlyTotal += $amount;
@endphp
{{ $currency.' '.$annualAmount }} |
@for ($i = 1; $i <= 12; $i++)
{{ $currency.' '.$amount }} |
@endfor
@endforeach
@if($payrollData['payslipData']->bonus > 0)
|
Bonus |
{{ $currency.' '.$payrollData['payslipData']->bonus }} |
@for($month = 4; $month <= 12; $month++)
{{ isset($bonus->applicable_month) && $bonus->applicable_month == $month ? $currency.' '.$payrollData['payslipData']->bonus : '' }} |
@endfor
@for($month = 1; $month <= 3; $month++)
{{ isset($bonus->applicable_month) && $bonus->applicable_month == $month ? $currency.' '.$payrollData['payslipData']->bonus : '' }} |
@endfor
@php $totalAnnualIncome += $payrollData['payslipData']->bonus; @endphp
@endif
@foreach($payrollData['earnings'] as $earning)
|
{{ $earning['name'] }} |
@php
$annualEarning = $earning['amount'] * 12;
$totalAnnualIncome += $annualEarning;
$monthlyTotal += $earning['amount'];
@endphp
{{ $currency.' '.$annualEarning }} |
@for ($i = 1; $i <= 12; $i++)
{{ $currency.' '.$earning['amount'] }} |
@endfor
@endforeach
| Total Income |
{{ $currency . ' ' . number_format($totalAnnualIncome, 2) }} |
@for ($i = 4; $i <= 12; $i++)
@php
$currentMonthTotal = $monthlyTotal + (isset($bonus->applicable_month) && $bonus->applicable_month == $i ? $payrollData['payslipData']->bonus : 0);
@endphp
{{ $currency . ' ' . number_format($currentMonthTotal, 2) }} |
@endfor
@for ($i = 1; $i <= 3; $i++)
@php
$currentMonthTotal = $monthlyTotal + (isset($bonus->applicable_month) && $bonus->applicable_month == $i ? $payrollData['payslipData']->bonus : 0);
@endphp
{{ $currency . ' ' . number_format($currentMonthTotal, 2) }} |
@endfor
| Deductions |
|
SSF Contribution |
{{ $currency.' '.($payrollData['payslipData']->ssf_deduction*12) }} |
@for ($i = 1; $i <= 12; $i++)
{{ $currency.' '.$payrollData['payslipData']->ssf_deduction }} |
@endfor
@php
$totalAnnualDeduction = $payrollData['payslipData']->ssf_deduction * 12;
$totalMonthlyDeduction = $payrollData['payslipData']->ssf_deduction;
@endphp
@foreach($payrollData['deductions'] as $deduction)
|
{{ $deduction['name'] }} |
{{ $currency.' '.($deduction['amount']*12) }} |
@for ($i = 1; $i <= 12; $i++)
{{ $currency.' '.$deduction['amount'] }} |
@endfor
@php
$totalAnnualDeduction += $deduction['amount'] * 12;
$totalMonthlyDeduction += $deduction['amount'];
@endphp
@endforeach
| Total Deduction |
{{ $currency.' '.number_format($totalAnnualDeduction, 2) }} |
@for ($i = 1; $i <= 12; $i++)
{{ $currency.' '.number_format($totalMonthlyDeduction, 2) }} |
@endfor
| TDS Paid |
{{ $payrollData['payslipData']->tds }} |
@for ($i = 4; $i <= 12; $i++)
@if($i == $month)
{{ $currency . ' ' . $payrollData['payslipData']->tds }} |
@endif
@endfor
@for ($i = 1; $i <= 3; $i++)
@if($i == $month)
{{ $currency . ' ' . $payrollData['payslipData']->tds }} |
@endif
@endfor
| Total Payable |
@php
$annualTotalPayable = $totalAnnualIncome - $totalAnnualDeduction - ($payrollData['payslipData']->tds * 12);
@endphp
{{ $currency . ' ' . number_format($annualTotalPayable, 2) }} |
@for ($i = 4; $i <= 12; $i++)
@php
$monthlyIncome = $monthlyTotal + (isset($bonus->applicable_month) && $bonus->applicable_month == $i ? $payrollData['payslipData']->bonus : 0);
$monthlyTDS = ($i == $month) ? $payrollData['payslipData']->tds : 0;
$monthlyTotalPayable = $monthlyIncome - $totalMonthlyDeduction - $monthlyTDS;
@endphp
{{ $currency . ' ' . number_format($monthlyTotalPayable, 2) }} |
@endfor
@for ($i = 1; $i <= 3; $i++)
@php
$monthlyIncome = $monthlyTotal + (isset($bonus->applicable_month) && $bonus->applicable_month == $i ? $payrollData['payslipData']->bonus : 0);
$monthlyTDS = ($i == $month) ? $payrollData['payslipData']->tds : 0;
$monthlyTotalPayable = $monthlyIncome - $totalMonthlyDeduction - $monthlyTDS;
@endphp
{{ $currency . ' ' . number_format($monthlyTotalPayable, 2) }} |
@endfor