@php $establishment = $cash->user->establishment; $cash_documents = $cash->cash_documents; $cash_documents_credit = $cash->cash_documents_credit; $totals_income_summary = $cash->getTotalsIncomeSummary(); @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')}}

Ruc: {{$company->number}}

Establecimiento: {{$establishment->address}} - {{$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}}

Total comprobantes: S/ {{ $totals_income_summary['document_total_payments'] }}

Total notas de venta: S/ {{ $totals_income_summary['sale_note_total_payments'] }}

@php // dd($order_cash_income); @endphp @if ($order_cash_income) @include('report::income_summary.partials.table_payments') @else @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; if(!in_array($payment->associated_record_payment->state_type_id, ['01','03','05','07','13'])){ $total = 0; } $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; if(!in_array($payment->associated_record_payment->state_type_id, ['01','03','05','07','13'])){ $total = 0; } $currency_type_id = $value->document->currency_type_id; @endphp @endforeach @endif @endforeach @foreach($cash_documents_credit as $value) @php $type_transaction = null; $document_type_description = null; $number = null; $date_time_of_issue = null; $total = null; $currency_type_id = null; @endphp @if($value->sale_note) @php $document = $value->sale_note; $type_transaction = 'Venta'; $document_type_description = 'NOTA DE VENTA'; $number = $document->number_full; $date_time_of_issue = "{$document->date_of_issue->format('Y-m-d')} {$document->time_of_issue}"; $payment_method_description = 'Crédito'; $total = 0; $currency_type_id = $document->currency_type_id; @endphp @elseif($value->document) @php $document = $value->document; $type_transaction = 'Venta'; $document_type_description = $document->document_type->description; $number = $document->number_full; $date_time_of_issue = "{$document->date_of_issue->format('Y-m-d')} {$document->time_of_issue}"; $payment_method_description = 'Crédito'; $currency_type_id = $document->currency_type_id; @endphp @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) }}
{{ $loop->iteration }} {{ $date_time_of_issue}} {{ $document_type_description }} {{ $number }} {{$payment_method_description }} {{$currency_type_id }} {{ number_format($document->total,2) }} 0 0
{{ $loop->iteration }} {{ $date_time_of_issue}} {{ $document_type_description }} {{ $number }} {{$payment_method_description }} {{$currency_type_id }} {{ number_format($document->total,2) }} 0 0
@else

No se encontraron registros.

@endif @endif