@include('reportes._partials.header', ['nombreReporte'=>'REPORTE CONSOLIDADO VENTAS POR COMERCIO', 'ciudad'=>true])
{{-- --}} @php $totalPedidos = $totalSubtotal = $totalComisionComercio = $totalComisionCliente = $totalEnvio = $totalCostoVenta = $totalDescuentoApp = $totalReventa = 0; @endphp @foreach ($dataComercios as $item) @php $totalPedidos += $item->pedidos; $totalSubtotal += round($item->subtotal, 4); $totalComisionComercio += round($item->comisionComercio, 4); $totalComisionCliente += round($item->comisionCliente, 4); $totalEnvio += round($item->envio, 4); $totalCostoVenta += round($item->costoVenta, 4); $totalDescuentoApp += round($item->descuentoApp, 4); // $totalDescuentoComercio += $item->descuentoComercio; // $totalReventa += round($item->subtotal, 4) - round($item->costoVenta, 4)-$item->descuentoApp<0?0:round($item->subtotal, 4) - round($item->costoVenta, 4)-$item->descuentoApp; $totalReventa += round($item->subtotal, 4) - round($item->costoVenta, 4); @endphp {{-- --}} {{-- --}} @endforeach
No. COMERCIO PEDIDOS VENTAS DESCUENTOS INGRESOS
P CCO CCL D TV CV DADCTD R C D TOTAL
{{ $loop->index + 1 }} {{ $item->RESS_NOMBRE }} {{ $item->pedidos }} $ {{ number_format($item->subtotal, 2) }} $ {{ number_format($item->comisionComercio, 2) }} $ {{ number_format($item->comisionCliente, 2) }} $ {{ number_format($item->envio, 2) }} $ {{ number_format($item->subtotal + $item->comisionComercio + $item->comisionCliente+$item->envio, 2) }} $ {{ number_format($item->costoVenta, 2) }} $ {{ number_format($item->descuentoApp, 2) }}$ {{ number_format($item->descuentoComercio, 2) }}$ {{ number_format($item->costoVenta + $item->descuentoApp, 2) }} $ {{ number_format(round($item->subtotal, 4) - round($item->costoVenta, 4), 2) }} $ {{ number_format($item->comisionComercio + $item->comisionCliente, 2) }} $ {{ number_format($item->envio-$item->descuentoApp, 2) }} $ {{ number_format(($item->subtotal-$item->costoVenta) + $item->comisionComercio + $item->comisionCliente + ($item->envio - $item->descuentoApp), 2) }} $ {{ number_format(round($item->subtotal + $item->comisionComercio + $item->comisionCliente + $item->envio, 4) - round($item->costoVenta + $item->descuentoApp, 4), 2) }}
TOTALES {{ $totalPedidos }} $ {{ number_format($totalSubtotal, 2) }} $ {{ number_format($totalComisionComercio, 2) }} $ {{ number_format($totalComisionCliente, 2) }} $ {{ number_format($totalEnvio, 2) }} $ {{ number_format($totalSubtotal+$totalComisionComercio+$totalComisionCliente+$totalEnvio, 2) }} $ {{ number_format($totalCostoVenta, 2) }} $ {{ number_format($totalDescuentoApp, 2) }} $ {{ number_format($totalCostoVenta+$totalDescuentoApp, 2) }} $ {{ number_format($totalReventa, 2) }} $ {{ number_format($totalComisionComercio+$totalComisionCliente, 2) }} $ {{ number_format($totalEnvio-$totalDescuentoApp, 2) }} $ {{ number_format(($totalSubtotal-$totalCostoVenta)+$totalComisionComercio+$totalComisionCliente+($totalEnvio-$totalDescuentoApp), 2) }}
P: Productos
CCO: Comisión comercio
CCL: Comisión cliente
D: Delivery (envío)
TV: Total ventas
CV: Costo de venta
DA: Descuento de App
TD: Total descuentos
R: Reventa
C: Comisiones
OA: Operado App
OC: Operado comercio