REPORTE POR PRODUCTO


@if (!empty($records)) @endif

Producto:

{{ $internal_id ? $internal_id . ' -' : '' }} {{$description}}

Empresa:

{{ $company->name }}

Fecha:

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

Ruc:

{{ $company->number }}

Establecimiento:

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

@if (!empty($records))
@php $acum_total_taxed = 0; $acum_total_igv = 0; $acum_total = 0; $serie_affec = ''; $acum_total_exonerado = 0; $acum_total_inafecto = 0; $acum_total_free = 0; $acum_total_taxed_usd = 0; $acum_total_igv_usd = 0; $acum_total_usd = 0; $acum_quantity = 0; @endphp @if ($type !== 'purchase') @endif @foreach ($records as $key => $value) $type @if ($type !== 'purchase') @endif @php $signal = $document->document_type_id; $state = $document->state_type_id; @endphp @php $value->total = in_array($document->document_type_id, ['01', '03']) && in_array($document->state_type_id, ['09', '11']) ? 0 : $value->total; @endphp @php $serie_affec = ''; @endphp @php if ($signal == '07' && $state !== '11') { $acum_total += -$value->total; } elseif ($signal != '07' && $state == '11') { $acum_total += 0; } else { $acum_total += $value->total; } $acum_quantity += $value->quantity; @endphp @endforeach
# Fecha Tipo Documento Serie Número N° Documento Cliente Departamento Provincia DistritoPlataformaCantidad Monto
{{ $loop->iteration }} {{ $document->date_of_issue->format('Y-m-d') }} {{ $document_description }} {{ $document->series }} {{ $document->number }} {{ $customer_number }} {{ $customer_name }} {{ $customer_department }} {{ $customer_province }} {{ $customer_district }}{{ optional($value->relation_item->web_platform)->name }}{{ $value->quantity }} {{ $value->total }}
TOTALES {{ $acum_quantity }} {{ $acum_total }}
@else

No se encontraron registros.

@endif