@php use Illuminate\Support\Facades\DB; use Modules\Item\Models\ItemUnitType; $max_prices_columns = ItemUnitType::query()->select(DB::raw('count(item_id) as total')) ->whereIn('item_id',$records->pluck('id')) ->groupBy('item_id') ->get()->max('total'); @endphp Productos

Reporte Productos


@if(!empty($records))
@foreach($extra_data as $item) @endforeach @if($include_purchase_price) @endif @for($i=0;$i<$max_prices_columns;$i++) @endfor @foreach($records as $key => $value) @php // dd($value); $item_unit_types = $value->item_unit_types->toArray(); @endphp @foreach($extra_data as $item) @endforeach @if($include_purchase_price) @endif @for($i=0;$i<$max_prices_columns;$i++) @php $unidad = ''; $descripcion = ''; $factor = ''; $precio_1 = ''; $precio_2 = ''; $precio_3 = ''; if(isset($item_unit_types[$i])){ $temp = $item_unit_types[$i]; $unidad = $temp['unit_type_id']; $descripcion = $temp['description']; $factor = $temp['quantity_unit']; $precio_1 = $temp['price1']; $precio_2 = $temp['price2']; $precio_3 = $temp['price3']; } @endphp @endfor @endforeach
# Código interno Nombre Nombre alternativo Descripción Modelo Unidad de medida Posee IGV Categoría Marca{{$txt}}PrecioPrecio de compraFecha de vencimientoUnidad Descripcion Factor Precio 1 Precio 2 Precio 3
{{$loop->iteration}} {{$value->internal_id}} {{$value->name}} {{$value->second_name }} {{$value->description }} {{$value->model }} {{$value->unit_type_id }} {{$value->has_igv }} @if(isset($value->category_id)) {{$value->category->name }} @endif @if(isset($value->brand_id)) {{$value->brand->name }} @endif{{$txt}}{{$value->sale_unit_price }}{{$value->purchase_unit_price }}{{$value->date_of_due }}{{$unidad}} {{$descripcion}} {{$factor}} {{$precio_1}} {{$precio_2}} {{$precio_3}}
@else

No se encontraron registros.

@endif