61 lines
2.1 KiB
PHP
61 lines
2.1 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
<div class="container-fluid">
|
|
<h2>Cotizaciones</h2>
|
|
|
|
<a href="{{ route('cotizaciones.create') }}" class="btn btn-primary mb-3">
|
|
Nueva Cotización
|
|
</a>
|
|
|
|
|
|
|
|
<table class="table table-bordered table-striped align-middle table-respons">
|
|
<thead class="bg-light">
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Folio / Token</th>
|
|
<th>Cliente</th>
|
|
<th>Estado</th>
|
|
<th>Subtotal</th>
|
|
<th>IVA</th>
|
|
<th>Total</th>
|
|
<th>Acciones</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($cotizaciones as $cotizacion)
|
|
<tr>
|
|
<td>{{ $cotizacion->id }}</td>
|
|
<td>{{ $cotizacion->token }}</td>
|
|
<td>{{ $cotizacion->cliente->nombre }}</td>
|
|
<td>{{ ucfirst($cotizacion->estado) }}</td>
|
|
<td>${{ number_format($cotizacion->subtotal,2) }}</td>
|
|
<td>${{ number_format($cotizacion->iva,2) }}</td>
|
|
<td>${{ number_format($cotizacion->total,2) }}</td>
|
|
|
|
<td>
|
|
<a href="{{ route('cotizaciones.pdf', $cotizacion->id) }}"
|
|
class="btn btn-sm btn-dark">
|
|
Descargar PDF
|
|
</a>
|
|
<a href="{{ route('cotizaciones.edit',$cotizacion) }}" class="btn btn-warning btn-sm">Editar</a>
|
|
|
|
<form action="{{ route('cotizaciones.destroy',$cotizacion) }}" method="POST" class="d-inline">
|
|
@csrf @method('DELETE')
|
|
<button class="btn btn-danger btn-sm" onclick="return confirm('¿Eliminar cotización?')">
|
|
Eliminar
|
|
</button>
|
|
</form>
|
|
|
|
<a href="{{ route('cotizaciones.showCliente', $cotizacion->token) }}" target="_blank" class="btn btn-info btn-sm">
|
|
Link Cliente
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@endsection
|