@extends('layouts.staff') @section('title', 'Penalty History') @section('content')
Total Penalties
Unpaid Penalties
Total Outstanding
Complete history of penalties for this customer
| Date | Type | Reason | Booking | Amount | Receipt | Status | Action |
|---|---|---|---|---|---|---|---|
|
{{ \Carbon\Carbon::parse($penalty->date_imposed)->format('d M Y') }} {{ \Carbon\Carbon::parse($penalty->date_imposed)->format('h:i A') }} |
{{-- TYPE --}}
@if($penalty->bookingID) Booking @else Customer @endif | {{-- REASON --}}
{{ $penalty->reason ?? 'N/A' }} |
{{-- BOOKING --}}
@if($penalty->bookingID && $penalty->booking)
#{{ $penalty->bookingID }}
@if($penalty->booking->vehicle)
{{ $penalty->booking->vehicle->vehicleModel ?? 'N/A' }} @endif @else N/A @endif |
{{-- AMOUNT --}}
@php
$totalAmount = $penalty->amount ?? ($penalty->penaltyFees + $penalty->fuelSurcharge + $penalty->mileageSurcharge);
@endphp
RM {{ number_format($totalAmount, 2) }} @if($penalty->bookingID && ($penalty->fuelSurcharge > 0 || $penalty->mileageSurcharge > 0))@if($penalty->penaltyFees > 0)Penalty: RM{{ number_format($penalty->penaltyFees, 2) }}@endif @if($penalty->fuelSurcharge > 0) | Fuel: RM{{ number_format($penalty->fuelSurcharge, 2) }}@endif @if($penalty->mileageSurcharge > 0) | Mileage: RM{{ number_format($penalty->mileageSurcharge, 2) }}@endif @endif |
{{-- RECEIPT COLUMN --}}
@if($penalty->payment_proof) View @else No Upload @endif | {{-- STATUS --}}@if($penalty->penaltyStatus == 'Paid' || $penalty->status == 'Paid') Paid @elseif($penalty->penaltyStatus == 'Pending Verification') Verify @else Unpaid @endif | {{-- ACTION COLUMN (VERIFY BUTTON) --}}
@if($penalty->penaltyStatus == 'Pending Verification')
@elseif($penalty->penaltyStatus == 'Paid' || $penalty->status == 'Paid')
Verified
@else
-
@endif
|
This customer has no penalty records.