@extends('includes/layout') @section('main-page-content')
| Date | Type | Reason | Amount |
|---|---|---|---|
| {{ date('d M Y', strtotime($fine->date)) }} | @if ($fine->type == 0) Fine @else Bonus @endif | {{ $fine->fine_reason }} | {{ $fine->type == 0 ? '-' : '+' }}PKR {{ number_format($fine->fine_amount, 0) }} |
| Net Impact | {{ $totalBonuses - $totalFines >= 0 ? '+' : '' }}PKR {{ number_format($totalBonuses - $totalFines, 0) }} | ||
| Date | Check In | Check Out | Working Hours | Status |
|---|---|---|---|---|
| {{ date('d M Y', strtotime($row['date'])) }} | {{ $row['check_in'] ? date('H:i', strtotime($row['check_in'])) : 'N/A' }} | {{ $row['check_out'] ? date('H:i', strtotime($row['check_out'])) : 'N/A' }} | @if (!is_null($row['working_hours'])) {{ floor($row['working_hours'] / 60) }}h {{ $row['working_hours'] % 60 }}m @else N/A @endif |
@if (!empty($row['leave']))
@php
$leaveStatus = $row['leave']['status'] ?? null; // 1=Approved (paid), 4=Approved Unpaid, 2=Rejected
$badgeClass = 'badge-info';
if ($leaveStatus == 1 && ($row['leave']['is_paid'] ?? false)) {
$badgeClass = 'badge-primary';
} elseif ($leaveStatus == 4 ) {
$badgeClass = 'badge-info';
} elseif ($leaveStatus == 2) {
$badgeClass = 'badge-danger';
}
@endphp
Leave ({{ $row['leave']['type'] ?? 'Leave' }}) - {{ ($leaveStatus == 2) ? 'Rejected' : (($row['leave']['is_paid'] ?? false) ? 'Paid' : 'Unpaid') }}
@if ($leaveStatus == 2 && $row['check_in'] && $row['check_out'])
Present @endif @elseif ($row['check_in'] && $row['check_out']) Present @elseif($row['check_in']) Incomplete @else Absent @endif |
| Date | Start Time | End Time | Duration | Reason |
|---|---|---|---|---|
| {{ date('d M Y', strtotime($overtime->date)) }} | {{ $overtime->check_in ? date('H:i', strtotime($overtime->check_in)) : 'N/A' }} | {{ $overtime->check_out ? date('H:i', strtotime($overtime->check_out)) : 'N/A' }} | @if ($overtime->working_hours) {{ floor($overtime->working_hours / 60) }}h {{ $overtime->working_hours % 60 }}m @else N/A @endif | {{ $overtime->description ?? 'No reason provided' }} |