@php $logo = \App\Models\Utility::get_file('uploads/logo'); $company_logo = \App\Models\Utility::GetLogo(); $creatorId = \Auth::user()->creatorId(); $setting = DB::table('settings')->where('created_by', $creatorId)->pluck('value', 'name')->toArray(); $settings_data = \App\Models\Utility::settingsById($creatorId); @endphp @php $addressParts = array_filter([ $settings_data['company_address'] ?? '', $settings_data['company_city'] ?? '', $settings_data['company_state'] ?? '', $settings_data['company_zipcode'] ?? '', ]); @endphp @php $salaryMonthParts = explode('-', $payslip->salary_month); $year = $salaryMonthParts[0]; $month = $salaryMonthParts[1]; // Optional: Convert month number to name $monthNames = [ '01' => 'January', '02' => 'February', '03' => 'March', '04' => 'April', '05' => 'May', '06' => 'June', '07' => 'July', '08' => 'August', '09' => 'September', '10' => 'October', '11' => 'November', '12' => 'December' ]; $monthName = $monthNames[$month]; @endphp
{{ $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 }}
| {{__('Earning')}} | {{__('Full')}} | {{__('Actual')}} | {{__('Deduction')}} | {{__('Actual')}} | |||||
|---|---|---|---|---|---|---|---|---|---|
| {{ $earning['title'] }} | {{ \Auth::user()->priceFormat($earning['full']) }} | {{ \Auth::user()->priceFormat($earning['actual']) }} | @else@endif {{-- Deductions Column --}} @if ($i < count($all_deductions)) @php $deduction = $all_deductions[$i]; @endphp | {{ $deduction['title'] }} | {{ \Auth::user()->priceFormat($deduction['amount']) }} | @else@endif | |||
| {{ __('Total Earnings') }} | {{ \Auth::user()->priceFormat($totalFullEarning) }} | {{ \Auth::user()->priceFormat($totalActualEarning) }} | {{ __('Total Deduction') }} | {{ \Auth::user()->priceFormat(round($totalDeduction)) }} |
{{ __('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') }}