@if($format === 'pdf') @else @endif Inventario
Reporte Inventario
Empresa: {{$company->name}}
RUC: {{$company->number}}
Establecimiento: {{$establishment->address}} - {{$establishment->department->description}} - {{$establishment->district->description}}
Fecha: {{ date('d/m/Y')}}
@php $total_purchase_unit_price = 0; $total_sale_unit_price = 0; $total = 0; $total_profit = 0; $total_all_profit = 0 @endphp @foreach($records as $key => $row) @php $total_line = $row['stock'] * $row['purchase_unit_price']; $profit = $row['sale_unit_price'] - $row['purchase_unit_price']; $total += $total_line; $total_profit += $profit; $total_all_profit+= ($profit * $row['stock']); $profit = number_format($profit,2,'.',''); $total_purchase_unit_price += $row['purchase_unit_price']; $total_sale_unit_price += $row['sale_unit_price']; @endphp @endforeach
# Cod. de barras Cod. Interno Nombre Princio Activo Descripción Categoria Stock mínimo Stock actual Costo Costo Total Precio de venta Ganancia Ganancia Total Registro Sanitario Cód. Digemid Laboratorio Modelo Lote F. vencimiento Ubicación Almacén
{{ $loop->iteration}} {{ $row['barcode'] }} {{ $row['internal_id'] }} {{ $row['name'] }} {{ $row['active_principle'] }} {{ $row['description'] }} {{ $row['item_category_name'] }} {{ $row['stock_min'] }} {{ $row['stock'] }} {{ $row['purchase_unit_price'] }} {{ $total_line }} {{ $row['sale_unit_price'] }} {{ $profit }} {{ number_format(abs($profit * $row['stock']),2,'.','')}} {{ isset($row['sanitary']) ? $row['sanitary'] : '' }} {{ isset($row['drug_code']) ? $row['drug_code'] : '' }} {{ $row['brand_name'] }} {{ $row['model'] }} {{ $row['lot_code'] }} {{ $row['date_of_due'] }} {{ $row['location'] }} {{ $row['warehouse_name'] }}
Costo Costo Total de Inventario Precio de venta Ganancia Ganancia Total
{{ number_format($total_purchase_unit_price, 2, '.','') }} {{ $total }} {{ number_format($total_sale_unit_price, 2, '.','') }} S/ {{number_format($total_profit,2,'.','')}} S/ {{number_format($total_all_profit,2,'.','')}}