| {{ __('index.income') }} |
|
{{ __('index.basic_salary') }} |
@php
$totalAnnualIncome += $reportData->total_basic_salary;
@endphp
{{ $currency.' '.number_format($reportData->total_basic_salary, 2) }} |
@foreach($allMonths as $month)
@php
$showData = in_array($month, $monthData);
$monthlyBasicSalaryValue = $monthlyBasicSalary[$month] ?? 0;
@endphp
@if($showData)
@php
$monthlyTotals[$month] += $monthlyBasicSalaryValue;
@endphp
{{ $currency.' '.number_format($monthlyBasicSalaryValue, 2) }} |
@else
|
@endif
@endforeach
|
{{ __('index.fixed_allowance') }} |
@php
$totalAnnualIncome += $reportData->total_allowance;
@endphp
{{ $currency.' '.number_format( $reportData->total_allowance, 2) }} |
@foreach($allMonths as $month)
@php
$showData = in_array($month, $monthData);
$monthlyFixedAllowanceValue = $monthlyFixedAllowance[$month] ?? 0;
@endphp
@if($showData)
@php
$monthlyTotals[$month] += $monthlyFixedAllowanceValue;
@endphp
{{ $currency.' '.number_format($monthlyFixedAllowanceValue, 2) }} |
@else
|
@endif
@endforeach
|
{{ __('index.ssf_contribution') }} |
@php
$totalAnnualIncome += $reportData->total_ssf_contribution;
@endphp
{{ $currency.' '.number_format($reportData->total_ssf_contribution, 2) }} |
@foreach($allMonths as $month)
@php
$showData = in_array($month, $monthData);
$monthlySsfContributionValue = $monthlySsfContribution[$month] ?? 0;
@endphp
@if($showData)
@php
$monthlyTotals[$month] += $monthlySsfContributionValue;
@endphp
{{ $currency.' '.number_format($monthlySsfContributionValue, 2) }} |
@else
|
@endif
@endforeach
@php
$totalEarning = 0;
$totalDeduction = 0;
$totalBonusAmount = 0;
@endphp
@foreach($earningComponents as $earning)
|
{{ $earning->salaryComponent->name }} |
@php
$annualAmount = 0;
foreach($allMonths as $month) {
if (in_array($month, $monthData)) {
$annualAmount += $earning->amount;
}
}
$totalEarning += $annualAmount;
$totalAnnualIncome += $annualAmount;
@endphp
{{ $currency.' '.number_format($annualAmount, 2) }} |
@foreach($allMonths as $month)
@if(in_array($month, $monthData))
@php $monthlyTotals[$month] += $earning->amount; @endphp
{{ $currency.' '.number_format($earning->amount, 2) }} |
@else
|
@endif
@endforeach
@endforeach
@if(!empty($reportData->bonusDetail))
@foreach($reportData->bonusDetail as $bonus)
@if(in_array($bonus['month'], $allMonths))
@php
$showBonus = false;
$totalBonus = 0;
foreach($allMonths as $month) {
if (in_array($month, $monthData)) {
if ($bonus['month'] == $month) {
$showBonus = true;
$totalBonus = $bonus['amount'];
$totalBonusAmount += $bonus['amount'];
$totalAnnualIncome += $totalBonus;
$totalEarning += $totalBonus;
break;
}
}
}
@endphp
@if($showBonus)
|
{{ $bonus->bonus->title }} |
{{ $currency.' '.number_format($totalBonus, 2) }} |
@foreach($allMonths as $month)
@if(in_array($month, $monthData))
@php
$bonusAmount = ($bonus['month'] == $month) ? $bonus['amount'] : 0;
$monthlyTotals[$month] += $bonusAmount;
@endphp
{{ $bonusAmount > 0 ? $currency.' '.number_format($bonusAmount, 2) : '' }} |
@else
|
@endif
@endforeach
@endif
@endif
@endforeach
@endif
| {{ __('index.total_income') }} |
{{ number_format($totalAnnualIncome, 2) }} |
@foreach($allMonths as $month)
@if(in_array($month, $monthData))
{{ number_format($monthlyTotals[$month], 2) }} |
@else
|
@endif
@endforeach
| {{ __('index.deductions') }} |
@php
$totalMonthlyDeduction = array_fill(1, 12, 0);
$totalAnnualDeduction = $reportData['total_ssf_deduction'];
@endphp
|
{{ __('index.ssf_deduction') }} |
{{ $currency.' '.($reportData['total_ssf_deduction']) }} |
@foreach($allMonths as $month)
@php
$monthlySsfDeductionValue =$monthlySsfDeduction[$month] ?? 0;
$totalMonthlyDeduction[$month] += ($monthlySsfDeductionValue);
@endphp
@if(in_array($month, $monthData))
{{ $currency.' '.$monthlySsfDeductionValue }} |
@else
|
@endif
@endforeach
@foreach($deductionComponents as $deduction)
|
{{ $deduction->salaryComponent->name }} |
@php
$annualAmount = 0;
foreach($allMonths as $month) {
if (in_array($month, $monthData)) {
$annualAmount += $deduction->amount;
}
$totalMonthlyDeduction[$month] += $deduction->amount;
}
$totalAnnualDeduction += $annualAmount;
$totalDeduction += $annualAmount;
@endphp
{{ $currency.' '.number_format($annualAmount, 2) }} |
@foreach($allMonths as $month)
@if(in_array($month, $monthData))
{{ $currency.' '.number_format($deduction->amount, 2) }} |
@else
|
@endif
@endforeach
@endforeach
| {{ __('index.total_deduction') }} |
{{ $currency.' '.number_format($totalAnnualDeduction, 2) }} |
@foreach($allMonths as $month)
@php $showData = in_array($month, $monthData); @endphp
@if($showData)
{{ number_format($totalMonthlyDeduction[$month], 2) }} |
@else
|
@endif
@endforeach
| {{ __('index.tds_paid') }} |
@php
$totalTdsPaid = 0;
$monthlyTDS = array_fill(1, 12, 0); // Initialize an array for 12 months with 0
foreach ($reportData->tdsDetail as $tdsDetail) {
$monthlyTDS[$tdsDetail->month] = ($tdsDetail->is_paid == 1) ? $tdsDetail->amount : 0;
$totalTdsPaid += ($tdsDetail->is_paid == 1) ? $tdsDetail->amount : 0;
}
@endphp
{{ number_format($totalTdsPaid, 2) }} |
@foreach($allMonths as $month)
@if(in_array($month, $monthData))
|
@else
|
@endif
@endforeach
| {{ __('index.total_payable') }} |
@php
$annualTotalPayable = $totalAnnualIncome - $totalAnnualDeduction - 0;
@endphp
{{ number_format($annualTotalPayable, 2) }} |
@foreach($allMonths as $month)
@php
$monthlyTotalPayable = $monthlyTotals[$month] - $totalMonthlyDeduction[$month] - ($monthlyTDS[$month] ?? 0);
$showData = in_array($month, $monthData);
@endphp
@if($showData)
{{ number_format($monthlyTotalPayable, 2) }} |
@else
|
@endif
@endforeach