commit
751045c120
@ -1,3 +1,3 @@ |
|||||||
venv/ |
venv/ |
||||||
__pycahe__ |
*.pyc |
||||||
settings |
__pycache__/ |
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,56 +1,60 @@ |
|||||||
{% extends "Base.html" %} |
{% extends "Base.html" %} |
||||||
|
|
||||||
{% block content %} |
{% block content %} |
||||||
<main class="conteiner"> |
<main class="container my-5"> |
||||||
<div class="row"> |
<div class="row"> |
||||||
<div class="col-md-10 offset-md-1 mt-4"> |
<div class="col-md-10 offset-md-1"> |
||||||
<form action="/articulo/" method="POST"> |
<div class="card shadow-lg border-0 text-white"> |
||||||
<div class="card-header row col-12 justify-content-end mb-2 pr-0 mt-2"> |
<div class="card-header text-center bg-secondary text-white"> |
||||||
<h3 class="text-center">Tabla de articulos</h3> |
<h3 class="mb-0">Gestión de Artículos</h3> |
||||||
</div> |
</div> |
||||||
|
<div class="card-body p-4"> |
||||||
<div class="table-responsive"> |
<div class="table-responsive"> |
||||||
<table class="table mt-3"> |
<table class="table table-bordered table-hover align-middle text-white"> |
||||||
<thead class="table-dark"> |
<thead class="bg-dark text-secondary text-center"> |
||||||
<tr> |
<tr> |
||||||
<th scope="col">#</th> |
<th scope="col">#</th> |
||||||
<th scope="col">Nombre del articulo</th> |
<th scope="col">Nombre</th> |
||||||
<th scope="col">Medida del articulo</th> |
<th scope="col">Medida</th> |
||||||
<th scope="col">Descripcion</th> |
<th scope="col">Descripción</th> |
||||||
<th scope="col">Tipo del articulo</th> |
<th scope="col">Tipo</th> |
||||||
<th scope="col">Proveedor</th> |
<th scope="col">Proveedor</th> |
||||||
<th scope="col">Precio de compra</th> |
<th scope="col">Precio Compra</th> |
||||||
<th scope="col">Precio de venta</th> |
<th scope="col">Precio Venta</th> |
||||||
<th scope="col">ACTUALIZAR</th> |
<th scope="col">Acción</th> |
||||||
|
|
||||||
</tr> |
</tr> |
||||||
</thead> |
</thead> |
||||||
<tbody> |
<tbody> |
||||||
{% for articulo in persona %} |
{% for articulo in persona %} |
||||||
|
<tr class="text-center"> |
||||||
|
<td>{{ articulo.id }}</td> |
||||||
|
<td>{{ articulo.nombre_articulo }}</td> |
||||||
|
<td>{{ articulo.medida }}</td> |
||||||
|
<td>{{ articulo.descripcion }}</td> |
||||||
|
<td>{{ articulo.tipo_articulo.tipo_articulo }}</td> |
||||||
|
<td>{{ articulo.proveedor.nombre_proveedor }}</td> |
||||||
|
<td>${{ articulo.precio_compra|floatformat:2 }}</td> |
||||||
|
<td>${{ articulo.precio_venta|floatformat:2 }}</td> |
||||||
|
<td> |
||||||
|
<a class="btn btn-sm btn-dark text-white" href="{% url 'articulo_update' articulo.id %}"> |
||||||
|
<i class="bi bi-pencil"></i> Editar |
||||||
|
</a> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
{% empty %} |
||||||
<tr> |
<tr> |
||||||
<th scope="row">{{ articulo.id }}</th> |
<td colspan="9" class="text-center text-muted">No hay artículos registrados.</td> |
||||||
<td> {{ articulo.nombre_articulo }} </td> |
|
||||||
<td> {{ articulo.medida }} </td> |
|
||||||
<td> {{ articulo.descripcion }} </td> |
|
||||||
<td> {{ articulo.tipo_articulo.tipo_articulo }} </td> |
|
||||||
<td> {{ articulo.proveedor.nombre_proveedor }} </td> |
|
||||||
<td> {{ articulo.precio_compra }} </td> |
|
||||||
<td> {{ articulo.precio_venta }} </td> |
|
||||||
<td class="text-center"> <a class="btn btn-secondary" href="{% url 'articulo_update' articulo.id %}">📝</a> </td> |
|
||||||
</tr> |
</tr> |
||||||
{% endfor %} |
{% endfor %} |
||||||
</tbody> |
</tbody> |
||||||
</table> |
</table> |
||||||
</div> |
</div> |
||||||
</form> |
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
<div class="fixed-bottom col-12 mc-3"> |
|
||||||
<di class="gap-2 d-md-flex justify-content-md-end mb-3"> |
|
||||||
<a class="btn btn-success rounded-pill btn-lg" href="{% url 'articulo_registro' %}" >💾</a> |
|
||||||
<br> |
|
||||||
<br> |
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
<a href="{% url 'bodega_registro' %}" class="btn btn-success btn-lg rounded-circle position-fixed bottom-0 end-0 m-3 shadow-lg"> |
||||||
|
<i class="fas fa-plus"></i> |
||||||
|
</a> |
||||||
</main> |
</main> |
||||||
|
|
||||||
{% endblock %} |
{% endblock %} |
||||||
@ -1,54 +1,61 @@ |
|||||||
{% extends "Base.html" %} |
{% extends "Base.html" %} |
||||||
|
|
||||||
{% block content %} |
{% block content %} |
||||||
<main class="conteiner"> |
<main class="container my-5"> |
||||||
<div class="row"> |
<div class="row justify-content-center"> |
||||||
<div class="col-md-10 offset-md-1 mt-4"> |
<div class="col-md-10"> |
||||||
<form action="/bodega/" method="POST"> |
<div class="card shadow-lg border-0"> |
||||||
<div class="card-header row col-12 justify-content-end mb-2 pr-0 mt-2"> |
<div class="card-header text-center bg-secondary text-white"> |
||||||
<h3 class="text-center">Tabla de Bodega</h3> |
<h3 class="mb-0">Tabla de Bodega</h3> |
||||||
</div> |
</div> |
||||||
|
<div class="card-body p-4"> |
||||||
<div class="table-responsive"> |
<div class="table-responsive"> |
||||||
<table class="table mt-3"> |
<table class="table table-bordered table-hover align-middle text-white"> |
||||||
<thead class="table-dark"> |
<thead class="bg-dark text-secondary text-center"> |
||||||
<tr> |
<tr> |
||||||
<th scope="col">#</th> |
<th scope="col">#</th> |
||||||
<th scope="col">Codigo de la bodega</th> |
<th scope="col">Código de la Bodega</th> |
||||||
<th scope="col">Nombre la bodega</th> |
<th scope="col">Nombre de la Bodega</th> |
||||||
<th scope="col">Estado</th> |
<th scope="col">Estado</th> |
||||||
<th scope="col">Direccion</th> |
<th scope="col">Dirección</th> |
||||||
<th scope="col">ACTUALIZAR</th> |
<th scope="col">Actualizar</th> |
||||||
</tr> |
</tr> |
||||||
</thead> |
</thead> |
||||||
<tbody> |
<tbody> |
||||||
{% for bodega in persona %} |
{% for bodega in persona %} |
||||||
<tr> |
<tr class="text-center"> |
||||||
<th scope="row"> {{bodega.id}} </th> |
<td>{{ bodega.id }}</td> |
||||||
<td> {{bodega.codigo_bodega}} </td> |
<td>{{ bodega.codigo_bodega }}</td> |
||||||
<td> {{bodega.nombre_bodega}} </td> |
<td>{{ bodega.nombre_bodega }}</td> |
||||||
|
<td> |
||||||
{% if bodega.estado %} |
{% if bodega.estado %} |
||||||
<td> activo </td> |
Activo |
||||||
{% else %} |
{% else %} |
||||||
<td> inactivo </td> |
Inactivo |
||||||
{% endif %} |
{% endif %} |
||||||
<td> {{bodega.direccion_bodega}} </td> |
</td> |
||||||
<td class="text-center"> <a class="btn btn-secondary" href="{% url 'bodega_update' bodega.id %}">📝</a> </td> |
<td>{{ bodega.direccion_bodega }}</td> |
||||||
|
<td> |
||||||
|
<a class="btn btn-sm btn-dark text-white " href="{% url 'bodega_update' bodega.id %}"> |
||||||
|
<i class="bi bi-pencil">Editar</i> |
||||||
|
</a> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
{% empty %} |
||||||
|
<tr> |
||||||
|
<td colspan="6" class="text-center text-muted">No hay bodegas registradas.</td> |
||||||
</tr> |
</tr> |
||||||
{% endfor %} |
{% endfor %} |
||||||
</tbody> |
</tbody> |
||||||
</table> |
</table> |
||||||
</div> |
</div> |
||||||
|
|
||||||
</form> |
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
<div class="fixed-bottom col-12 mc-3"> |
|
||||||
<di class="gap-2 d-md-flex justify-content-md-end mb-3"> |
|
||||||
<a class="btn btn-success rounded-pill btn-lg" href="{% url 'bodega_registro' %}" >💾</a> |
|
||||||
<br> |
|
||||||
<br> |
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
<a href="{% url 'bodega_registro' %}" class="btn btn-success btn-lg rounded-circle position-fixed bottom-0 end-0 m-3 shadow-lg"> |
||||||
|
<i class="fas fa-plus"></i> |
||||||
|
</a> |
||||||
</main> |
</main> |
||||||
|
|
||||||
{% endblock %} |
{% endblock %} |
||||||
@ -1,28 +1,26 @@ |
|||||||
{% extends "Base.html" %} |
{% extends "Base.html" %} |
||||||
|
|
||||||
{% block content %} |
{% block content %} |
||||||
<main class="conteiner"> |
<main class="container my-5"> |
||||||
<div class="row"> |
<div class="row justify-content-center"> |
||||||
<div class="col-md-8 offset-md-2 mt-4"> |
<div class="col-lg-6 col-md-8 col-sm-12"> |
||||||
<form method="POST"> |
<form method="POST" class="shadow-lg p-4 bg-light rounded"> |
||||||
<div class="card"> |
|
||||||
<div class="card-header text-bg-secondary"> |
|
||||||
<h4 class="text-center">Actualizar Bodega</h4> |
|
||||||
</div> |
|
||||||
<div class="card-body"> |
|
||||||
{% csrf_token %} |
{% csrf_token %} |
||||||
{{form}} |
<h3 class="text-center text-secondary mb-4">Actualizar Bodega</h3> |
||||||
|
<div class="mb-3"> |
||||||
</div> |
{{ form }} |
||||||
<div class="card-footer"> |
|
||||||
<div class="gap-3 d-md-flex justify-content-md-end mb-3"> |
|
||||||
<a class="btn btn-danger" href="{% url 'bodega_vista' %}">Cancelar</a> |
|
||||||
<button class="btn btn-primary ">Actualizar bodega</button> |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
|
<div class="d-flex justify-content-between align-items-center mt-4"> |
||||||
|
<a href="{% url 'bodega_vista' %}" class="btn btn-outline-danger"> |
||||||
|
<i class="bi bi-x-circle"></i> Cancelar |
||||||
|
</a> |
||||||
|
<button type="submit" class="btn btn-primary"> |
||||||
|
<i class="bi bi-save"></i> Actualizar bodega |
||||||
|
</button> |
||||||
</div> |
</div> |
||||||
</form> |
</form> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</main> |
</main> |
||||||
|
|
||||||
{% endblock %} |
{% endblock %} |
||||||
@ -1,36 +1,94 @@ |
|||||||
<!DOCTYPE html> |
<!DOCTYPE html> |
||||||
<html> |
<!DOCTYPE html> |
||||||
|
<html lang="es"> |
||||||
<head> |
<head> |
||||||
|
<meta charset="UTF-8"> |
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||||
<title>Gráfico Interactivo</title> |
<title>Gráfico Interactivo</title> |
||||||
|
|
||||||
|
<!-- Agregar Bootstrap --> |
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"> |
||||||
|
|
||||||
|
<!-- Agregar Chart.js --> |
||||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script> |
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script> |
||||||
|
|
||||||
|
<style> |
||||||
|
/* Ajustes adicionales para hacer el gráfico más grande en pantallas grandes */ |
||||||
|
.container { |
||||||
|
max-width: 900px; |
||||||
|
margin-top: 50px; |
||||||
|
} |
||||||
|
h1 { |
||||||
|
text-align: center; |
||||||
|
margin-bottom: 20px; |
||||||
|
color: #333; |
||||||
|
} |
||||||
|
.btn-secondary { |
||||||
|
margin-top: 20px; |
||||||
|
} |
||||||
|
</style> |
||||||
</head> |
</head> |
||||||
<body> |
<body> |
||||||
<h1>Gráfico de cantidad de productos</h1> |
|
||||||
<canvas id="grafico" width="400" height="200"></canvas> |
<div class="container"> |
||||||
|
<h1>Gráfico de Cantidad de Productos</h1> |
||||||
|
|
||||||
|
<!-- Canvas para el gráfico --> |
||||||
|
<canvas id="grafico"></canvas> |
||||||
|
|
||||||
|
<!-- Botón para volver --> |
||||||
|
<a href="{% url 'inventario_vista' %}" class="btn btn-secondary btn-lg d-block mx-auto">Volver</a> |
||||||
|
</div> |
||||||
|
|
||||||
<script> |
<script> |
||||||
const ctx = document.getElementById('grafico').getContext('2d'); |
const ctx = document.getElementById('grafico').getContext('2d'); |
||||||
|
|
||||||
|
// Preparar los labels con el nombre del producto y la medida |
||||||
|
const productosConMedida = {{ productos|safe }}.map((producto, index) => { |
||||||
|
// Asumir que la medida está disponible en el mismo índice que el producto en la lista |
||||||
|
const medida = {{ medidas|safe }}[index]; // Asegúrate de pasar las medidas correctamente desde el backend |
||||||
|
return producto + ' (' + medida + ')'; // Combina nombre y medida |
||||||
|
}); |
||||||
|
|
||||||
const myChart = new Chart(ctx, { |
const myChart = new Chart(ctx, { |
||||||
type: 'bar', |
type: 'pie', // Tipo de gráfico de pastel |
||||||
data: { |
data: { |
||||||
labels: {{ productos|safe }}, // Nombres de los productos |
labels: productosConMedida, // Nombres de los productos con medida |
||||||
datasets: [{ |
datasets: [{ |
||||||
label: 'Cantidad de Productos', |
label: 'Cantidad de Productos', |
||||||
data: {{ cantidades|safe }}, // Cantidades de productos |
data: {{ cantidades|safe }}, // Cantidades de productos |
||||||
backgroundColor: 'rgba(75, 192, 192, 0.2)', |
backgroundColor: [ |
||||||
borderColor: 'rgba(75, 192, 192, 1)', |
'rgba(75, 192, 192, 0.6)', |
||||||
|
'rgba(153, 102, 255, 0.6)', |
||||||
|
'rgba(255, 159, 64, 0.6)', |
||||||
|
'rgba(54, 162, 235, 0.6)', |
||||||
|
'rgba(255, 99, 132, 0.6)', |
||||||
|
'rgba(255, 205, 86, 0.6)', |
||||||
|
'rgba(201, 203, 207, 0.6)' |
||||||
|
], // Colores para cada sección del gráfico |
||||||
|
borderColor: 'rgba(255, 255, 255, 0.7)', // Color del borde |
||||||
borderWidth: 1 |
borderWidth: 1 |
||||||
}] |
}] |
||||||
}, |
}, |
||||||
options: { |
options: { |
||||||
scales: { |
responsive: true, |
||||||
y: { |
plugins: { |
||||||
beginAtZero: true |
legend: { |
||||||
|
position: 'top', |
||||||
|
}, |
||||||
|
tooltip: { |
||||||
|
callbacks: { |
||||||
|
label: function(tooltipItem) { |
||||||
|
return tooltipItem.label + ': ' + tooltipItem.raw + ' productos'; |
||||||
|
} |
||||||
|
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
}); |
}); |
||||||
</script> |
</script> |
||||||
<a href="{% url 'inventario_vista' %}" class="btn btn-secondary">volver</a> |
|
||||||
|
|
||||||
|
<!-- Agregar Bootstrap JS --> |
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script> |
||||||
</body> |
</body> |
||||||
</html> |
</html> |
||||||
@ -1,56 +1,59 @@ |
|||||||
{% extends "Base.html" %} |
{% extends "Base.html" %} |
||||||
|
|
||||||
{% block content %} |
{% block content %} |
||||||
<main class="conteiner"> |
<main class="container my-5"> |
||||||
<div class="row"> |
<div class="row justify-content-center"> |
||||||
<div class="col-md-10 offset-md-1 mt-4"> |
<div class="col-md-10"> |
||||||
<form action="/inventario/" method="POST"> |
<div class="card shadow-lg border-0"> |
||||||
<div class="card-header"> |
<div class="card-header text-center bg-secondary text-white"> |
||||||
<h3 class="text-center">Inventario</h3> |
<h3 class="mb-0">Inventario</h3> |
||||||
</div> |
</div> |
||||||
|
<div class="card-body p-4"> |
||||||
<div class="table-responsive"> |
<div class="table-responsive"> |
||||||
<table class="table mt-3"> |
<table class="table table-bordered table-hover align-middle text-white"> |
||||||
<thead class="table-dark"> |
<thead class="bg-dark text-secondary text-center"> |
||||||
<tr> |
<tr> |
||||||
<th scope="col">#</th> |
<th scope="col">#</th> |
||||||
<th scope="col">Articulo</th> |
<th scope="col">Artículo</th> |
||||||
<th scope="col">Descripcion de articulo</th> |
<th scope="col">Descripción de Artículo</th> |
||||||
<th scope="col">Bodega</th> |
<th scope="col">Bodega</th> |
||||||
<th scope="col">Cantidad</th> |
<th scope="col">Cantidad</th> |
||||||
</tr> |
</tr> |
||||||
</thead> |
</thead> |
||||||
<tbody> |
<tbody> |
||||||
{% for inventario in persona %} |
{% for inventario in persona %} |
||||||
|
<tr class="text-center"> |
||||||
|
<td>{{ inventario.id }}</td> |
||||||
|
<td>{{ inventario.articulo.nombre_articulo }} {{ inventario.articulo.medida }}</td> |
||||||
|
<td>{{ inventario.articulo.descripcion }}</td> |
||||||
|
<td>{{ inventario.bodega.nombre_bodega }}</td> |
||||||
|
<td>{{ inventario.cantidad }}</td> |
||||||
|
</tr> |
||||||
|
{% empty %} |
||||||
<tr> |
<tr> |
||||||
<th scope="row">{{ inventario.id }}</th> |
<td colspan="5" class="text-center text-muted">No hay inventarios registrados.</td> |
||||||
<td> {{ inventario.articulo.nombre_articulo }} {{inventario.articulo.medida}} </td> |
|
||||||
<td> {{ inventario.articulo.descripcion }} </td> |
|
||||||
<td> {{ inventario.bodega.nombre_bodega }} </td> |
|
||||||
<td> {{ inventario.cantidad }} </td> |
|
||||||
</tr> |
</tr> |
||||||
{% endfor %} |
{% endfor %} |
||||||
</tbody> |
</tbody> |
||||||
</table> |
</table> |
||||||
</div> |
</div> |
||||||
</form> |
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
<div class="fixed-bottom col-12 mc-3"> |
</div> |
||||||
<di class="gap-2 d-md-flex justify-content-md-end mb-3"> |
</div> |
||||||
|
|
||||||
|
<div class="fixed-bottom d-flex justify-content-end p-3"> |
||||||
<div class="btn-group dropup"> |
<div class="btn-group dropup"> |
||||||
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> |
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> |
||||||
📂 |
📂 |
||||||
</button> |
</button> |
||||||
<ul class="dropdown-menu dropdown-menu-dark"> |
<ul class="dropdown-menu dropdown-menu-dark"> |
||||||
<!-- Dropdown menu links --> |
<li><a class="dropdown-item" href="{% url 'generar_reporte_pdf' %}">Descargar PDF</a></li> |
||||||
<li><a class="dropdown-item" href="{% url 'generar_reporte_pdf' %}" >Descargar PDF</a></li> |
<li><a class="dropdown-item" href="{% url 'generar_reporte_excel' %}">Descargar Excel</a></li> |
||||||
<li><a class="dropdown-item" href="{% url 'generar_reporte_excel' %}" >Descargar Excel</a></li> |
|
||||||
<li><a class="dropdown-item" href="{% url 'generar_reporte_csv' %}">Descargar CSV</a></li> |
<li><a class="dropdown-item" href="{% url 'generar_reporte_csv' %}">Descargar CSV</a></li> |
||||||
<li><a class="dropdown-item" href="{% url 'generar_grafico_chartjs' %}">Generar Grafico</a></li> |
<li><a class="dropdown-item" href="{% url 'generar_grafico_chartjs' %}">Generar Gráfico</a></li> |
||||||
</ul> |
</ul> |
||||||
</div> |
</div> |
||||||
<br> |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
</main> |
</main> |
||||||
|
|
||||||
|
|||||||
@ -1,53 +1,55 @@ |
|||||||
{% extends "Base.html" %} |
{% extends "Base.html" %} |
||||||
|
|
||||||
{% block content %} |
{% block content %} |
||||||
<main class="conteiner-lg"> |
<main class="container my-5"> |
||||||
<div class="row"> |
<div class="row justify-content-center"> |
||||||
<div class="col-md-10 offset-md-1 mt-4"> |
<div class="col-md-10"> |
||||||
<form action="/proveedor/" method="POST"> |
<div class="card shadow-lg border-0"> |
||||||
<div class="card-header justify-content-md-center mb-3"> |
<div class="card-header text-center bg-secondary text-white"> |
||||||
<h3 class="text-center">Tabla de proveedores</h3> |
<h3 class="mb-0">Tabla de Proveedores</h3> |
||||||
</div> |
</div> |
||||||
|
<div class="card-body p-4"> |
||||||
<div class="table-responsive"> |
<div class="table-responsive"> |
||||||
<table class="table mt-3"> |
<table class="table table-bordered table-hover align-middle text-white"> |
||||||
<thead class="table-dark"> |
<thead class="bg-dark text-secondary text-center"> |
||||||
<tr> |
<tr> |
||||||
<th scope="col">#</th> |
<th scope="col">#</th> |
||||||
<th scope="col">Nombre</th> |
<th scope="col">Nombre</th> |
||||||
<th scope="col">Email</th> |
<th scope="col">Email</th> |
||||||
<th scope="col">Telefono</th> |
<th scope="col">Teléfono</th> |
||||||
<th scope="col">Direccion</th> |
<th scope="col">Dirección</th> |
||||||
<th scope="col">ACTUALIZAR</th> |
<th scope="col">Actualizar</th> |
||||||
</tr> |
</tr> |
||||||
</thead> |
</thead> |
||||||
<tbody> |
<tbody> |
||||||
{% for proveedor in persona %} |
{% for proveedor in persona %} |
||||||
|
<tr class="text-center"> |
||||||
|
<td>{{ proveedor.id }}</td> |
||||||
|
<td>{{ proveedor.nombre_proveedor }}</td> |
||||||
|
<td>{{ proveedor.email }}</td> |
||||||
|
<td>{{ proveedor.telefono }}</td> |
||||||
|
<td>{{ proveedor.direccion }}</td> |
||||||
|
<td> |
||||||
|
<a class="btn btn-secondary rounded-pill btn-lg" href="{% url 'Proveedor_update' proveedor.id %}"> |
||||||
|
📝 |
||||||
|
</a> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
{% empty %} |
||||||
<tr> |
<tr> |
||||||
<th scope="row"> {{proveedor.id}} </th> |
<td colspan="6" class="text-center text-muted">No hay proveedores registrados.</td> |
||||||
<td> {{proveedor.nombre_proveedor}} </td> |
|
||||||
<td> {{proveedor.email}} </td> |
|
||||||
<td> {{proveedor.telefono}} </td> |
|
||||||
<td> {{proveedor.direccion}} </td> |
|
||||||
<td class="text-center"> <a class="btn btn-secondary rounded-pill btn-lg" href="{% url 'Proveedor_update' proveedor.id %}">📝</a> </td> |
|
||||||
</tr> |
</tr> |
||||||
{% endfor %} |
{% endfor %} |
||||||
</tbody> |
</tbody> |
||||||
</table> |
</table> |
||||||
</div> |
</div> |
||||||
|
|
||||||
</form> |
|
||||||
|
|
||||||
</div> |
</div> |
||||||
|
|
||||||
</div> |
</div> |
||||||
<div class="fixed-bottom col-12 mc-3"> |
|
||||||
<di class="gap-2 d-md-flex justify-content-md-end mb-3"> |
|
||||||
<a class="btn btn-success rounded-pill btn-lg" href="{% url 'proveedor_registro' %}" >💾</a> |
|
||||||
<br> |
|
||||||
<br> |
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
<a href="{% url 'proveedor_registro' %}" class="btn btn-success btn-lg rounded-circle position-fixed bottom-0 end-0 m-3 shadow-lg"> |
||||||
|
<i class="fas fa-plus"></i> |
||||||
|
</a> |
||||||
</main> |
</main> |
||||||
|
|
||||||
{% endblock %} |
{% endblock %} |
||||||
@ -1,29 +1,27 @@ |
|||||||
{% extends "Base.html" %} |
{% extends "Base.html" %} |
||||||
|
|
||||||
{% block content %} |
{% block content %} |
||||||
<main class="conteiner"> |
|
||||||
<div class="row"> |
|
||||||
<div class="col-md-8 offset-md-2 mt-4"> |
|
||||||
<form method="POST"> |
|
||||||
<div class="card"> |
|
||||||
<div class="card-header text-bg-secondary"> |
|
||||||
<h4 class="text-center">Actualizar proveedor</h4> |
|
||||||
</div> |
|
||||||
<div class="card-body"> |
|
||||||
|
|
||||||
|
<main class="container my-5"> |
||||||
|
<div class="row justify-content-center"> |
||||||
|
<div class="col-lg-6 col-md-8 col-sm-12"> |
||||||
|
<form method="POST" class="shadow-lg p-4 bg-light rounded"> |
||||||
{% csrf_token %} |
{% csrf_token %} |
||||||
{{form}} |
<h3 class="text-center text-secondary mb-4">Actualizar Proveedor</h3> |
||||||
|
<div class="mb-3"> |
||||||
</div> |
{{ form }} |
||||||
<div class="card-footer"> |
|
||||||
<div class="gap-3 d-md-flex justify-content-md-end mb-3"> |
|
||||||
<a class="btn btn-danger" href="{% url 'proveedor' %}">Cancelar</a> |
|
||||||
<button class="btn btn-primary ">Actualizar proveedor</button> |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
|
<div class="d-flex justify-content-between align-items-center mt-4"> |
||||||
|
<a href="{% url 'proveedor' %}" class="btn btn-outline-danger"> |
||||||
|
<i class="bi bi-x-circle"></i> Cancelar |
||||||
|
</a> |
||||||
|
<button type="submit" class="btn btn-primary"> |
||||||
|
<i class="bi bi-save"></i> Actualizar proveedor |
||||||
|
</button> |
||||||
</div> |
</div> |
||||||
</form> |
</form> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</main> |
</main> |
||||||
|
|
||||||
{% endblock %} |
{% endblock %} |
||||||
@ -0,0 +1,46 @@ |
|||||||
|
<!DOCTYPE html> |
||||||
|
<html lang="es"> |
||||||
|
<head> |
||||||
|
<meta charset="UTF-8"> |
||||||
|
<title>Reporte de Inventario</title> |
||||||
|
<style> |
||||||
|
body { font-family: Arial, sans-serif; } |
||||||
|
table { width: 100%; border-collapse: collapse; } |
||||||
|
th, td { border: 1px solid #000; padding: 8px; text-align: left; } |
||||||
|
th { background-color: #f2f2f2; } |
||||||
|
|
||||||
|
/* Estilo para la celda de Observaciones */ |
||||||
|
td.observaciones { |
||||||
|
white-space: normal; /* Permitir el salto de línea */ |
||||||
|
word-wrap: break-word; /* Ajustar el texto largo dentro de la celda */ |
||||||
|
max-width: 300px; /* Limitar el ancho de la celda */ |
||||||
|
overflow-wrap: break-word; /* Hacer que las palabras largas se ajusten */ |
||||||
|
} |
||||||
|
</style> |
||||||
|
</head> |
||||||
|
<body> |
||||||
|
<h1>Reporte de Movimientos de Inventario</h1> |
||||||
|
<table> |
||||||
|
<thead> |
||||||
|
<tr> |
||||||
|
<th>Fecha</th> |
||||||
|
<th>Tipo de Movimiento</th> |
||||||
|
<th>Bodega</th> |
||||||
|
<th>Artículo</th> |
||||||
|
<th>Cantidad</th> |
||||||
|
</tr> |
||||||
|
</thead> |
||||||
|
<tbody> |
||||||
|
{% for movimiento in movimientos %} |
||||||
|
<tr> |
||||||
|
<td>{{ movimiento.fecha }}</td> |
||||||
|
<td>{{ movimiento.tipo_inventario }}</td> |
||||||
|
<td>{{ movimiento.bodega }}</td> |
||||||
|
<td>{{ movimiento.articulo }}</td> |
||||||
|
<td>{{ movimiento.cantidad }}</td> |
||||||
|
</tr> |
||||||
|
{% endfor %} |
||||||
|
</tbody> |
||||||
|
</table> |
||||||
|
</body> |
||||||
|
</html> |
||||||
@ -1,44 +1,53 @@ |
|||||||
{% extends "Base.html" %} |
{% extends "Base.html" %} |
||||||
|
|
||||||
{% block content %} |
{% block content %} |
||||||
<main class="conteiner"> |
<main class="container my-5"> |
||||||
<div class="row"> |
<div class="row justify-content-center"> |
||||||
<div class="col-md-10 offset-md-1 mt-4"> |
<div class="col-md-10"> |
||||||
<form action="/tipo/" method="POST"> |
<div class="card shadow-lg border-0"> |
||||||
<div class="card-header"> |
<div class="card-header text-center bg-secondary text-white"> |
||||||
<h3 class="text-center">Tabla de tipos de articulos</h3> |
<h3 class="mb-0">Tabla de Tipos de Artículos</h3> |
||||||
</div> |
</div> |
||||||
|
<div class="card-body p-4"> |
||||||
<div class="table-responsive"> |
<div class="table-responsive"> |
||||||
<table class="table mt-3"> |
<table class="table table-bordered table-hover align-middle text-white"> |
||||||
<thead class="table-dark"> |
<thead class="bg-dark text-secondary text-center"> |
||||||
<tr> |
<tr> |
||||||
<th scope="col">#</th> |
<th scope="col">#</th> |
||||||
<th scope="col">tipo de articulo</th> |
<th scope="col">Tipo de Artículo</th> |
||||||
<th scope="col">Descripcion</th> |
<th scope="col">Descripción</th> |
||||||
<th scope="col">ACTUALIZAR</th> |
<th scope="col">Actualizar</th> |
||||||
</tr> |
</tr> |
||||||
</thead> |
</thead> |
||||||
<tbody> |
<tbody> |
||||||
{% for tipo_articulo in persona %} |
{% for tipo_articulo in persona %} |
||||||
|
<tr class="text-center"> |
||||||
|
<td>{{ tipo_articulo.id }}</td> |
||||||
|
<td>{{ tipo_articulo.tipo_articulo }}</td> |
||||||
|
<td>{{ tipo_articulo.descripcion }}</td> |
||||||
|
<td> |
||||||
|
<a class="btn btn-secondary rounded-pill" href="{% url 'tipo_update' tipo_articulo.id %}"> |
||||||
|
📝 |
||||||
|
</a> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
{% empty %} |
||||||
<tr> |
<tr> |
||||||
<th scope="row"> {{tipo_articulo.id}} </th> |
<td colspan="4" class="text-center text-muted">No hay tipos de artículos registrados.</td> |
||||||
<td> {{tipo_articulo.tipo_articulo}} </td> |
</tr> |
||||||
<td> {{tipo_articulo.descripcion}} </td> |
|
||||||
<td class="text-center"> <a class="btn btn-secondary rounded-pill" href="{% url 'tipo_update' tipo_articulo.id %}">📝</a> </td> </tr> |
|
||||||
{% endfor %} |
{% endfor %} |
||||||
</tbody> |
</tbody> |
||||||
</table> |
</table> |
||||||
</div> |
</div> |
||||||
</form> |
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
<div class="fixed-bottom col-12 mc-3"> |
|
||||||
<di class="gap-2 d-md-flex justify-content-md-end mb-3"> |
|
||||||
<a class="btn btn-success rounded-pill btn-lg" href="{% url 'tipo_registro' %}" >💾</a> |
|
||||||
<br> |
|
||||||
<br> |
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
|
<!-- Botón flotante con icono de plus --> |
||||||
|
<a href="{% url 'tipo_registro' %}" class="btn btn-success btn-lg rounded-circle position-fixed bottom-0 end-0 m-3 shadow-lg"> |
||||||
|
<i class="fas fa-plus"></i> |
||||||
|
</a> |
||||||
</main> |
</main> |
||||||
|
|
||||||
{% endblock %} |
{% endblock %} |
||||||
@ -1,29 +1,27 @@ |
|||||||
{% extends "Base.html" %} |
{% extends "Base.html" %} |
||||||
|
|
||||||
{% block content %} |
{% block content %} |
||||||
<main class="conteiner"> |
|
||||||
<div class="row"> |
|
||||||
<div class="col-md-8 offset-md-2 mt-4"> |
|
||||||
<form method="POST"> |
|
||||||
<div class="card"> |
|
||||||
<div class="card-header text-bg-secondary"> |
|
||||||
<h4 class="text-center">Actualizar proveedor</h4> |
|
||||||
|
|
||||||
</div> |
<main class="container my-5"> |
||||||
<div class="card-body"> |
<div class="row justify-content-center"> |
||||||
|
<div class="col-lg-6 col-md-8 col-sm-12"> |
||||||
|
<form method="POST" class="shadow-lg p-4 bg-light rounded"> |
||||||
{% csrf_token %} |
{% csrf_token %} |
||||||
{{form}} |
<h3 class="text-center text-secondary mb-4">Actualizar tipo de artículo</h3> |
||||||
|
<div class="mb-3"> |
||||||
</div> |
{{ form }} |
||||||
<div class="card-footer"> |
|
||||||
<div class="gap-3 d-md-flex justify-content-md-end mb-3"> |
|
||||||
<a class="btn btn-danger" href="{% url 'tipo_vista' %}">Cancelar</a> |
|
||||||
<button class="btn btn-primary ">Actualizar tipo de articulo</button> |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
|
<div class="d-flex justify-content-between align-items-center mt-4"> |
||||||
|
<a href="{% url 'tipo_vista' %}" class="btn btn-outline-danger"> |
||||||
|
<i class="bi bi-x-circle"></i> Cancelar |
||||||
|
</a> |
||||||
|
<button type="submit" class="btn btn-primary"> |
||||||
|
<i class="bi bi-save"></i> Actualizar tipo de artículo |
||||||
|
</button> |
||||||
</div> |
</div> |
||||||
</form> |
</form> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</main> |
</main> |
||||||
|
|
||||||
{% endblock %} |
{% endblock %} |
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue