@php $establishment = $cash->user->establishment; $cash_documents = $cash->cash_documents; @endphp Reporte Resúmen de ingresos - {{$cash->user->name}} - {{$cash->date_opening}} {{$cash->time_opening}}

Resúmen de ingresos por métodos de pago

@if(!$cash->state) @endif

Empresa: {{$company->name}}

Fecha reporte: {{date('Y-m-d')}}

N° Documento: {{$company->number}}

Establecimiento: {{$establishment->description}} {{-- $establishment->department->description}} - {{$establishment->district->description --}}

Vendedor: {{$cash->user->name}}

Fecha y hora apertura: {{$cash->date_opening}} {{$cash->time_opening}}

Estado de caja: {{($cash->state) ? 'Aperturada':'Cerrada'}}

Fecha y hora cierre: {{$cash->date_closed}} {{$cash->time_closed}}

@if($cash_documents->count())
@foreach($cash_documents as $value) @php $type_transaction = null; $document_type_description = null; $number = null; $date_time_of_issue = null; $payment_method_description = null; $total = null; $currency_type_id = null; @endphp @if($value->sale_note) @foreach($value->sale_note->payments as $payment) @php $type_transaction = 'Venta'; $document_type_description = 'NOTA DE VENTA'; $number = $value->sale_note->number_full; $date_time_of_issue = "{$value->sale_note->date_of_issue->format('Y-m-d')} {$value->sale_note->time_of_issue}"; $payment_method_description = $payment->payment_method_type->description; $total = $payment->payment; $currency_type_id = $value->sale_note->currency_type_id; @endphp @endforeach @elseif($value->document) @foreach($value->document->payments as $payment) @php $type_transaction = 'Venta'; $document_type_description = $value->document->document_type->description; $number = $value->document->number_full; $date_time_of_issue = "{$value->document->date_of_issue->format('Y-m-d')} {$value->document->time_of_issue}"; $payment_method_description = $payment->payment_method_type->description; $total = $payment->payment; $currency_type_id = $value->document->currency_type_id; @endphp @endforeach @endif @endforeach
# Fecha y hora emisión Tipo documento Documento Método de pago Moneda Importe Vuelto Monto
{{ $loop->iteration }} {{ $date_time_of_issue}} {{ $document_type_description }} {{ $number }} {{$payment_method_description }} {{$currency_type_id }} {{ number_format($value->sale_note->total,2) }} {{ number_format($payment->change,2) }} {{ number_format($total,2) }}
{{ $loop->iteration }} {{ $date_time_of_issue}} {{ $document_type_description }} {{ $number }} {{$payment_method_description }} {{$currency_type_id }} {{ number_format($value->document->total,2) }} {{ number_format($payment->change,2) }} {{ number_format($total,2) }}
@else

No se encontraron registros.

@endif