@extends('layouts/layoutMaster') @section('title', 'Salary Slip') @section('content')
User Profile Photo {{-- --}} {{ $company->company_name }}

{{ $company->billing_address }}

{{--
Salary Slip
--}}
@php $months = [ 1 => 'Jan', 2 => 'Feb', 3 => 'Mar', 4 => 'Apr', 5 => 'May', 6 => 'Jun', 7 => 'Jul', 8 => 'Aug', 9 => 'Sep', 10 => 'Oct', 11 => 'Nov', 12 => 'Dec' ]; $monthName = $months[$dataSalary->month] ?? 'Invalid Month'; @endphp Payslip for the month
{{ $dataSalary->year }} {{ $monthName }}
Employee Summary
Employee name:{{ $employee->name }}
Employee no.:{{ $employee->phone_no }}
Employee email:{{ $employee->email }}
Pay Period:{{ $monthName }} {{ $dataSalary->year }}
Rs.{{ number_format($dataSalary->net_salary,2) }}
Total Net Pay
@php $year = $dataSalary->year; $month = $dataSalary->month; $daysInMonth = \Carbon\Carbon::createFromDate($year, $month)->daysInMonth; @endphp
Paid Days : {{ $daysInMonth }}
@php $totalGrossEarnings = $employee->salary; @endphp @foreach ($allounces as $allounce) @if($allounce->status != 'Amount') @php $amount = ($dataSalary->basic_salary * $allounce->charge)/100; $totalGrossEarnings += $amount; @endphp @else @php $totalGrossEarnings += $allounce->charge; @endphp @endif @endforeach @if(count($allounces) < count($deducations)) @for($i = 0; $i < (count($deducations) - count($allounces)); $i++) @endfor @endif
EARNINGS AMOUNT
Basic {{ number_format($employee->salary,2) }}
{{ $allounce->component_name }}{{ number_format($amount,2) }}{{ number_format($allounce->charge,2) }}
 
@php $totalDeductions = 0; @endphp @foreach ($deducations as $deduct) @if($deduct->status != 'Amount') @php $amount = ($dataSalary->basic_salary * $deduct->charge)/100; $totalDeductions += $amount; @endphp @else @php $totalDeductions += $deduct->charge; @endphp @endif @endforeach @if(count($deducations) < count($allounces)) @for($i = 0; $i < (count($allounces) - count($deducations)); $i++) @endfor @endif
DEDUCTIONS AMOUNT
{{ $deduct->component_name }}{{ number_format($amount,2) }}{{ number_format($deduct->charge,2) }}
 
Gross Earnings {{ number_format($totalGrossEarnings, 2) }}
Total Deductions {{ number_format($totalDeductions, 2) }}
Total Net Payable
Gross Earnings - Total Deductions
Rs.{{ number_format($dataSalary->net_salary,2) }}

{{--
Total Net Payable
Gross Earnings - Total Deductions --}}
Amount in Words: {{-- {{ $dataSalary->net_salary }} --}} {{ convertNumberToWords($dataSalary->net_salary) }}
@endsection