Reporte Documentos


Empresa:

{{$company->name}}

Fecha:

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

N° Documento:

{{$company->number}}

Establecimiento:

{{$establishment->address}} - {{$establishment->address}} - {{$establishment->country->name}} - {{$establishment->department->name}} - {{$establishment->city->name}}

@if(!empty($records))
@php $sum_total = 0; @endphp @foreach($records as $key => $value) @php $serie_affec = ''; @endphp @php if(in_array($value->type_document_id,[2,3]) && $value->reference){ $series = $value->reference->series; $number = $value->reference->number; $serie_affec = $series.' - '.$number; } $total = in_array($value->document_type_id,[3]) ? -abs($value->total) : $value->total; $sum_total += $total; @endphp @endforeach
# Usuario/Vendedor Tipo Doc Número Fecha emisión Doc. Afectado Cotización Caso Cliente N° Documento Estado Moneda Total
{{$loop->iteration}} {{$value->user->name}} {{$value->type_document->name}} {{$value->series}}-{{$value->number}} {{$value->date_of_issue->format('Y-m-d')}}{{$serie_affec }} {{ ($value->quotation) ? $value->quotation->number_full : '' }} {{ isset($value->quotation->sale_opportunity) ? $value->quotation->sale_opportunity->number_full : '' }} {{$value->customer->name}} {{$value->customer->number}} {{$value->state_document->name}} {{$value->currency_type_id}} {{$total}}
Total: {{ number_format($sum_total, 2, ".", "") }}
@else

No se encontraron registros.

@endif