@extends('layouts.app') @section('title', $payroll->name) @section('page-title','Payroll') @section('content') {{-- Summary cards --}}
{{ $records->total() }}
Employees
${{ number_format($totals->total_gross ?? 0) }}
Total Gross
${{ number_format($totals->total_net ?? 0) }}
Total Net Pay
${{ number_format($totals->total_deductions ?? 0) }}
Total Deductions
{{ \Carbon\Carbon::parse($payroll->start_date)->format('M j') }} – {{ \Carbon\Carbon::parse($payroll->end_date)->format('M j, Y') }} Payment: {{ \Carbon\Carbon::parse($payroll->payment_date)->format('M j, Y') }}
Payroll Records
@forelse($records as $rec) @empty @endforelse
Employee Department Basic Salary Gross Pay Deductions Net Pay Payslip
{{ strtoupper(substr($rec->employee->first_name??'?',0,1)) }}
{{ $rec->employee->full_name ?? '—' }}
{{ $rec->employee->position ?? '' }}
{{ $rec->employee->department->name ?? '—' }} ${{ number_format($rec->basic_salary, 2) }} ${{ number_format($rec->gross_pay, 2) }} -${{ number_format($rec->total_deductions, 2) }} ${{ number_format($rec->net_pay, 2) }}
No records found
@if($records->hasPages())
{{ $records->links('pagination::bootstrap-5') }}
@endif
@endsection