@extends('layouts/layoutMaster') @section('title', 'Salary Slip') @section('vendor-style') @vite('resources/assets/vendor/libs/flatpickr/flatpickr.scss') @endsection @section('page-style') @vite('resources/assets/vendor/scss/pages/app-invoice.scss') @endsection @section('vendor-script') @vite([ 'resources/assets/vendor/libs/moment/moment.js', 'resources/assets/vendor/libs/flatpickr/flatpickr.js', 'resources/assets/vendor/libs/cleavejs/cleave.js', 'resources/assets/vendor/libs/cleavejs/cleave-phone.js' ]) @endsection {{-- @section('page-script') @vite([ 'resources/assets/js/offcanvas-add-payment.js', 'resources/assets/js/offcanvas-send-invoice.js' ]) @endsection --}} @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: {{ $dataSalary->year }} {{ $monthName }}

Rs.{{ number_format($dataSalary->net_salary,2) }}
Total Net Pay
@php $year = $dataSalary->year; // The specific year $month = $dataSalary->month; // The specific month (e.g., 1 for January, 2 for February) $daysInMonth = \Carbon\Carbon::createFromDate($year, $month)->daysInMonth; @endphp {{-- --}}
Paid Days : {{ $daysInMonth }}
LOP Days : 3
@php $totalGrossEarnings = $dataSalary->basic_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($dataSalary->basic_salary,2) }}
{{ $allounce->component_name }}{{ number_format($amount, 2) }}{{ number_format($allounce->charge, 2) }}
 
@php $totalDeducations = 0; @endphp @foreach ($deducations as $deduct) @if($deduct->status != 'Amount') @php $amount = ($dataSalary->basic_salary * $deduct->charge) / 100; $totalDeducations += $amount; @endphp @else @php $totalDeducations += $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($totalDeducations, 2) }}

Total Net Payable
Gross Earnings - Total Deductions
Rs.{{ number_format($dataSalary->net_salary,2) }}

{{-- Note: It was a pleasure working with you and your team. We hope you will keep us in mind for future freelance projects. Thank You! --}}
{{-- --}} {{-- --}}
@include('_partials/_offcanvas/offcanvas-send-invoice') @include('_partials/_offcanvas/offcanvas-add-payment') @endsection