@extends('layouts.app') @section('page-content')
{{ __('Payslip') }}
@if (!empty($payslip->title))

{{ $payslip->title }}

@endif
@php $company = app(\App\Settings\CompanySettings::class); @endphp
  • {{ $company->name }}
  • {{ $company->address }}
  • {{ !empty($company->city) ? $company->city.' , ':'' }}{{ !empty($company->province) ? $company->province.' ,' :''.$company->postal_code}}

{{ __('Payslip') }} {{ $payslip->ps_id }}

  • {{ __('Date Created') }}: {{ format_date($payslip->created_at) }}
  • @if ($payslip->type === \App\Enums\Payroll\SalaryType::Hourly)
  • {{ __('Start Date') }}: {{ format_date($payslip->startDate) }}
  • {{ __('Expiry date') }}: {{ format_date($payslip->expiryDate) }}
  • @endif @if(!empty($payslip->payslip_date))
  • {{ __('Salary Month') }}: {{ $payslip->payslip_date }}
  • @endif
  • {{ $payslip->employee->user->fullname }}
  • {{ $employee->user->address }}
  • {{ $employee->department->name ?? '' }}
  • {{ $employee->designation->name ?? '' }}
  • {{ __('Employee ID') }}: {{ $employee->emp_id }}
  • {{ __('Joining Date') }}: {{ $employee->date_joined }}
  • {{ $employee->phoneNumber }}
  • {{ $employee->user->email }}
@if (!empty($payslip->use_allowance))

{{ __('Allowances') }}

@if (!empty($employee->salaryDetails)) @endif @if (!empty($allowances)) @foreach ($allowances as $allowance) @endforeach @endif
{{ __('Base pay') }} {{ $currency }} {{ $employee->salaryDetails->base_salary }}
{{ $allowance->name }} {{ $currency.' '.$allowance->amount }}
{{ __('Total Allowance') }} {{ $allowances->sum('amount') ?? 0 }}
@endif @if (!empty($payslip->use_deduction))

{{ __('Deductions') }}

@if (!empty($deductions)) @foreach ($deductions as $item) @endforeach @endif
{{ $item->name }} {{ $currency.' '.$item->amount }}
{{ __('Total Deductions') }} {{ $currency.' '. $deductions->sum('amount') ?? 0 }}
@endif

{{ __('Net Pay') }}: {{ $currency .' '.$payslip->net_pay}} ({{ ucwords(\Number::spell($payslip->net_pay)) }}.)

@if ($payslip->type === \App\Enums\Payroll\SalaryType::Hourly)

{{ __('Net Pay') }} = {{ __('Total hours for attendance between start and end date multiply by Base Salary') }} + {{ __('Total Allowances') }} - {{ __('Total Deductions') }}

@endif @if ($payslip->type === \App\Enums\Payroll\SalaryType::Weekly)

{{ __('Net Pay') }} = {{ __('Number of weeks multiply by Base Salary') }} + {{ __('Total Allowances') }} - {{ __('Total Deductions') }}

@endif @if ($payslip->type === \App\Enums\Payroll\SalaryType::Monthly || $payslip->type === \App\Enums\Payroll\SalaryType::Contract)

{{ __('Net Pay') }} = {{ __('Base Salary') }} + {{ __('Total Allowances') }} - {{ __('Total Deductions') }}

@endif
@endsection @push('page-scripts') @endpush