@extends('layouts.app') @section('title', 'Warranty Report') @section('breadcrumb') @endsection @section('content') @include('reports.partials.date-filter')
@foreach(['active'=>['d1fae5','059669','shield-check'],'expired'=>['fee2e2','dc2626','shield-x'],'claimed'=>['ede9fe','7c3aed','shield-exclamation'],'void'=>['f1f5f9','64748b','shield-slash']] as $status => $c)
{{ $counts[$status] }}
{{ ucfirst($status) }}
@endforeach
@if($expiringSoon > 0)
{{ $expiringSoon }} warranties expiring within the next 30 days. View →
@endif
Warranties ({{ $warranties->total() }})
@forelse($warranties as $w) @php $daysLeft = $w->days_remaining; $sc=['active'=>'success','expired'=>'danger','claimed'=>'warning','void'=>'secondary']; @endphp @empty @endforelse
CustomerProductSerial No.StartEndDays LeftStatus
{{ $w->customer?->name ?? '—' }}
{{ $w->customer?->phone }}
{{ $w->saleItem?->productVariant?->product?->name ?? '—' }}
{{ $w->saleItem?->productVariant?->variant_name }}
@if($w->serialNumber) {{ $w->serialNumber->serial_no }} @elseNon-serial@endif {{ $w->start_date->format('d M Y') }} {{ $w->end_date->format('d M Y') }} @if($w->status === 'active') {{ $daysLeft }}d @else@endif {{ ucfirst($w->status) }}
No warranties in this period
@if($warranties->hasPages())@endif
@if($claimedItems->count())
Warranty Claims ({{ $claimedItems->count() }})
@foreach($claimedItems as $w) @endforeach
CustomerProductClaim Notes
{{ $w->customer?->name }} {{ $w->saleItem?->productVariant?->product?->name }} {{ $w->notes ?? '—' }}
@endif @endsection