@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')

University Grants Comission of Bangladesh

UGC Bhaban, Agargaon, Sher-e-Banglanagar, Dhaka - 1207

Yearly Salary Statement

Financial Year: {{ $financialYear }}

{{-- Employee Name & Bank Info --}}

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 }}

{{-- Statement Start --}} @foreach ($bhataHeaderList as $header) @endforeach @foreach ($kortonHeaderList as $header) @endforeach @foreach ($topsheetStatementData as $data) @foreach ($bhataHeaderList as $header) @endforeach @php $codes['total_allowance'] += $data->allowance_total; @endphp @foreach ($kortonHeaderList as $header) @endforeach @php $codes['total_deduction'] += $data->deduction_total; $codes['total_net_salary'] += $data->net_salary; @endphp @endforeach @foreach ($bhataHeaderList as $header) @endforeach @foreach ($kortonHeaderList as $header) @endforeach
মাস{{ $header->code_details->code_title }}মোট বেতন ও ভাতাদি{{ $header->code_details->code_title }}মোট কর্তন নীট বেতন পরিশোধ
{{ $data->month_year }} @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 {{ $data->allowance_total }} @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 {{ $data->deduction_total }} {{ $data->net_salary }}
Total @php echo $codes[$header->code_id]; @endphp @php echo $codes['total_allowance']; @endphp @php echo $codes[$header->code_id]; @endphp @php echo $codes['total_deduction']; @endphp @php echo $codes['total_net_salary']; @endphp
{{-- Topsheet End --}}
@endsection