@extends('layouts.master') @push('css') @endpush @section('content')

Payroll History Report

{{-- ── Filter Form ── --}}
@if($reportData && count($reportData['departments'])) Print @endif

@if($reportData !== null) @if(empty($reportData['departments']))
No records found.
@else {{-- ── Summary Cards ── --}}
Total Gross Salary {{ number_format($reportData['grandGross'], 0) }}
Total Deductions {{ number_format($reportData['grandDeductions'], 0) }}
Total Net Payable {{ number_format($reportData['grandNet'], 0) }}
Total Absent Days {{ $reportData['grandAbsentDays'] }}
{{-- ── Payroll Table ── --}}
{{-- Report Header --}}
M.D.S
Payroll History Report
From: {{ \Carbon\Carbon::parse($fromDate)->format('d/m/y') }}, Till: {{ \Carbon\Carbon::parse($toDate)->format('d/m/y') }} @if($selectedEmployee) , Employee: {{ $selectedEmployee->first_name }} {{ $selectedEmployee->last_name }} @endif @if($selectedDepartment) , Dept: {{ $selectedDepartment->name }} @endif
@foreach($reportData['departments'] as $deptName => $deptData) {{-- Department Group Header --}} @foreach($deptData['rows'] as $row) @endforeach {{-- Sub Total --}} @endforeach {{-- Grand Total --}}
Employee EmpID Salary
Type
From To Salary OT
Hours
Over Time Award Absent
Days
Absent
Amount
Other
Ded.
Advance
Ded.
Loan
Ded.
Net Payable
{{ $deptName }}
{{ $row['employee_name'] }} {{ $row['employee_no'] }} {{ $row['salary_type'] }} {{ $row['from'] }} {{ $row['to'] }} {{ $row['salary'] ? number_format($row['salary'], 0) : '' }} {{ $row['ot_hours'] ?: '' }} {{ $row['overtime'] ? number_format($row['overtime'], 0) : '' }} {{ $row['award'] ? number_format($row['award'], 0) : '' }} {{ $row['absent_days'] ?: '' }} {{ $row['absent_amount'] ? number_format($row['absent_amount'], 0) : '' }} {{ $row['other_ded'] ? number_format($row['other_ded'], 0) : '' }} {{ $row['advance_ded'] ? number_format($row['advance_ded'], 0) : '' }} {{ $row['loan_ded'] ? number_format($row['loan_ded'], 0) : '' }} {{ $row['net_payable'] ? number_format($row['net_payable'], 0) : '' }}
Sub Total = > {{ number_format($deptData['subSalary'], 0) }} {{ $deptData['subOtHours'] ?: '' }} {{ $deptData['subOvertime'] ? number_format($deptData['subOvertime'], 0) : '' }} {{ $deptData['subAward'] ? number_format($deptData['subAward'], 0) : '' }} {{ $deptData['subAbsentDays'] ?: '' }} {{ $deptData['subAbsentAmount'] ? number_format($deptData['subAbsentAmount'], 0) : '' }} {{ $deptData['subOtherDed'] ? number_format($deptData['subOtherDed'], 0) : '' }} {{ $deptData['subAdvanceDed'] ? number_format($deptData['subAdvanceDed'], 0) : '' }} {{ $deptData['subLoanDed'] ? number_format($deptData['subLoanDed'], 0) : '' }} {{ number_format($deptData['subNet'], 0) }}
Grand Total = > {{ number_format($reportData['grandGross'], 0) }} {{ $reportData['grandOtHours'] ?: '' }} {{ $reportData['grandOvertime'] ? number_format($reportData['grandOvertime'], 0) : '' }} {{ $reportData['grandAward'] ? number_format($reportData['grandAward'], 0) : '' }} {{ $reportData['grandAbsentDays'] ?: '' }} {{ $reportData['grandAbsentAmount'] ? number_format($reportData['grandAbsentAmount'], 0) : '' }} {{ $reportData['grandOtherDed'] ? number_format($reportData['grandOtherDed'], 0) : '' }} {{ $reportData['grandAdvanceDed'] ? number_format($reportData['grandAdvanceDed'], 0) : '' }} {{ $reportData['grandLoanDed'] ? number_format($reportData['grandLoanDed'], 0) : '' }} {{ number_format($reportData['grandNet'], 0) }}
{{-- .payroll-wrap --}} @endif @endif
@endsection