@php
                                            $total = 0;
                                        @endphp
                                        @foreach ($item->productos as $key => $i)
                                            @php
                                                $total = $i->pivot->precio_venta + $total;
                                            @endphp
                                            | {{ $key + 1 }} | {{ $i->codigo }} | {{ $i->producto }} | {{ number_format($i->pivot->precio, 2) }} | {{ number_format($i->pivot->precio_venta, 2) }} | @foreach ($i->categorias as $categoria)
                                                    
                                                        {{ $categoria->categoria }}
                                                    
                                                @endforeach@php
                                                $url = 'default.png';
                                                if ($i->imagen != null) {
                                                    $url = $i->imagen;
                                                }
                                            @endphp | @endforeach }})  | 
                                            |  |  |  | Total | {{ number_format($total, 2) }} |  |  |