Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@extends("maestra")
@section("titulo", "Detalle de venta ")
@section("contenido")
<div class="row">
<div class="col-12">
<h1>Detalle de venta #{{$venta->id}}</h1>
@include("notificacion")
<a class="btn btn-info" href="{{route("ventas.index")}}">
<i class="fa fa-arrow-left"></i>&nbsp;Volver
</a>
<a class="btn btn-success" href="{{route("ventas.ticket", ["id" => $venta->id])}}">
<i class="fa fa-print"></i>&nbsp;Ticket
</a>
<h2>Productos</h2>
<table class="table table-bordered">
<thead>
<tr>
<th>Descripción</th>
<th>Código de barras</th>
<th>Precio</th>
<th>Cantidad</th>
<th>Subtotal</th>
</tr>
</thead>
<tbody>
@foreach($venta->productos as $producto)
<tr>
<td>{{$producto->descripcion}}</td>
<td>{{$producto->codigo_barras}}</td>
<td>${{number_format($producto->precio)}}</td>
<td>{{$producto->cantidad}}</td>
<td>${{number_format($producto->cantidad * $producto->precio)}}</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<td colspan="3"></td>
<td><strong>Total</strong></td>
<td>${{number_format($total, 2)}}</td>
</tr>
</tfoot>
</table>
</div>
</div>
@endsection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.