Reporte pagos


Empresa:

{{$company->name}}

Fecha:

{{date('Y-m-d')}}

Ruc:

{{$company->number}}

Establecimiento:

{{$establishment->address}} - {{$establishment->department->description}} - {{$establishment->district->description}}

@if(!empty($records))
@foreach($records as $key => $value) @php // Se obtienen los datos de modules/Finance/Http/Resources/GlobalPaymentCollection.php $data_person = $value->data_person; $document_type = ''; $payment = ($value->payment) ? $value->payment : null; if ($payment !== null && $value->payment->associated_record_payment !== null && $value->payment->associated_record_payment->document_type) { $document_type = $value->payment->associated_record_payment->document_type->description; } elseif ($value->instance_type == 'technical_service') { $document_type = 'ST'; } elseif ($payment !== null && isset($value->payment->associated_record_payment->prefix)) { $document_type = $value->payment->associated_record_payment->prefix; } $cci = $value->getCciBankAcount(); // $cci = $value->getCciAcoount(); $personName = $data_person->name; if (!is_string($personName)) { if (property_exists($personName, 'description')) { // Los bancos con transacciones $personName = $personName->description; } } $payment_method_type_description = ''; if ($value->payment !== null && $value->payment->payment_method_type) { $payment_method_type_description = $value->payment->payment_method_type->description; } else { $payment_method_type_description = ($value->payment !== null && $value->payment->expense_method_type !== null) ? $value->payment->expense_method_type->description : ''; } $data = [ 'id' => $value->id, 'destination_description' => $value->getDestinationDescriptionPayment(), // 'destination_description' => $value->destination_description, 'cci' => $cci, 'date_of_payment' => ($payment !== null && $value->payment->date_of_payment !== null) ? $value->payment->date_of_payment->format('Y-m-d') : '', 'payment_method_type_description' => $payment_method_type_description, 'reference' => ($payment !== null) ? $value->payment->reference : '', 'total' => ($payment !== null) ? $value->payment->payment : 0, 'number_full' => ($payment !== null && $value->payment->associated_record_payment) ? $value->payment->associated_record_payment->number_full : '', 'currency_type_id' => ($payment !== null && $value->payment->associated_record_payment != null) ? $value->payment->associated_record_payment->currency_type_id : '', // 'document_type_description' => ($value->payment->associated_record_payment->document_type) ? $value->payment->associated_record_payment->document_type->description:'NV', 'document_type_description' => $document_type, 'person_name' => $personName, 'person_number' => $data_person->number, // 'payment' => $value->payment, // 'payment_type' => $value->payment_type, 'instance_type' => $value->instance_type, 'instance_type_description' => $value->instance_type_description, 'user_id' => $value->user_id, 'user_name' => optional($value->user)->name, ]; @endphp @endforeach
# Adquiriente N° Doc. Identidad Tipo documento Documento/Transacción Moneda Tipo Destino Cuenta/Caja F. Pago Método Referencia Responsable Pago
{{$loop->iteration}} {{$data['person_name']}} {{$data['person_number']}} {{ $document_type }} {{ $data['number_full'] }} {{ $data['currency_type_id'] }} {{ $data['instance_type_description'] }} {{ $data['destination_description'] }} {{ $data['cci'] }} {{ $data['date_of_payment'] }} {{$payment_method_type_description}} {{ $data['reference'] }} {{ $data['user_name'] }} {{ $data['total'] }}
Totales PEN {{ $records->where('payment.associated_record_payment.currency_type_id', 'PEN')->sum('payment.payment') }}
Totales USD {{ $records->where('payment.associated_record_payment.currency_type_id', 'USD')->sum('payment.payment') }}
@else

No se encontraron registros.

@endif