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

{{ $store->store_name }} — Notas de Credito

@if(session('success'))
{{ session('success') }}
@endif
@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->codigo_generacion ?? '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
{{-- Descargar DTE --}}
@csrf
@endif