@extends('layouts.admin') @section('title', 'Credit Notes') @section('page-title', 'Credit Notes') @section('breadcrumbs') Credit Notes @endsection @section('content')
@if(session('success'))
{{ session('success') }}
@endif @if(session('info'))
{{ session('info') }}
@endif

Credit Notes

@if(request('search')) @endif
add New Credit Note
@if(request('per_page')) @endif @if(request('search')) close @endif
@forelse($creditNotes as $index => $creditNote) @empty @endforelse
# Credit note # Invoice Customer Date Amount Status Actions
{{ ($creditNotes->currentPage() - 1) * $creditNotes->perPage() + $index + 1 }} {{ $creditNote->credit_note_number }} @if($creditNote->invoice) {{ $creditNote->invoice->invoice_number }} @else @endif {{ $creditNote->customer?->name ?? $creditNote->invoice?->customer?->name ?? '—' }} {{ $creditNote->credit_note_date?->format('M d, Y') ?? '—' }} {{ \App\Models\Currency::formatAmount((float) $creditNote->total, $creditNote->currency ?? null) }} @php $status = $creditNote->status ?? 'pending'; $statusClasses = [ 'pending' => 'bg-yellow-100 text-yellow-800', 'approved' => 'bg-green-100 text-green-800', 'rejected' => 'bg-red-100 text-red-800', ]; @endphp {{ ucfirst($status) }}
note_add

No credit notes found

@if($creditNotes->hasPages())

Showing {{ $creditNotes->firstItem() }} to {{ $creditNotes->lastItem() }} of {{ $creditNotes->total() }} entries

@if($creditNotes->onFirstPage()) @else < @endif @php $currentPage = $creditNotes->currentPage(); $lastPage = $creditNotes->lastPage(); $startPage = max(1, $currentPage - 1); $endPage = min($lastPage, $currentPage + 1); @endphp @if($startPage > 1) 1 @if($startPage > 2) ... @endif @endif @for($page = $startPage; $page <= $endPage; $page++) {{ $page }} @endfor @if($endPage < $lastPage) @if($endPage < $lastPage - 1) ... @endif {{ $lastPage }} @endif @if($creditNotes->hasMorePages()) > @else @endif
@elseif($creditNotes->total() > 0)

Showing {{ $creditNotes->total() }} {{ Str::plural('entry', $creditNotes->total()) }}

@endif
@push('scripts') @endpush @endsection