@extends('layouts.master') @section('content')
@if (!session('employee_not_found'))
{{ $title }}
@php $payPeriod = $pamPayRun->pamPayRunPeriod->calendar_month . '-' . $pamPayRun->pamPayRunPeriod->calendar_year; $monthName = date('F', strtotime($payPeriod)); echo 'Payslip Period - ' . $monthName . ' ' . $pamPayRun->pamPayRunPeriod->calendar_year; @endphp
@else {{-- back button for the emp not found view --}} @endif {{-- search for payslip by man number for the current payroll run --}}
@if (!session('employee_not_found'))
@if (auth()->user()->roles->first()->permissions->contains('name', 'Manage NAPSA contributors')) @endif
@endif
@if (isset($error) || session('error'))
{{ $error ?? session('error') }}
@endif @if (session('success'))
{{ session('success') }}
@endif
@if (!session('employee_not_found'))

{{ strtoupper($title) }}

{{ $earningTitle }} @if (auth()->user()->roles->first()->permissions->contains('name', 'Manage payslips')) @endif

@foreach ($pamPayslipEarnDefs as $item) @endforeach
Description Hrs/Units Amount Start End Action
{{ $item->pamEarnDef->short_description }} {{ $item->units }} {{ number_format($item->amount, 2, '.', ',') }} {{ date('Y-m-d', strtotime($item->start_date)) }} {{ $item->end_date ? date('Y-m-d', strtotime($item->end_date)) : '' }} @if (auth()->user()->roles->first()->permissions->contains('name', 'Manage payslips')) @if ($item->pamEarnDef->pamEarnType->code == 'BASIC') @endif @if ($item->pamEarnDef->pamEarnType->code !== 'BASIC') @endif @endif
{{ $deductionTitle }} @if (auth()->user()->roles->first()->permissions->contains('name', 'Manage payslips')) @endif

@foreach ($pamPayslipDeduDefs as $item) @if ($item->pamDeduDef->pamDeduType->code === 'LOAN') @else @endif @endforeach
Description Amount Balance Start End Action
{{ $item->pamDeduDef->short_description }} {{ number_format($item->amount, 2, '.', ',') }} {{ $item->pamLoan ? number_format($item->pamLoan->loan_balance_amount, 2, '.', ',') : 0 }} {{ date('Y-m-d', strtotime($item->start_date)) }} {{ $item->end_date ? date('Y-m-d', strtotime($item->end_date)) : '' }} @if ( $item->pamDeduDef->pamDeduType->code !== 'INCTAX' && $item->pamDeduDef->pamDeduType->code !== 'SOCIALSECURITY' && $item->pamDeduDef->code !== 'NAPSA') @if (auth()->user()->roles->first()->permissions->contains('name', 'Manage payslips')) @endif @endif
@else
{{ session('employee_not_found') }}
@endif @endsection @section('modal') @foreach ($pamPayslipEarnDefs as $key => $item) @endforeach @foreach ($pamPayslipDeduDefs as $key => $item) @endforeach @endsection @section('scripts') @endsection