Consolidado de items por cliente/vendedor

Empresa: {{$company->name}}

Ruc: {{$company->number}}

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

@if($params['person_id'])

Cliente: {{ (!empty($records)) ? $records->first()->order_note->customer->name:'' }} - {{ (!empty($records)) ? $records->first()->order_note->customer->number:'' }}

@else

Vendedor: {{ (!empty($records)) ? $records->first()->order_note->user->name:'' }}

@endif
@if(!empty($records))
@php $acum_total=0; $acum_total_amount=0; @endphp @foreach($records as $key => $value) @php $total_item = ($value->order_note->currency_type_id === 'USD') ? $value->total * $value->order_note->exchange_rate_sale : $value->total; @endphp @php $acum_total += $value->quantity; $acum_total_amount += $total_item; @endphp @endforeach
# Vendedor Cliente Producto Cantidad Monto
{{$loop->iteration}} {{$value->order_note->user->name}} {{$value->order_note->customer->name}} {{$value->item->description}} {{$value->quantity}} S/ {{ $total_item }}
Total {{$acum_total}} S/ {{$acum_total_amount}}
@else

No se encontraron registros.

@endif