@php $enabled_sales_agents = App\Models\Tenant\Configuration::getRecordIndividualColumn('enabled_sales_agents'); @endphp
Empresa: |
{{ $company->name }} |
Fecha: |
{{ date('Y-m-d') }} |
Ruc: |
{{ $company->number }} | @inject('reportService', 'Modules\Report\Services\ReportService') @if (isset($filters['seller_id']) && !empty($filters['seller_id']))
Usuario: |
{{ $reportService->getUserName($filters['seller_id']) }} | @endif
# | Fecha Emisión | Hora Emisión | Fecha de pago | Usuario/Vendedor | Primera compra | Cliente | Tipo de documento | N° documento | Nota de Venta | Estado pago | Condición pago | Método pago | Destino | Referencia/N° Operación | Confirmación de pago | Monto | Estado | Moneda | Plataforma | Orden de compra | Region | Departamento | Provincia | Distrito | Comprobantes | Fecha comprobante | Guias | Cotización | Caso | Productos | Descuento | T.Exportación | T.Inafecta | T.Exonerado | T.Gravado | T.Igv | Total | @if ($enabled_sales_agents)Agente | Datos de referencia | @endif|||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ $loop->iteration }} | {{ $value->date_of_issue->format('Y-m-d') }} | {{ $value->time_of_issue }} | @php $date_of_payment = $value->date_of_issue->format('Y-m-d'); $payments = $value->payments; if (count($payments) > 0) { $date_of_payment = $payments[0]->date_of_payment->format('Y-m-d'); } @endphp{{ $date_of_payment }} | {{ $value->user->name }} | @php $count_register = numberDocumentByClient($value->customer_id,\App\Models\Tenant\SaleNote::class); @endphp{{ $count_register > 1 ? 'No' : 'Si' }} | {{ $value->customer->name }} | @php $identity_document_type_description = ''; $identity_document_type_id = $value->customer->identity_document_type_id; $db_identity_document_type = \App\Models\Tenant\Catalogs\IdentityDocumentType::where( 'id', $identity_document_type_id, )->first(); if ($db_identity_document_type) { $identity_document_type_description = $db_identity_document_type->description; } @endphp{{ $identity_document_type_description }} | {{ $value->customer->number }} | {{ $value->number_full }} | {{ $value->total_canceled ? 'Pagado' : 'Pendiente' }} | {{ $value->payment_condition_id == '01' ? 'Contado' : 'Crédito' }} | @php $payments_methods = []; if ($value->payment_condition_id == '01') { $payments_methods = $value->payments->map(function ($row) { return $row['payment_method_type']['description']; }); } else { $payments_methods = $value->fee->map(function ($row) { if ($row->payment_method_type) { return $row->payment_method_type->description; } else { return 'Credito'; } }); } @endphp {{ implode(', ', $payments_methods->toArray()) }} | @php $payment_destinations = []; foreach ($value->payments as $payment) { $destination = getPaymentDestination( $payment->id, \App\Models\Tenant\SaleNotePayment::class, ); if (strlen($destination) > 0) { $payment_destinations[] = $destination; } } @endphp {{ implode(', ', $payment_destinations) }} | @php $reference_payment = ''; foreach ($value->payments as $payment) { $reference_payment .= $payment->reference . ' '; } @endphp {{ $reference_payment }} | @if ($value->state_payment_id == '01') En espera @elseif ($value->state_payment_id == '02') Aprobado @else Rechazado @endif | {{$value->total}} | {{ $value->state_type->description }} | {{ $value->currency_type_id }} | @foreach ($value->getPlatformThroughItems() as $platform) @endforeach | {{ $value->purchase_order }} | {{ $value->customer->department->description }} | {{ $value->customer->department->description }} | {{ $value->customer->province->description }} | {{ $value->customer->district->description }} | @php $documents = $value->documents; @endphp
@foreach ($documents as $doc)
{{ $doc->number_full }} @endforeach |
@foreach ($documents as $doc)
{{ $doc->date_of_issue->format('Y-m-d') }} @endforeach |
@php
$dispatches_order = [];
$dispatch_order = $value->dispatch_order;
if ($dispatch_order) {
$dispatches = $dispatch_order->dispatches;
foreach ($dispatches as $dispatch) {
$dispatches_order[] = $dispatch->series.'-'.$dispatch->number_full;
}
}
@endphp
{{
implode(', ', $dispatches_order)
}}
{{ $value->quotation ? $value->quotation->number_full : '' }} | {{ isset($value->quotation->sale_opportunity) ? $value->quotation->sale_opportunity->number_full : '' }} |
@foreach ($value->getItemsforReport() as $key => $item)
- {{ $item['description'] }} / Cantidad: {{ $item['quantity'] }}
@if ($key < count($value->getItemsforReport()) - 1)
@endif @endforeach |
@if ($value->state_type_id == '11')
0 | 0 | 0 | 0 | 0 | 0 | 0 | @else{{ $value->total_discount }} | {{ $value->total_exportation }} | {{ $value->total_unaffected }} | {{ $value->total_exonerated }} | {{ $value->total_taxed }} | {{ $value->total_igv }} | {{ $value->total }} | @endif @if ($enabled_sales_agents){{ optional($value->agent)->search_description }} | {{ $value->reference_data }} | @endif|
Totales PEN | {{ $acum_total_taxed }} | {{ $acum_total_igv }} | {{ $acum_total }} | |||||||||||||||||||||||||||||||||||||||||||
Totales USD | {{ $acum_total_taxed_usd }} | {{ $acum_total_igv_usd }} | {{ $acum_total_usd }} |
No se encontraron registros.