240 lines
7.5 KiB
HTML

{% extends 'base.html' %}
{% block titulo %}Comprobante de Articulos{% endblock%}
{% block seccion %}
{% block titulodeseccion %} Comprobante de Articulos {%endblock%}
{% block etiqueta1 %}Inicio{% endblock %}
{% block etiqueta2 %}Formulario{% endblock %}
{% endblock %}
{% block contenido %}
<div class="row justify-content-center">
<div class="col-lg-10">
<div class="card card-dark card-outline">
<div class="card-header">
<div class="d-flex justify-content-between">
<h3 class="card-title m-0">Comprobante de Articulos</h3>
</div>
</div>
<div class="card-body">
{% include 'comprobante/formularios.html' %}
<div class="table-responsive-xxl">
<table class="table">
<thead>
<tr>
<th scope="col" class="text-center"></th>
<th scope="col" class="text-center">Condicion</th>
<th scope="col" class="text-center">Concepto</th>
<th scope="col" class="text-center">Observacion</th>
<th scope="col" class="text-center">Codigo</th>
<th scope="col" class="text-center">Numero</th>
<th scope="col" class="text-center">Grupo</th>
<th scope="col" class="text-center">Subgrupo</th>
</tr>
</thead>
<tbody>
{% if comprobantes %}
{% for seleccion in comprobantes %}
<tr>
<td class="text-center">{{forloop.counter}}</td>
<td class="text-center">{{seleccion.e_o_s}}</td>
<td class="text-center">{{seleccion.conceptos}}</td>
<td class="text-center">{{seleccion.observaciones}}</td>
<td class="text-center">{{seleccion.concepto_movimiento}}</td>
<td class="text-center">{{seleccion.numero_movimiento}}</td>
<td class="text-center">{{seleccion.grupo}}</td>
<td class="text-center">{{seleccion.subgrupo}}</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="9" class="text-center">No hay articulos</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
{% include 'envios/formulario.html' %}
<div class="table-responsive-xxl">
<table class="table">
<thead>
<tr>
<th scope="col" class="text-center"></th>
<th scope="col" class="text-center">Articulo</th>
<th scope="col" class="text-center">Unidad de Medida</th>
<th scope="col" class="text-center">Cantidad</th>
<th scope="col" class="text-center">Valor Unitario</th>
<th scope="col" class="text-center">Valor Total</th>
</tr>
</thead>
<tbody>
{% if articulos_c %}
{% for comprobante in articulos_c %}
<tr>
<td class="text-center">{{forloop.counter}}</td>
<td class="text-center">{{comprobante.articulo.articulo}}</td>
<td class="text-center">{{comprobante.unidad_medida}}</td>
<td class="text-center">{{comprobante.cantidad}}</td>
<td class="text-center">{{comprobante.precio}}</td>
<td class="text-center">{{comprobante.total}}</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="6" class="text-center">No hay articulos</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th colspan="10"></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th scope="col" style="text-align: center;">Total</th>
<th scope="col" style="text-align: center;">{{total_precios}}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="row">
<div class="col-12"><a href="{% url 'comprobante'%}" class="btn btn-dark float-left">Comprobante</a>
<form
method="post"
action="{% url 'borrar_todo' %}"
class="float-right"
>
{% csrf_token %}
<button type="submit" class="btn btn-danger">Elimina Todo</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block js %}
<script>
$(document).ready(function () {
$("#conceptos").change(function () {
var conceptoSeleccionado = $(this).val();
var cantidad = 0;
switch (conceptoSeleccionado) {
case "Inventario Inicial":
cantidad = 1;
break;
case "Entradas por traspasos de otros almacenes":
cantidad = 2;
break;
case "Compras":
cantidad = 3;
break;
case "Producción y transformación de materiales":
cantidad = 6;
break;
case "Suministros de otras entidades":
cantidad = 7;
break;
case "Reintegros o devoluciones":
cantidad = 8;
break;
case "Reconstrucción de equipos":
cantidad = 10;
break;
case "Entradas por donación":
cantidad = 11;
break;
case "Reconstrucción de equipos":
cantidad = 10;
break;
case "Entradas por Permuta":
cantidad = 12;
break;
case "Omisión en inventarios y sobrantes":
cantidad = 14;
break;
case "Incorporaciones para corregir registros anteriores":
cantidad = 17;
break;
case "Entradas o incorporaciones por otros conceptos.":
cantidad = 19;
break;
case "Ventas":
cantidad = 52;
break;
case "Entrega de bienes muebles en depósito":
cantidad = 53;
break;
case "Desarme":
cantidad = 55;
break;
case "Desincorporación por inservibilidad":
cantidad = 56;
break;
case "Desincorporación por deterioro":
cantidad = 57;
break;
case "Desincorporación por mermas":
cantidad = 58;
break;
case "Faltantes por investigar":
cantidad = 60;
break;
case "Salidas por permuta":
cantidad = 61;
break;
case "Salidas por donación":
cantidad = 62;
break;
case "Prestamos autorizados":
cantidad = 63;
break;
case "Desincorporación para corregir registros anteriores":
cantidad = 66;
break;
case "Salidas o desincorporaciones por otros conceptos":
cantidad = 69;
break;
case "Suministro de materiales de consumo":
cantidad = 54;
break;
case "Salidas por traspasos a otros almacenes":
cantidad = 51;
break;
default:
cantidad = 0;
}
$("#concepto_movimiento").val(cantidad);
});
});
</script>
{% endblock %}