@php $max_prices_columns = \App\Models\Tenant\ItemUnitType::select(\DB::raw('count(item_id) as total')) ->wherein('item_id',$records->pluck('id')) ->groupby('item_id') ->get()->max('total'); @endphp
# | Código interno | Nombre | Nombre alternativo | Descripción | Modelo | Unidad de medida | Posee IGV | Categoría | Marca | @foreach($extra_data as $item){{$txt}} | @endforeachPrecio | Fecha de vencimiento | @for($i=0;$i<$max_prices_columns;$i++)Unidad | Descripcion | Factor | Precio 1 | Precio 2 | Precio 3 | @endfor
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{$loop->iteration}} | {{$value->internal_id}} | {{$value->name}} | {{$value->second_name }} | {{$value->description }} | {{$value->model }} | {{$value->unit_type_id }} | {{$value->has_igv }} | {{$value->category_id }} | {{$value->brand_id }} | @foreach($extra_data as $item){{$txt}} | @endforeach{{$value->sale_unit_price }} | {{$value->date_of_due }} | @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{{$unidad}} | {{$descripcion}} | {{$factor}} | {{$precio_1}} | {{$precio_2}} | {{$precio_3}} | @endfor
No se encontraron registros.