@php $adminProfile = $admin ?? \App\Models\Admin::query()->find(session('admin_id')); $branchProfile = $branch ?? \App\Models\Branch::query()->find(session('branch_id')); $shopName = $branchProfile?->display_shop_name ?: ($adminProfile?->display_shop_name ?: ($adminProfile?->shop_name ?: ($adminProfile?->name ?? config('app.name', 'Easy IMS')))); $shopAddress = $branchProfile?->display_address ?: ($adminProfile?->display_address ?: __('Address not available')); $shopPhone = $branchProfile?->phone ?: ($adminProfile?->phone ?: __('N/A')); $shopLogo = !empty($adminProfile?->show_pos_receipt_logo) && !empty($adminProfile?->pos_receipt_logo) ? \App\Support\Branding::storageImageSrc($adminProfile->pos_receipt_logo) : null; $paidDate = $payroll->paid_date?->format('d M Y') ?? '-'; $periodLabel = optional($payroll->from_date)->format('d M Y') . ' - ' . optional($payroll->to_date)->format('d M Y'); $payrollMonthLabel = optional($payroll->from_date)->format('F Y') ?: ($payroll->payroll_month ?? '-'); $staffName = $payroll->staff?->display_name ?? __('Staff'); $designation = $payroll->staff?->designation ?? '-'; $phone = $payroll->staff?->phone ?? '-'; $address = $payroll->staff?->address ?? '-'; $statusLabel = ucfirst((string) $payroll->status); @endphp
{{ __('Print') }}
{{ __('Salary Slip') }}
@if($shopLogo) {{ $shopName }} @else
{{ __('No Logo Available') }}
@endif

{{ $shopName }}

{{ $shopAddress }}
{{ __('Contact No.') }} : {{ $shopPhone }}
{{ __('Salary Month') }} : {{ $payrollMonthLabel }}
{{ __("Employee's Name") }} : {{ $staffName }} {{ __('Designation') }} : {{ $designation }}
{{ __('Address') }} : {{ $address }} {{ __('Mobile No.') }} : {{ $phone }}
{{ __('Period') }} : {{ $periodLabel }} {{ __('Paid Date') }} : {{ $paidDate }}
{{ __('Total Present Days') }} : {{ number_format((int) $payroll->present_days) }} {{ __('Monthly Salary') }} : Rs. {{ number_format((float) $payroll->monthly_salary, 2) }}
{{ __('Payable Salary') }} : Rs. {{ number_format((float) $payroll->payable_salary, 2) }} {{ __('Deduct Payment') }} : Rs. {{ number_format(max((float) $payroll->payable_salary - (float) $payroll->paid_amount, 0), 2) }}
{{ __('Paid Amount') }} : Rs. {{ number_format((float) $payroll->paid_amount, 2) }} {{ __('Pay From Account') }} : {{ $payroll->account?->account_name ?? __('Account not recorded') }}
@if($payroll->note)

{{ __('Note') }}: {{ $payroll->note }}

@endif @if($staffPayments->isNotEmpty())
{{ __('Expenses & Advances Already Paid to Staff') }}

{{ __('For reference only; not automatically deducted from salary.') }}

@foreach($staffPayments as $payment) @endforeach
{{ __('Date') }}{{ __('Type') }}{{ __('Account') }}{{ __('Amount') }}{{ __('Status') }}
{{ $payment->payment_date->format('d-m-Y') }} {{ $payment->type === 'advance' ? __('Advance') : __('Expense') }} {{ $payment->account?->account_name ?? '-' }} Rs. {{ number_format($payment->amount, 2) }} {{ __('Paid') }}
@endif
{{ __('Employee Signatory') }}
{{ __('Authorised Signatory') }}