@extends('layouts.master') @section('content')
{{ $title }}
@if(isset($error) || session('error'))
{{ $error ?? session('error') }}
@endif
{{ $title }}
@foreach($data as $item) @php $def = App\Models\PamPayslip::where('id', $item->payslip_id)->first(); $nhimaContribution = App\Models\PamPayslipCont::where('payslip_id', $item->payslip_id)->where('cont_def_code','098')->first(); $basicEarning = App\Models\PamPayslipEarn::where('payslip_id', $item->payslip_id)->where('earn_def_code','BASICPAY')->first(); @endphp @if($def) @endif @endforeach
Year Month SSN Man # National ID Nhima # Surname First Name Other Name DOB Gross Pay/Salary Basic Pay Employer Share Employee Share
{{$def->pamPayRun->pamPayRunPeriod->calendar_year}} {{$def->pamPayRun->pamPayRunPeriod->calendar_month}} {{ $def->pamEmp->pamHRUser->social_security_number}} {{ $def->pamEmp->pamHRUser->man_number}} {{ $def->pamEmp->pamHRUser->nrc}} {{ $def->pamEmp->pamHRUser->nhima_no}} {{ $def->pamEmp->pamHRUser->last_name}} {{ $def->pamEmp->pamHRUser->first_name}} {{ $def->pamEmp->pamHRUser->middle_name}} {{ $def->pamEmp->pamHRUser->dob}} {{ number_format($def->gross_earnings ,2, '.', ',')}} {{ isset($basicEarning) && is_numeric($basicEarning->fixed_amount) ? number_format($basicEarning->fixed_amount, 2, '.', ',') : '0.00' }} {{ isset($nhimaContribution) && is_numeric($nhimaContribution->amount) ? number_format($nhimaContribution->amount, 2, '.', ',') : '0.00' }} {{ number_format($item->amount ,2, '.', ',')}}
@endsection