{{__('Payslip')}}

{{ $settings_data['company_name'] ?? 'Company Name' }}

@if(empty($settings_data['company_name']))

Update company details from settings

@endif

{{ implode(' , ', $addressParts) }}

Payslip for the month of {{ $monthName }} {{ $year }}

  • {{__('Name')}} : {{$employee->name}}
  • {{ __('Join Date') }} : {{ \App\Models\Utility::formatDate($employee->company_doj) }}
  • {{__('Location')}} : {{$employee->branch_location}}
  • {{__('Effective Working Days')}} :{{$payslip->working_days}}
  • {{__('Days In Month')}} : {{$payslip->days_in_month}}
  • {{__('Pan No')}}:{{$employee->pan_number}}
  • {{__('PF UAN')}} : {{$employee->pf_number}}
  • {{__('ESI NO')}} : {{$employee->esi_number}}
  • {{__('LOP')}} : {{$payslip->lop}}
  • {{__('Bank Details')}} : {{ $employee->account_number }}
    {{ $employee->bank_identifier_code }} {{ $employee->bank_name }}
@php $allowances = json_decode($payslip->allowance ?? '[]'); $commissions = json_decode($payslip->commission ?? '[]'); $overtimes = json_decode($payslip->overtime ?? '[]'); $other_payments = json_decode($payslip->other_payment ?? '[]'); $deductions = json_decode($payslip->saturation_deduction ?? '[]'); $loans = json_decode($payslip->loan ?? '[]'); // Combine all earnings into one array $all_earnings = []; foreach ($allowances as $item) { $full = $item->type == 'percentage' ? ($item->amount * $payslip->basic_salary) / 100 : $item->amount; $actual = $item->type == 'percentage' ? ($item->actual_amount * $payslip->basic_salary) / 100 : $item->actual_amount; $all_earnings[] = ['title' => $item->title, 'full' => $full, 'actual' => $actual]; } foreach ($commissions as $item) { $amount = $item->type == 'percentage' ? ($item->amount * $payslip->basic_salary) / 100 : $item->amount; $all_earnings[] = ['title' => $item->title, 'full' => $amount, 'actual' => $amount]; } foreach ($other_payments as $item) { $amount = $item->type == 'percentage' ? ($item->amount * $payslip->basic_salary) / 100 : $item->amount; $all_earnings[] = ['title' => $item->title, 'full' => $amount, 'actual' => $amount]; } foreach ($overtimes as $ot) { $amount = ($ot->number_of_days ?? 0) * ($ot->hours ?? 0) * ($ot->rate ?? 0); $all_earnings[] = ['title' => $ot->title, 'full' => $amount, 'actual' => $amount]; } // Combine all deductions into one array (excluding LOP with 0 amount) $all_deductions = []; foreach ($deductions as $deduct) { $amount = $deduct->type == 'percentage' ? ($deduct->amount * $payslip->basic_salary) / 100 : $deduct->amount; if ($amount > 0) { $all_deductions[] = ['title' => $deduct->title, 'amount' => $amount]; } } foreach ($loans as $loan) { $amount = $loan->amount ?? 0; if ($amount > 0) { $all_deductions[] = ['title' => $loan->title ?? 'Loan', 'amount' => $amount]; } } $totalFullEarning = 0; $totalActualEarning = 0; $totalDeduction = 0; // Calculate totals for earnings foreach ($all_earnings as $earning) { $totalFullEarning += $earning['full']; $totalActualEarning += $earning['actual']; } // Calculate total deductions foreach ($all_deductions as $deduction) { $totalDeduction += $deduction['amount']; } // Determine the maximum number of rows needed $maxRows = max(count($all_earnings), count($all_deductions)); @endphp
@for ($i = 0; $i < $maxRows; $i++) {{-- Earnings Column --}} @if ($i < count($all_earnings)) @php $earning = $all_earnings[$i]; @endphp @else @endif {{-- Deductions Column --}} @if ($i < count($all_deductions)) @php $deduction = $all_deductions[$i]; @endphp @else @endif @endfor
{{__('Earning')}} {{__('Full')}} {{__('Actual')}} {{__('Deduction')}} {{__('Actual')}}
{{ $earning['title'] }} {{ \Auth::user()->priceFormat($earning['full']) }} {{ \Auth::user()->priceFormat($earning['actual']) }}{{ $deduction['title'] }} {{ \Auth::user()->priceFormat($deduction['amount']) }}
{{ __('Total Earnings') }} {{ \Auth::user()->priceFormat($totalFullEarning) }} {{ \Auth::user()->priceFormat($totalActualEarning) }} {{ __('Total Deduction') }} {{ \Auth::user()->priceFormat($totalDeduction) }}
@php $netSalary = round($payslip->net_payble); $netPay = max(0, round($payslip->net_payble)); $fmt = new \NumberFormatter('en_IN', \NumberFormatter::SPELLOUT); $inWords = ucfirst($fmt->format($netPay)) . ' rupees only'; @endphp

{{ __('Net Pay for the Month (Total Earning - Total Deduction):') }} {{ \Auth::user()->priceFormat($netSalary) }}
( {{ $inWords }} )

{{ __('THIS IS A SYSTEM GENERATED PAYSLIP AND DOES NOT REQUIRE SIGNATURE') }}

@if ($message = Session::get('success')) @endif @if ($message = Session::get('error')) @endif @if ($get_cookie['enable_cookie'] == 'on') @include('layouts.cookie_consent') @endif