@extends('layouts.user') @section('title', __('Employee_Bonus.bonus_details')) @section('page_title', __('Employee_Bonus.bonus_details')) @section('breadcrumb', __('Employee_Bonus.hr_payroll')) @section('content') @php $bonusTypeLabel = match($bonus->bonus_type) { 'eid_bonus' => __('Employee_Bonus.eid_bonus'), 'festival_bonus' => __('Employee_Bonus.festival_bonus'), 'performance_bonus' => __('Employee_Bonus.performance_bonus'), 'incentive_bonus' => __('Employee_Bonus.incentive_bonus'), 'yearly_bonus' => __('Employee_Bonus.yearly_bonus'), 'other' => __('Employee_Bonus.other'), default => ucfirst(str_replace('_', ' ', (string) $bonus->bonus_type)), }; @endphp
{{-- Header --}}

{{ $bonus->title }}

{{ $bonus->employee?->name ?? __('Employee_Bonus.dash') }} @if($bonus->employee?->employee_code) ({{ $bonus->employee->employee_code }}) @endif

@if($bonus->status === 'paid') {{ __('Employee_Bonus.paid') }} @else {{ __('Employee_Bonus.unpaid') }} @endif
{{-- Info Grid --}}
{{ __('Employee_Bonus.bonus_type') }}
{{ $bonusTypeLabel }}
{{ __('Employee_Bonus.amount') }}
৳ {{ number_format((float) $bonus->amount, 2) }}
{{ __('Employee_Bonus.bonus_date') }}
{{ $bonus->bonus_date?->format('d M Y') ?? __('Employee_Bonus.dash') }}
{{ __('Employee_Bonus.paid_at') }}
{{ $bonus->paid_at ? $bonus->paid_at->format('d M Y h:i A') : __('Employee_Bonus.dash') }}
{{ __('Employee_Bonus.account') }}
{{ $bonus->account?->name ?? __('Employee_Bonus.dash') }}
@if($bonus->account)
@if(!empty($bonus->account->type)) {{ ucfirst($bonus->account->type) }} @endif @if(!empty($bonus->account->account_number)) • {{ $bonus->account->account_number }} @endif
@endif
{{ __('Employee_Bonus.payment_method') }}
{{ $bonus->payment_method ? ucfirst($bonus->payment_method) : __('Employee_Bonus.dash') }}
{{ __('Employee_Bonus.reference_no') }}
{{ $bonus->reference_no ?: __('Employee_Bonus.dash') }}
{{ __('Employee_Bonus.note') }}
{{ $bonus->note ?: __('Employee_Bonus.dash') }}
{{-- Actions --}}
@if($bonus->status === 'unpaid') {{ __('Employee_Bonus.edit') }} {{ __('Employee_Bonus.pay_bonus') }} @endif {{ __('Employee_Bonus.back') }}
@endsection