{{ $client->client->agency->name }}
{{ $client->department_name }} Summary Payroll Report (Batch ID: {{ $batchCode->id }})
Period Cover: {{ \Carbon\Carbon::parse($batchCode->pay_period_start)->format('F j, Y') }} to {{ \Carbon\Carbon::parse($batchCode->pay_period_end)->format('F j, Y') }}
Employee | Rate | Earnings | Deductions | Net Pay |
---|---|---|---|---|
{{ $payroll->employee->last_name }}, {{ $payroll->employee->first_name }} {{ $payroll->employee->middle_name ? $payroll->employee->middle_name[0] . '.' : '' }} | {{ $payroll->rate }} | @php $daysWorked = $payroll->days_worked > 0 ? $payroll->days_worked : $payroll->days_worked_withdeduction; $pay = optional($payroll)->rate * $daysWorked; $constantearning = App\Models\ConstantDeduction::where('status', 1) ->where('payroll_id', $payroll->id) ->sum('E_Amount'); $constantdeduction = App\Models\ConstantDeduction::whereNull('status') ->where('payroll_id', $payroll->id) ->sum('E_Amount'); $deductionsb = App\Models\Benefits::where('payroll_id', $payroll->id)->sum( 'employee_share', ); $others = App\Models\OthersForPayroll::where('payroll_id', $payroll->id)->sum( 'amount', ) ?? 0; $netpay = $pay + $constantearning + $others - $deductionsb - $constantdeduction - $payroll->deductions; @endphp {{ $constantearning + $pay + $others }} | {{ $constantdeduction + $deductionsb }} | {{ number_format($netpay, 2) }} |
Days -{{ $daysWorked }} Basic salary - {{ number_format($pay, 2) }} minutes - {{ $payroll->total_late_hours }} Late Deduction - {{ $payroll->deductions }} |
@foreach ($payroll->trxConstantDeductions as $deduction)
{{ $deduction->trxConstant->trxCode->description ?? 'N/A' }}: {{ $deduction->E_Amount }} @endforeach |
@foreach ($payroll->trxLoanDeductions as $loanDeduction)
{{ $loanDeduction->trxLoan->trxCode->description ?? 'N/A' }}: {{ $loanDeduction->Amount }} @endforeach |
@foreach ($payroll->benefits as $benefit)
{{ $benefit->type }}: {{ $benefit->employee_share }} @endforeach @foreach ($payroll->othersForPayroll as $otherDeduction){{ $otherDeduction->name }}: {{ $otherDeduction->amount }} @endforeach |
Trx Name | Earnings | Deduction |
---|---|---|
Basic Salary - {{ $days }} | P{{ number_format($basicSalaryTotal, 2) }} | |
{{ $name }} | P{{ number_format($amount, 2) }} | |
{{ $type }} | P{{ number_format($totalShare, 2) }} | |
{{ $group['description'] }} | @if ($group['earnings'] > 0) P{{ number_format($group['earnings'], 2) }} @php $totalEarnings += $group['earnings']; @endphp @endif | @if ($group['deductions'] > 0) P{{ number_format($group['deductions'], 2) }} @php $totalDeductions += $group['deductions']; @endphp @endif |
{{ optional(App\Models\TrxCode::find($loan->trxLoan->group_code_id))->description }} | P{{ number_format($loan->Amount, 2) }} @php $totalDeductions += $loan->Amount; @endphp | |
Total | P{{ number_format($totalEarnings, 2) }} | P{{ number_format($totalDeductions, 2) }} |