@php $codes = ['total_allowance' => 0, 'total_deduction' => 0, 'total_net_salary' => 0]; @endphp @extends('master') @section('title', 'Yearly salary statement') @section('breadcrumbMainTitle', 'Yearly salary statement') @section('content')
UGC Bhaban, Agargaon, Sher-e-Banglanagar, Dhaka - 1207
Financial Year: {{ $financialYear }}
Name: {{ $employeeInfo->employee_name }}
Department: {{ $employeeInfo->department->department_name }}
Designation: {{ $employeeInfo->designation->designation_name }}
Employee ID: {{ $employeeInfo->employee_id }}
Bank A/C: {{ $employeeBankInfo->bank_account_number }}
Joining Date: {{ $employeeInfo->joining_date }}
মাস | @foreach ($bhataHeaderList as $header){{ $header->code_details->code_title }} | @endforeachমোট বেতন ও ভাতাদি | @foreach ($kortonHeaderList as $header){{ $header->code_details->code_title }} | @endforeachমোট কর্তন | নীট বেতন পরিশোধ |
---|---|---|---|---|---|
{{ $data->month_year }} | @foreach ($bhataHeaderList as $header)@php if (!isset($codes[$header->code_id])) { $codes[$header->code_id] = 0; } $allowanceArray = json_decode($data->allowances, true); foreach ($allowanceArray as $item) { if ( isset($item['code_id']) && $item['code_id'] === $header->code_id ) { if (isset($item['allowance_amount'])) { echo $item['allowance_amount']; $codes[$header->code_id] += $item['allowance_amount']; } else { echo 0; } break; // Exit the loop once found } } @endphp | @endforeach{{ $data->allowance_total }} | @php $codes['total_allowance'] += $data->allowance_total; @endphp @foreach ($kortonHeaderList as $header)@php if (!isset($codes[$header->code_id])) { $codes[$header->code_id] = 0; } $kortonArray = json_decode($data->deductions, true); foreach ($kortonArray as $item) { if ( isset($item['deduction_type_id']) && $item['deduction_type_id'] === $header->code_id ) { if (isset($item['deduction_amount'])) { echo $item['deduction_amount']; $codes[$header->code_id] += $item['deduction_amount']; } else { echo 0; } break; // Exit the loop once found } } @endphp | @endforeach{{ $data->deduction_total }} | {{ $data->net_salary }} | @php $codes['total_deduction'] += $data->deduction_total; $codes['total_net_salary'] += $data->net_salary; @endphp
Total | @foreach ($bhataHeaderList as $header)@php echo $codes[$header->code_id]; @endphp | @endforeach@php echo $codes['total_allowance']; @endphp | @foreach ($kortonHeaderList as $header)@php echo $codes[$header->code_id]; @endphp | @endforeach@php echo $codes['total_deduction']; @endphp | @php echo $codes['total_net_salary']; @endphp |