@extends('base') @section('titulo') Facturacion @endsection @section('content') @include('sessions') @if ($errors->any())
@endif @foreach ($files as $key => $file) @php $montoDeuda = $file->completa->detalles()->sum('cantidad'); @endphp {{-- $qtyPendientesFacturar[$loop->index] > 0 --}} {{-- @if($montoDeuda > $file->completa->detalles()->sum('monto_facturado')) @else @endif --}} @endforeach
# # Coti. Fecha Estado Cliente Encargado Pendientes Acciones
{{ $loop->iteration }} {{ $file->completa->inicial->codigo_cotizacion }} / {{ $file->file_code }} {{ date('d/m/Y',strtotime($file->created_at))}} {{ $file->file_status }} {{ $file->completa->inicial->cliente->nombre_cliente }} Vendedor: {{ $file->completa->inicial->creada_por }}
Operativo: {{ $file->completa->operativoC->name }}
@if ($detalle[$key]['inicio_facturar'] == false) NO HA INICIADO FACTURACION @else Por facturar: {{ number_format($detalle[$key]['por_facturar'],2) }}
Total a Facturar {{ number_format($detalle[$key]['facturado'], 2) }}
@endif
Pendientes:{{$qtyPendientesFacturar[$loop->index]}}
Facturado: {{ number_format($file->completa->detalles()->sum('monto_facturado'), 2) }}
Sin facturar: {{ number_format($montoDeuda - $file->completa->detalles()->sum('monto_facturado'), 2) }}
Servicios Completados
Facturado: {{ number_format($file->completa->detalles()->sum('monto_facturado'), 2) }}
Sin facturar: {{ number_format($montoDeuda - $file->completa->detalles()->sum('monto_facturado'), 2) }}

{{$montoDeuda }}
{{-- @include('cotizacionCompleta.modals.documentoFacturacion') --}} @endsection