REPORTE DE VENTAS GENERAL
{{ \Carbon\Carbon::parse($fInicio)->format('d M Y')}} - {{ \Carbon\Carbon::parse($fTermino)->format('d M Y')}}

@php $today = Carbon\Carbon::now(); @endphp

Impreso por: {{ Auth::user()->name }}
El {{ \Carbon\Carbon::parse($today)->format('d M Y h:m:s a')}}

{{ $business->direccion }}
{{ $business->ciudad }}, {{ $business->provincia }}, República Dominicana.

@php $num = 0; $subto_col = 0; $itbis_col = 0; $total_col = 0; $totalglobal = 0; $itbisglobal = 0; @endphp @foreach($group AS $g)
{{ strtoupper($g['vendedor']) }}
@foreach($g['registros'] as $reg) @php $itbis_col += $reg->itbis; $total_col += $reg->total; @endphp @endforeach @php $subto_col = $total_col - $itbis_col; $totalglobal += $total_col; $itbisglobal += $itbis_col; @endphp @php // aqui reseteamos los valores a 0 de las siguientes variables $num = 0; $subto_col = 0; $itbis_col = 0; $total_col = 0; @endphp
# Fecha Factura # Nombre del Cliente NCF SubTotal ITBIS Total Estatus
{{ $num += 1 }} {{ \Carbon\Carbon::parse($reg->fecha)->format('d M Y')}} {{ str_pad($reg->factura, 10, 'FAC-000000', STR_PAD_LEFT) }} {{ $reg->cliente }} 00000000{{ $reg->secuencia }}{{ str_pad($reg->ncf, 8, '0000', STR_PAD_LEFT) }} RD${{ number_format($reg->total - $reg->itbis, 2) }} RD${{ number_format($reg->itbis, 2) }} RD${{ number_format($reg->total, 2) }} @if($reg->saldo == 1) C @else P @endif
{{ strtoupper($g['vendedor']) }} RD${{ number_format($subto_col, 2) }} RD${{ number_format($itbis_col, 2) }} RD${{ number_format($total_col, 2) }}

@endforeach
RD$ {{ number_format($totalglobal - $itbisglobal, 2) }} RD$ {{ number_format($itbisglobal, 2) }} RD$ {{ number_format($totalglobal, 2) }}