@if (isset($resumenVentas) && $resumenVentas->isNotEmpty())
@if ((isset($tipoInforme) && !empty($tipoInforme)) && ($tipoInforme == 'ventas' || $tipoInforme == 'mercadoLibre-otros'))
@php
$totalNeto = 0;
$totalIva = 0;
$totalVentas = 0;
@endphp
@foreach ($resumenVentas as $resumenVenta)
@php
$neto = $resumenVenta->neto;
$iva = $resumenVenta->iva;
$total = $resumenVenta->total;
@endphp
@if ($tipoInforme == 'mercadoLibre-otros')
{{ $resumenVenta->canal }} |
@else
{{ $resumenVenta->origen }} |
@endif
@if ($tipoInforme == 'ventas')
{{ $resumenVenta->canal }}
@endif
|
${{ \FCR::num_cl($neto) }} |
${{ \FCR::num_cl($iva) }} |
${{ \FCR::num_cl($total) }} |
@php
$totalNeto += $neto ?? 0;
$totalIva += $iva ?? 0;
$totalVentas += $total ?? 0;
@endphp
@endforeach
TOTALES: |
${{ \FCR::num_cl($totalNeto) }} |
${{ \FCR::num_cl($totalIva) }} |
${{ \FCR::num_cl($totalVentas) }} |
@else
@php
$totalNeto = 0;
$totalIva = 0;
$totalGeneral = 0;
@endphp
@foreach ($resumenVentas as $resumenVenta)
@php
$usuarioNombre = '';
$totalVenta = 0;
$origen = '';
$canal = '';
$usuarioNombre = $resumenVenta->vendedor_ml_nick;
$totalVenta = $resumenVenta->total;
@endphp
{{ $usuarioNombre }} |
@if (isset($resumenVenta->cantidad_ventas) && !empty($resumenVenta->cantidad_ventas))
{{ \FCR::num_cl($resumenVenta->cantidad_ventas) }}
@endif
|
${{\FCR::num_cl(\FCR::num_neto($totalVenta)) ?? 0}} |
${{\FCR::num_cl(\FCR::num_iva($totalVenta)) ?? 0}} |
${{\FCR::num_cl($totalVenta) ?? 0}} |
@php
$totalNeto += \FCR::num_neto($totalVenta) ?? 0;
$totalIva += \FCR::num_iva($totalVenta) ?? 0;
$totalGeneral += $totalVenta ?? 0;
@endphp
@endforeach
TOTALES: |
|
${{ \FCR::num_cl($totalNeto) }} |
${{ \FCR::num_cl($totalIva) }} |
${{ \FCR::num_cl($totalGeneral) }} |
@endif
@else
No existen registros |
@endif