Facturas

@include('facturacion.extras.crearFacturaModa')
Documentos
@foreach ($facturas as $key => $item) anulada) class="table-danger" @endif> @endforeach
# Cliente DTE Tipo Estado Monto Fecha DTE Estado DTE Acciones
{{ $key + 1 }} {{ $item->cliente->mh_nombre_comercial }} {{ $item->dte?->codigo_control }} @if ($item->tipoDocumento->codigo == '03') CCF @else {{ $item->tipoDocumento->valor }} @endif @if ($item->pre_factura)
PRE FACTURA @endif
@if ($item->estado_id == 2) {{ $item->estado->estado }} @elseif($item->estado_id == 1) {{ $item->estado->estado }} @elseif($item->estado_id == 3) {{ $item->estado->estado }} @endif {{ number_format($item->total, 2) }} {{ $item->dte?->fecha_recibido ?? 'NO EMITIDO' }} @if ($item->dte?->estado) PROCESADO @if ($item->dte?->anulado) INVALIDADO @endif @elseif($item->dte?->estado == false) NO PROCESADO @if ($item->dte?->anulado) INVALIDADO @endif @elseif($item->dte == null) NO EMITIDO @if ($item->dte?->anulado) INVALIDADO @endif @endif @if ($item->estado_id == 1)
@method('DELETE') @csrf
@endif @if (!$item->anulada && $item->estado_id == 2) @php $invalidar = true; if ($item->tipo_documento == "03" && $item->hasNotaCredito($item->id) > 0) $invalidar = false; if ($item->tipo_documento == "05") $invalidar = false; @endphp @if ($invalidar)
@method('DELETE') @csrf
@endif @if ($item->tipo_documento == '03') @endif @endif