@extends('layouts.app') @section('content')
Notas de Crédito

Nota de Crédito {{ $cn->full_number }} @php $color = $cn->sunat_status === 'ACCEPTED' ? 'success' : ($cn->sunat_status === 'OBSERVED' ? 'warning' : ($cn->sunat_status === 'PENDING' ? 'secondary' : 'danger')); @endphp {{ $cn->sunat_status }}

@if($cn->xml_path) XML @endif @if($cn->cdr_path) CDR @endif @if(in_array($cn->sunat_status, ['PENDING','ERROR','REJECTED']))
@csrf
@endif
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
Documento afectado
{{ $cn->order?->document_type }} {{ $cn->order?->full_number }}
Motivo (Catálogo 09)
{{ $cn->reason_code }} — {{ $cn->reason_description }}
Subtotal
S/ {{ number_format($cn->subtotal, 2) }}
IGV
S/ {{ number_format($cn->igv, 2) }}
Total
S/ {{ number_format($cn->total, 2) }}

Trazabilidad SUNAT
Estado:{{ $cn->sunat_status }}
Código:{{ $cn->sunat_code ?? '—' }}
Descripción:{{ $cn->sunat_description ?? '—' }}
Hash (DigestValue):{{ $cn->hash ?? '—' }}
Enviado:{{ $cn->sent_at?->format('d/m/Y H:i:s') ?? '—' }}
XML:{{ $cn->xml_path ?? '—' }}
CDR:{{ $cn->cdr_path ?? '—' }}
@endsection