{{ $company->name }}

@if($company->contact_address != null)
{!! nl2br($company->contact_address) !!}
@endif @if($company->contact_email != null)
{{ $company->contact_email }}
@endif

Payslip: {{ \Carbon\Carbon::now()->month($payroll->month)->year($payroll->year)->format('F Y') }}

Name: {{ $payroll->employee->name }} Payslip #: {{ $payroll->id }}
Employee ID: {{ $payroll->employee->employee_id }} Joining Date: @if($payroll->employee->joining_date !== null) {{ $payroll->employee->joining_date->format('jS F, Y') }} @else - @endif
PAN Number: {{ $pan_number }} Bank Account: {{ $primary_bank }}
Department: @if($payroll->employee->department) {{ $payroll->employee->department->name }} @else - @endif Pay Date: @if($payroll->status === 'paid' && $payroll->pay_date !== null) {{ $payroll->pay_date->format('jS F, Y') }} @else - @endif
Designation: @if($payroll->employee->designation) {{ $payroll->employee->designation->name }} @else - @endif Unpaid Leaves: @if($unpaid) {{ $unpaid }} @else 0 @endif
  Overtime Days: @if($extra_pay_days) {{ $extra_pay_days }} @else 0 @endif
Earnings Deductions
@foreach($payroll->salary_group->salary_heads as $head) @if($head->type == 'earning') @endif @endforeach @if($payroll->extra_json !== null && isset($payroll->extra_json['earnings']) && count($payroll->extra_json['earnings']) > 0) @foreach($payroll->extra_json['earnings'] as $key => $earning) @endforeach @endif
Pay Type Amount
Basic Salary {{ $company->settings->currency_symbol }} {{ number_format($payroll->salary_json['basic_salary'], 2) }}
{{ $head->salary_head }} {{ $company->settings->currency_symbol }} {{ number_format($payroll->salary_json[$head->slug], 2) }}
   
Expense Claim {{ $company->settings->currency_symbol }} {{ $expense_claim }}
Overtime Pay {{ $company->settings->currency_symbol }} {{ $extra_pay }}
   
{{ ucwords(str_replace('_', ' ', $key)) }} {{ $company->settings->currency_symbol }} {{ number_format($earning, 2) }}
@foreach($payroll->salary_group->salary_heads as $head) @if($head->type == 'deduction') @endif @endforeach @if($payroll->extra_json !== null && isset($payroll->extra_json['deductions']) && count($payroll->extra_json['deductions']) > 0) @foreach($payroll->extra_json['deductions'] as $key => $deduction) @endforeach @endif
Pay Type Amount
{{ $head->salary_head }} {{ $company->settings->currency_symbol }} {{ number_format($payroll->salary_json[$head->slug], 2) }}
   
{{ ucwords(str_replace('_', ' ', $key)) }} {{ $company->settings->currency_symbol }} {{ number_format($deduction, 2) }}
Net Salary:    {{ $company->settings->currency_symbol }} {{ number_format($payroll->net_salary, 2) }}
@php $f = new NumberFormatter("en", NumberFormatter::SPELLOUT); @endphp
Net Salary (in words):    {{ ucwords($f->format($payroll->net_salary)) }} Only