@extends('layouts.admin') @section('content')

Notas de Crédito

Nueva Nota
@if(session('success'))
{{ session('success') }}
@endif
Hoy PDF
@if($creditNotes->isEmpty())

No hay notas de crédito registradas.

@else @foreach($creditNotes as $creditNote) @endforeach
Código Generación Cliente Venta Relacionada Fecha Total Estado DTE Acciones
{{ $creditNote->codigo_generacion ?? '—' }} {{ $creditNote->customer->nombre ?? 'Sin cliente' }} {{ $creditNote->sale->invoice_number ?? 'N/A' }} {{ \Carbon\Carbon::parse($creditNote->credit_note_date)->format('d/m/Y') }} ${{ number_format($creditNote->total_amount, 2) }} @php $statusClass = 'badge-pendiente'; if ($creditNote->dte_status === 'PROCESADO') $statusClass = 'badge-procesado'; if ($creditNote->dte_status === 'RECHAZADO') $statusClass = 'badge-rechazado'; @endphp @if($creditNote->dte_status === null || $creditNote->dte_status === 'PENDIENTE')
@csrf
@else {{ $creditNote->dte_status }} @endif
Ver @php $canDelete = $creditNote->created_at->greaterThan(now()->subHours(24)); @endphp @if ($canDelete)
@csrf @method('DELETE')
@else @endif
@endif
@endsection