{{--

FORMATO 13.1: "REGISTRO DE INVENTARIO PERMANENTE VALORIZADO - DETALLE DEL INVENTARIO VALORIZADO"

--}}

@if($additionalData['month']) @endif

FORMATO 13.1: "REGISTRO DE INVENTARIO PERMANENTE VALORIZADO - DETALLE DEL INVENTARIO VALORIZADO"

PERÍODO:

{{ $additionalData['period'] }}

MES:

{{ $additionalData['month'] }}

RUC:

{{ $company->number }}

APELLIDOS Y NOMBRES, DENOMINACIÓN O RAZÓN SOCIAL:

{{ $company->name }}

ESTABLECIMIENTO (1):

{{ optional($establishment)->description }}

CÓDIGO DE LA EXISTENCIA:

{{ $additionalData['internal_id'] }}

TIPO (TABLA 5):

01

DESCRIPCIÓN:

{{ $additionalData['description'] }}

CÓDIGO DE LA UNIDAD DE MEDIDA (TABLA 6):

{{ $additionalData['unit_type_table_six']['code'] }} - {{ $additionalData['unit_type_table_six']['description'] }}

MÉTODO DE VALUACIÓN:

COSTO PROMEDIO
{{-- ENTRADAS --}} {{-- SALIDAS --}} {{-- SALDO --}} @php // dd($records); // $balance_quantity = 0; // $balance_total = 0; // $balance_cost = 0; //totals $totals = [ 'input_quantity' => 0, 'input_unit_price' => 0, 'input_total' => 0, 'output_quantity' => 0, 'output_unit_price' => 0, 'output_total' => 0, 'balance_quantity' => 0, 'balance_total' => 0, 'balance_cost' => 0, ]; @endphp @foreach ($records as $row) {{-- ENTRADAS --}} {{-- SALIDAS --}} @if($row['type'] == 'output') @else @endif {{-- SALDO --}} @php // $balance_quantity += $row['quantity'] * $row['factor']; // $balance_total += $row['total'] * $row['factor']; // $balance_cost = ($balance_quantity != 0) ? round($balance_total / $balance_quantity, 4) : null; if($row['type'] == 'input'){ $totals['input_quantity'] += $row['input_quantity']; $totals['input_unit_price'] += $row['input_unit_price']; $totals['input_total'] += $row['input_total']; }else{ $totals['output_quantity'] += $row['output_quantity']; $totals['output_unit_price'] += $row['output_unit_price']; $totals['output_total'] += $row['output_total']; } $totals['balance_quantity'] += $row['balance_quantity']; $totals['balance_total'] += $row['balance_total_cost']; $totals['balance_cost'] += $row['balance_unit_cost']; @endphp @endforeach

DOCUMENTO DE TRASLADO, COMPROBANTE DE PAGO, DOCUMENTO DE TRASLADO, COMPROBANTE DE PAGO, DOCUMENTO INTERNO O SIMILAR

TIPO DE OPERACIÓN (TABLA 12)

ENTRADAS

SALIDAS

SALDO FINAL

FECHA

TIPO (TABLA 10)

SERIE

NÚMERO

CANTIDAD

COSTO UNITARIO

COSTO TOTAL

CANTIDAD

COSTO UNITARIO

COSTO TOTAL

CANTIDAD

COSTO UNITARIO

COSTO TOTAL

{{ $row['date_of_issue'] }} {{ $row['document_type_id'] }} {{ $row['series'] }} {{ $row['number'] }} {{ $row['operation_type'] }} {{ $row['input_quantity'] }} {{ $row['input_unit_price'] }} {{ $row['input_total'] }} {{ $row['output_quantity'] }} {{ $row['output_unit_price'] }} {{ $row['output_total'] }} {{-- {{ $balance_quantity }} --}} {{ $row['balance_quantity'] }} {{-- {{ $balance_cost }} --}} {{ $row['balance_unit_cost'] }} {{-- {{ $balance_total }} --}} {{ $row['balance_total_cost'] }}
TOTALES {{ $totals['input_quantity'] }} {{ $totals['input_unit_price'] }} {{ $totals['input_total'] }} {{ $totals['output_quantity'] }} {{ $totals['output_unit_price'] }} {{ $totals['output_total'] }} {{ $totals['balance_quantity'] }} {{ $totals['balance_cost'] }} {{ $totals['balance_total'] }}