{{--!auth()->user()->is_seller--}} @if($evento && auth()->user() && (auth()->user()->isRole(1) || $evento->type_product_id == 3) && (auth()->user()->isRole(1) || (auth()->user()->isRole(5) && !auth()->user()->is_seller ) ))

{{ strtoupper($evento->title_small) }}

{{-- --}} {{-- --}} {{-- --}} {{-- --}} @foreach($evento->productTerms as $tipoEntradaPadre) @foreach($tipoEntradaPadre->subProductTerms as $tipoEntrada) @php $dataSales = $tipoEntrada->getCollectionsaleProductForReport(request()->get('seler_id')); $dataSalesGruped = $dataSales->groupBy('unit_price'); // dd($dataSalesGruped); @endphp @foreach($dataSalesGruped as $pricesGrup => $rowGroupPrice) @php if($tipoEntradaPadre->id == 1533 && $pricesGrup == 234){ //dd($rowGroupPrice); } //where('sale_payment_method_id','!=',12) $subTotal = $rowGroupPrice->sum('sub_total_price');//where('sale_payment_method_id','!=',12) $descuento = $rowGroupPrice->sum('discount');//where('sale_payment_method_id','!=',12) $comisionCliente = $rowGroupPrice->sum('client_comision');//where('sale_payment_method_id','!=',12) @endphp {{-- --}} @endforeach @endforeach @endforeach
REPORTE POR ZONAS
Tipo entrada N° CortesíasN° VentasN° Entradas Vendidas Costo por entrada Total por Entradas Comisión Cliente Descuento (Cortesìas) Total recaudado
{{ $tipoEntradaPadre->name }} @if(!empty($tipoEntradaPadre->product_date_id) && $tipoEntradaPadre->productDate) - {{ $tipoEntradaPadre->productDate->fecha_hora->format("d/m/Y h:i a") }} @endif
{{ $tipoEntrada->name }} {{ $rowGroupPrice->where('sale_payment_method_id',12)->sum('persons') }} --}} {{-- {{ $rowGroupPrice->where('sale_payment_method_id','!=',12)->count() }}--}} {{-- {{ $rowGroupPrice->where('sale_payment_method_id','!=',12)->sum('persons') }} {{ $pricesGrup }} {{ $subTotal }} {{ $comisionCliente }} {{ $descuento }} {{ ($subTotal+$comisionCliente+$descuento) }}
{{-- @php--}} {{-- exit;--}} {{-- @endphp--}}


@foreach($data as $selerID => $sales) @php $vendedor = ''; $cantidad_ventas = 0; $total_efectivo = 0; $total_pos = 0; $total_cortesia = 0; $total_otros = 0; $sub_total_venta = 0; $comision_venta = 0; $descuento_venta = 0; $monto_venta = 0; if($selerID > 0){ $vendedor = $sales[0]->seler->name; }else{ $vendedor = 'VAOPE.COM'; } $cantidad_ventas = $sales->where('payment_method_id','!=',12)->count(); $cantidad_personas = $sales->where('payment_method_id','!=',12)->sum('persons'); $sub_total_venta = $sales->sum('sub_total'); $comision_venta = $sales->sum('delivery'); $descuento_venta = $sales->sum('discount'); $monto_venta = $sales->sum('total_price'); $total_efectivo = $sales->where('payment_method_id',2)->sum('total_price'); $total_pos = $sales->where('payment_method_id',3)->sum('total_price'); $total_otros = $sales->whereNotIn ('payment_method_id',[2,3])->sum('total_price'); $cantidad_ventas_cort = $sales->where('payment_method_id',12)->count(); $cantidad_personas_cort = $sales->where('payment_method_id',12)->sum('persons'); @endphp @endforeach
REPORTE POR VENDEDORES
Vendedor CORTESIAS VENTA
CANTIDAD PERSONAS CANTIDAD PERSONAS SUB TOTAL COMISIÓN DESCUENTO TOTAL EN EFECTIVO TOTAL EN POS TOTAL EN OTROS TOTAL VENTA
{{ $vendedor }} {{ $cantidad_ventas_cort }} {{ $cantidad_personas_cort }} {{ $cantidad_ventas }} {{ $cantidad_personas }} {{ $sub_total_venta }} {{ $comision_venta }} {{ $descuento_venta }} {{ $total_efectivo }} {{ $total_pos }} {{ $total_otros }} {{ $monto_venta }}



@foreach($evento->productLiquidationOperations as $productLiquidationOperation) @endforeach
SERVICIOS / DESCUENTOS
Fecha Descripción Monto
{{ $productLiquidationOperation->created_at->format('d/m/Y h:i A') }} {{ $productLiquidationOperation->description }} {{ number_format($productLiquidationOperation->amount,2) }}



@endif @foreach($data as $selerID => $sales) {{-- --}} @php $tota_st = 0; $tota_c = 0; $tota_t = 0; $tota_det = 0; $tota_desc = 0; $total_persns = 0; $tota_comission_visa= 0; $tota_comission_vaope= 0; $tota_depositar= 0; @endphp @foreach($sales as $sale) @php $rows = count($sale->products); if($sale->persons <= 0){ $sale->persons = 1; } $tota_st += $sale->sub_total; $tota_c += $sale->delivery; $tota_t += $sale->total_price; $tota_desc += $sale->discount; $total_persns += $sale->persons; $comision_visa = 0; $comision_vaope = 0; $depositar = 0; if($sale->productLiquidationDetail){ $comision_visa = $sale->productLiquidationDetail->payment_commission; $comision_vaope = $sale->productLiquidationDetail->vaope_commission+$sale->productLiquidationDetail->sale_commission; $depositar = $sale->productLiquidationDetail->total_deposit; } $tota_comission_visa += $comision_visa; $tota_comission_vaope += $comision_vaope; $tota_depositar += $depositar; @endphp {{-- --}} {{-- @php--}} {{-- $tota_det += $sale->products[0]->total_price;--}} {{-- @endphp--}} @foreach($sale->products as $num => $product) @if($num > 0) @endif @php $tota_det += $product->total_price; @endphp @endforeach @endforeach @endforeach
Detalles de ventas
ProdIdVendedor N° Pedido N° Operación Cliente Documento Teléfono Email Fecha de pago Número de Personas Costo por Persona Sub Total Comisión Descuento Total Pagado Método de pago Información de pago Código de descuento Comisión método de pago Comisión VAOPE.COM Total a Depositar Estado Entrada Tarifa Número Ticket N° Pedido Evento Función Tipo Entrada Nominación Dni Nominación Nombre Zona Ubicación Asiento Estado entrada
--}} {{-- {{ $sale->product_id }}--}} {{-- @if($sale->seler) {{ $sale->seler->name }} @else VAOPE.COM @endif {{ $sale->id }} @if(!empty($sale->operation_number)) {{ $sale->operation_number }} @else {{ $sale->purchase_number }} @endif @if($sale->client) {{ $sale->client->name }} {{ $sale->client->paternal_name }} {{ $sale->client->maternal_name }} @endif @if($sale->client) {{ $sale->client->document_type }} {{ $sale->client->document_number }} @endif @if($sale->client) {{ $sale->client->phone }} @endif @if($sale->client) {{ $sale->client->email }} @endif {{ $sale->paid_at->format('d/m/Y H:i:s') }} {{ $sale->persons }} {{ $sale->sub_total/$sale->persons }} {{ $sale->sub_total }} {{ $sale->delivery }} {{ $sale->discount }} {{ $sale->total_price }} {{ $sale->paymentMethod->name }} @if($sale->paymentMethod->id == 1 && $sale->transaction && $sale->transaction->billing_info) {{ $sale->transaction->billing_info['banco_emisor'] }} {{ $sale->transaction->billing_info['tarjeta_tipo'] }} {{ $sale->transaction->billing_info['tarjeta_marca'] }} {{-- {{ $sale->transaction->billing_info['tarjeta'] }}--}} @endif {{ $sale->giftcard }} @if(!empty($sale->giftcardCode)) ({{ $sale->giftcardCode->comments }}) @endif {{ ($comision_visa*-1) }} {{ ($comision_vaope*-1) }} {{ $depositar }} {{ $sale->getStageName() }} {{ $sale->products[0]->product_fee_id?$sale->products[0]->fee->name:'-' }}  {{ $sale->products[0]->correlative }} {{ $sale->id }} {{ $sale->products[0]->product->title_small }} @if($sale->products[0]->tipoEntrada && $sale->products[0]->tipoEntrada->date_term) {!! $sale->products[0]->tipoEntrada->date_term->format("d/m/Y") !!} {{ $sale->products[0]->tipoEntrada->hour_term }} Hrs @endif @if($sale->products[0]->tipoEntrada && $sale->products[0]->tipoEntrada->superProductTerms) {!! $sale->products[0]->tipoEntrada->superProductTerms->name !!} @endif @if($sale->products[0]->nominated_at) {!! $sale->products[0]->nom_dni !!} @else - @endif @if($sale->products[0]->nominated_at) {{ $sale->products[0]->nom_name }} {{ $sale->products[0]->nom_lastname }} @else - @endif @if($sale->products[0]->tipoEntrada) {!! $sale->products[0]->tipoEntrada->name !!} @endif @if($sale->products[0]->ubicacion) {!! $sale->products[0]->ubicacion->name !!} @endif @if($sale->products[0]->seat) {!! $sale->products[0]->seat->seat_name !!} @endif @if($sale->products[0]->status_code == '1') Acceso validado @else - @endif
{{ $product->product_fee_id?$product->fee->name:'-' }}  {{ $product->correlative }} {{ $sale->id }} {{ $product->product->title_small }} @if($product->tipoEntrada && $product->tipoEntrada->date_term) {!! $product->tipoEntrada->date_term->format("d/m/Y") !!} {{ $product->tipoEntrada->hour_term }} Hrs @endif @if($product->tipoEntrada && $product->tipoEntrada->superProductTerms) {!! $product->tipoEntrada->superProductTerms->name !!} @endif @if($product->nominated_at) {!! $product->nom_dni !!} @else - @endif @if($product->nominated_at) {{ $product->nom_name }} {{ $product->nom_lastname }} @else - @endif @if($product->tipoEntrada) {!! $product->tipoEntrada->name !!} @endif @if($product->ubicacion) {!! $product->ubicacion->name !!} @endif @if($product->seat) {!! $product->seat->seat_name !!} @endif @if($product->status_code == '1') Acceso validado @else - @endif
{{ $total_persns }} {{ $tota_st }} {{ $tota_c }} {{ $tota_desc }} {{ $tota_t }} {{ ($tota_comission_visa*-1) }} {{ ($tota_comission_vaope*-1) }} {{ $tota_depositar }}